Coder Social home page Coder Social logo

mampf-hd / mampf Goto Github PK

View Code? Open in Web Editor NEW
28.0 1.0 10.0 72.53 MB

MaMpf (Mathematical Media Platform) — an E-Learning platform for mathematics featuring a media player & editor. Developed & deployed at Heidelberg University.

Home Page: https://mampf.mathi.uni-heidelberg.de/

License: MIT License

Ruby 42.89% JavaScript 9.74% HTML 35.13% CoffeeScript 9.63% Dockerfile 0.47% Shell 0.16% SCSS 1.83% Python 0.09% Just 0.05%
e-learning hypermedia-player hypermedia-editor webvtt ruby flipped-classroom video

mampf's People

Contributors

alyaeanyx avatar christian-heusel avatar dependabot[bot] avatar eyafjall avatar fosterfarrell9 avatar frodo161 avatar henrixapp avatar hungrywords avatar joker234 avatar splines avatar tullur avatar tynsh avatar zebleck avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

mampf's Issues

Error beim Selbsttest

Ich habe aus Jux eben mal schauen wollen, wie viele Themen ich für einen Selbsttest auswählen kann: Link

Die Antwort scheint zumindest mal zu sein: Nicht alle ... 😄

image

Jetzt könnte man sich vielleicht mal anschauen, wie viele es braucht um das zum Failen zu bringen und dann fixen oder zumindest eine transparentere Fehlermeldung schreiben ...

Deprecation warning for Dalli_store

There is a deprecation warning in the deployment process in production:

DEPRECATION: :dalli_store will be removed in Dalli 3.0.
Please use Rails' official :mem_cache_store instead.

The reason is l58 in config/environments/production.rb:

config.cache_store = :dalli_store, ENV["MEMCACHED_SERVER"]

where it should be :mem_cache_store instead.

Null Benarichtigungen & Fenstertitel

Der Fenstertitel in MaMpf ist MaMpf (0), wenn man aktuell keine ungelesenen Benachrichtigungen hat. Es wäre schöner, wenn dieser dann nur MaMpf ist.

Linter config file

Add a linter config file, so that developers see, to which coding styles we try to live up to.

Komprimierung der Videos

Testdatei

Für alle Test wurde eine 6:24 minütige Videodatei umcodiert, die auf Mampf verfügbar war. Inwiefern die angegebenen Prozentzahlen auf längere Videos skalieren, ist noch zu erörtern.

Audioqualität

Beim Betrachten der Videos ist mir aufgefallen, dass der Ton zum einen Stereo codiert ist, und auch eine Bitrate von 128 kBit. Mittels ffmpeg kann die Bitrate reduziert werden, 64 kBit hören sich fast genauso gut an; Bei 32 kbit wird es dumpfer und blechig.

Ein Beispiel für die Umcodierung des Tons und Umstellung auf Monosound:
ffmpeg -i eingabe.mp4 -b:a 64k -af "pan=mono|c0=c1" output.mp4

Bei einer Testdatei von Mampf konnte ich so eine Reduktion der Dateigröße auf 55% der Originalgröße erreichen. Wenn die Audiobitrate auf 32kbit gesetzt wird ist die Datei noch 43% groß, allerdings wirken die Stimmen dann leicht blechern. Ein guter Zwischenweg wäre hier die Wahl von 48 kBit/s.

Videoqualität

Framerate

Des Weiteren könnte die Framerate der Videos reduziert werden auf 24 fps, statt den bisher verwendeten 30. Diese Umcodierung ist auch mit ffmpeg möglich:

ffmpeg -i eingabe.mp4   -r 24 output.mp4

Hier konnte ich eine Reduktion der Dateigröße auf ca. 80% der Originalgröße feststellen.

Codec

Durch die Verwendung eines neueren Codecs für die Videos wie z.B. h265(hevc) bzw. sogar AV1 könnte zusätzlich die Bitrate des Videos reduziert werden, bei gleich bleibender Qualität. Allerdings ist hier zu klären, ob alle Endgeräte diese Codecs unterstützen und wie es mit Lizenzen dort aussieht (ich kenne mich dort nicht aus). Das Umcodieren in AV1 ist z.Z. nicht einfach in annehmbarer Zeit möglich, jedoch konnte ich die Kodierung in HEVC probieren:

ffmpeg -i eingabe.mp4  -c:v hevc -vtag hvc1  output.mp4

Die Dateigröße beträgt dann nur noch 82% der Originalgröße.

Die Kombination von neueren Codec, einer Framerate von 24 fps und einer Audioqualität von 64 kbit Mono, lässt sich das Video auf ca. 50% der Originalgröße reduzieren. Bei der Wahl von 48 kBit sogar auf 43 %.

trim whitespaces from mailaddress on login

In the login dialogue should trim whitespaces in the email field automatically. Some tablets enter a whitespace automatically and it may not be clear to some users why they get the message "Please enter an email address".

Alternatively a more helpful error message would help as well.

fix the test or fix the bugs

Since I neither really know how the tests work nor how MaMpf itself really functions someone else should take care of this.
We are striving to get a working CI configuration at the moment, but will not be done by getting this done since the tests currently either fail for no reason (which means the tests should be fixed) or there are some bugs which should be addressed in their issues.

Dropdown menu for lectures does not show the subscribed lectures

In the following situattion, the dropdown menu does not show the correct list of subscribed lectures (but instead only the first of all lectures):

  • Browser: firefox; newly started, with a setting where all cookies are deleted after closing the browser
  • subscription type: 1 lecture subscribed , show only the content of the subscribed lectures

Warning im sprockets gem

mampf_1        | /usr/local/bundle/gems/sprockets-rails-3.2.1/lib/sprockets/rails/helper.rb:355: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
mampf_1        | /usr/local/bundle/gems/sprockets-4.0.2/lib/sprockets/base.rb:118: warning: The called method `[]' is defined here

Rationale for ajaxing lectures/new etc.

When creating a simple lecture creation test, cypress warns

This element <input.btn.btn-primary> is not visible because its parent <div#new-course-area.bg-green-lighten-4.p-3.mb-3.rounded> has CSS property: display: none

Fix this problem, or use {force: true} to disable error checking

, when trying to click on the "save lecture" button, after selecting the plus button.

When forcing to click, it kind of works, but no result/creation is displayed afterwards.

I can not tell, whether this issue is caused by cypress, because the hot plugged elements are displayed in their preview at some point.

I believe, that loading code and executing it as a "side-effect" causes this problem
I think the initial reason to load it via ajax was to automatically load the modules. Maybe migrating to an API approach, where fetching data, not code, could resolve this.

Form input of too large integers

I just discovered in the server logs that there is problem when user entered integer values in forms are too big to be actual integers, e.g. in the form that contains the submission grace period. If you enter someting like 1000000000000000000000000000000000000000000
in there, you will get an ActiveModel::RangeError (1000000000000000000000000000000000000000000 is out of range for ActiveModel::Type::Integer with limit 4 bytes). The update (in this case of the lecture) is rolled back, but the error object contains an empty message hash. So, no error message is displayed, and since it is all via ajax, the 500 error will be shown on the browser console. That will probably apply to all forms with integer input.

Tests on Travis CI are Currently Failing (duh!)

Creating run_tests_solr_1_cdb5242a231d  ... 
Creating run_tests_db_1_39a8b4b694e4    ... 
Creating run_tests_mailcatcher_1_4a39be942b59 ... 
mampf_1_fd0f7d091f14       ...
ERROR: for run_tests_mampf_1_fd0f7d091f14  Cannot start service mampf: OCI runtime create failed: container_linux.go:348: starting container process caused "exec: \"./docker/run_tests/run_tests.sh\": stat ./docker/run_tests/run_tests.sh: no such file or directory": unknown
ERROR: for mampf  Cannot start service mampf: OCI runtime create failed: container_linux.go:348: starting container process caused "exec: \"./docker/run_tests/run_tests.sh\": stat ./docker/run_tests/run_tests.sh: no such file or directory": unknown
ERROR: Encountered errors while bringing up the project.
The command "docker-compose up --abort-on-container-exit" exited with 1.

Deprecation Warnings for autoloading during initialization

There is a deprecation warning during initializiation:

DEPRECATION WARNING: Initialization autoloaded the constants ApplicationRecord, ApplicationHelper, QuizGraph, Solution, VideoUploader, ScreenshotUploader, PdfUploader, GeogebraUploader, HttpUrlValidator, and Medium.

 Being able to do this is deprecated. Autoloading during initialization is going
to be an error condition in future versions of Rails.

 Reloading does not reboot the application, and therefore code executed during
 initialization does not run again. So, if you reload ApplicationRecord, for example,
 the expected changes won't be reflected in that stale Class object.

These autoloaded constants have been unloaded

We should fix that as that will trigger an error in Rails 6.1.

THymE Titel

Im moment ist im Player der Titel einfach nur "THymE", ich finde aber, dass hier auch noch informationen über das jeweilige Medium angezeigt werden könnten, die folgenden Optionen hätte ich für "Lektion (V) Einführung in die Numerik, SS 2020, Sitzung 21, 07.07.2020 Trigonometrische Interpolation"

  • 21 - Trigonometrische Interpolation
  • Trigonometrische Interpolation
  • THymE - Trigonometrische Interpolation

Was denkt ihr dazu?

Explain the optimal sizes for a course picture

The Tooltip for the picture section of a course is missing information about the optimal size and image height/width ratio.
I uploaded a picture with size 1400x1400 and it was kinda blurry after being downscaled to 270x270.

image

Sidekiq interface broken

In the new production setup, Sidekiq's interface is broken as the css file cannot be retrieved.

Log in Button

Liebe Entwickler,
Wenn ich auf die Homepage gehe, erscheint bei dem Button, hinter dem ich den Login gefunden habe, ein Label mit dem Titel Logout.
Mit freundlichen Grüßen
Joris Edelmann

Truncation für sehr lange Medienbeschreibungen in THymE

Wenn die Medienbeschreibungen zu lang sind, werden sie zwar mit "..." abgekürzt, aber nicht kurz genug, siehe Screenshot:

screenshot 253

Die Schrift verschwindet, wenn man mit dem Mauszeiger über dem obersten Feld (hier "Punktspiegelungen") hovert.

screenshot 254

E-Mail Benachrichtigungen

Ich finde die E-Mail Benachrichtigungen könnte man noch etwas ansprechender gestalten, im Moment sehen sie nämlich noch so aus:

image
Als Beispiel fände ich das hier etwas ansprechender, wurde mit dem go Paket hermes erstellt, vielleicht existiert so was für RoR ja auch.
image

Man muss trotz fancy Darstellung dann aber ja immer noch darauf achten, dass die Plaintextdarstellung der Mail ausreichend ist, wie man das widerum macht weiß ich nicht.

Bump ruby

We should update to Ruby 2.7.2. This will however turn the deprecation warnings we are experiencing in some gems off, see here, which might be a potential pitfall once we upgrade to future ruby versions.

Empty locale cookie crashes rendering

If you supply an empty locale cookie 🥠 (done by accident while testing), the application renders an error and is unusable.

The culprit is here https://github.com/fosterfarrell9/mampf/blob/f117f860a277e6219183861605c0aadc17f4fb58/app/controllers/application_controller.rb#L80

This causes the enforce_available_locales! to crash, because the locale "" is unknown.

A possible way to mitigate this, would be:

if cookies[:locale].in?(I18n.available_locales.map(&:to_s))
  cookie_param = cookies[:locale]
end
I18n.locale = current_user.try(:locale) || locale_param ||
                    cookie_param || I18n.default_locale

Missing validation/factory for sort

Some of the factory bots are not creating correct data. For example, the lecture factory forgets to set the sort of the lecture (seminar, proseminar,lecture, etc.), I have added a validation in #73 and fixed the factory.

Related #66

Lecture type select disappears after changing course when creating a lecture

When you create a new lecture you have the option to select whether it is a lecture or actually a seminar, proseminar etc, (except if the associated course is term independent). However, as soon as you change the course, the select disappears - that should only happen if you change to a course that is term independent.
The bug is in lectures.coffee in l305 where instead of

$('#newLectureSort').hide()

it should be

$('#newLectureSort').show()

Zugang zu Vorlesungen über Zugangscode

Manche Dozent*innen weichen auf Moodle aus, da MaMpf und damit auch Vorlesungsinhalte, etc. allen, auch Universitätsexternen, zugänglich ist.

Wäre es denkbar, entweder für die Registrierung im MaMpf eine Uni-ID vorrauszusetzen, möglicherweise unpraktisch für Erstis die noch keine Uni-ID haben, oder einzelne Vorlesungen optional mit einem Zugangscode auszustatten, sodass, wenn das von demder Dozentin gewünscht ist, die Vorlesungsinhalte für Nicht-Hörer*innen zu verstecken?

Layoutfehler auf der mobilen Website

An machen Stellen auf der mobilen Version von MamPf sehen Dinge nicht sehr schön aus:

  • Lange Tags werden nicht umgebrochen
    screenshot_20190207-175417

  • Der "Alle Erledigen" Button für Benachrichtungen hängt komisch rum
    screenshot_20190207-174130
    screenshot_20190207-174136

  • Dropdown-Menüs, die sich zur Seite öffnen, passen bisweilen nicht auf den Bildschirm
    screenshot_20190207-225937

Deprecation warning in the sunspot_rails gem

mampf_1        | /usr/local/bundle/gems/sunspot_rails-2.5.0/lib/sunspot/rails/searchable.rb:267: warning: Using the last argument as keyword parameters is deprecated;
maybe ** should be added to the call

Livestreaming

Es wäre toll, wenn es möglich wäre, Vorlesungen live zu übertragen.

Dabei sollte es für einen Assistenten/StudentIn möglich sein, möglichst live die Videos zu taggen.

Neben den technischen Voraussetzungen sollte man auch juristische Bedingungen vorher klären, da es sich ja in gewisserweise um eine wiederkehrende Sendung mit signifikanter Zuschauerzahl handelt (Rundfunkstaatsvertrag).

Dieses Issue ist nur als Idee zu verstehen und nicht dringend.


It would be great if lectures could be broadcasted.

While streaming assistants or students should be able to livetag (#221).

Beside technical prerequisites one should ask some lawyer for advice, whether the number of students is significant and therefore be subject to the Rundfunkstaatsvertrag.

This issue is not pressing and only an idea.

XKCD Mouseover bei Selbstest fragen

Das Mouseover bei den XKCD Comics ist ein wichtiger Teil des Witzes. Bei den Selbstestfragen wird aber nur das Bild vom XKCD Comic angezeigt und das Mouseover funktioniert nicht.

Module selection & page offset on mobile devices

current state ❗

Screenshot_20191209-023021_Samsung Internet

expected behavior 💯

  • the selection buttons do not differ in size
  • the selection buttons are aligned on mid level to the search bar
  • there is equal spacing between the search bar and the 2 buttons

🐍 👨‍🚒 🥇

Windows line endings

Das einzige, was man unter Windows beachten muss, ist, dass man

git config --global core.autocrlf false

vor den Installationsaktivitäten mit Git und docker setzt. Das sollten wir wahrscheinlich noch in install.md als Hinweis reinsetzen (oder?). Wenn ich es richtig verstehe, ist die Empfehlung fürs Weiterarbeiten dann aber wieder ein

git config --global core.autocrlf true
zu machen.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.