GithubHelp home page GithubHelp logo

justinhunt / moodle-assign_submission_onlinepoodll Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 5.0 185 KB

The PoodLL assignment submission plugin for Moodle 2.3 and above

PHP 90.37% JavaScript 6.43% CSS 1.15% Mustache 2.05%

moodle-assign_submission_onlinepoodll's People

Contributors

justinhunt avatar trevor-c avatar

Watchers

 avatar  avatar  avatar  avatar

moodle-assign_submission_onlinepoodll's Issues

Online PoodLL Submissions are lost in the course/activity restoration process

Hi there,

It seems Online PoodLL submissions are lost in the course/activity restoration process.
Here are the steps to reproduce :

  • Create 2 new courses with both 1 teacher and 1 student enrolled (They must be the same users in both courses).
  • As the teacher in course 1, create an assignment with submission type "Online PoodLL"
  • As the student, Record and submit the assignment
  • As an administrator, create a backup of course 1 with user data
  • Restore course 1 in course 2 (use "Delete the contents of the existing course and then restore")
  • You can see that the student submission is no longer there

I checked the PoodLL feedback plugin, and everything works fine there!
Also, the tests were made with Moodle 2.5.

Great plugin by the way! Very useful to us!

Jean-Philippe

Poodll Submissions in Safari

Online Poodll submissions
Release 3.1.7 (Build 2021022800)

We are encountering an issue in safari with the latest release.

  • Playback error of submitted file on Safari (same file playable on Chrome) when file was recorded on Chrome. No playback error on Safari when file was also recorded on Safari. File recorded on Safari also plays normally on Chrome.
  • On Safari, the “pause” button is ineffective--the recording keeps going and the “continue” button is grayed out. Furthermore, the recorded file is displayed as being 00:00:00 in length but when you click play it does play correctly and can be submitted.

Tested on
Safari Version 14.0.3 (15610.4.3.1.6, 15610)
macOS Catalina Version 10.15.7 (19H512)

Cannot save assignments - You must not attach more than 1 files here

Hi, some teachers have reported a strange bug where they cannot save an assignment in Moodle. This bug seemed to appear randomly after editing some h5p content. It affects only one teacher. Other teachers can save the same assignment. Here is a forum which discuss the bug in more details.
https://moodle.org/mod/forum/discuss.php?d=424457

After much investigation, I was able to reproduce it and debug to see what was going on. What I found was that the plugin assignsubmission_onlinepoodll has a filemanager type element called "backimage". When saving an assignment which has no backimage such as a new assignment for example and when the "Online Poodll" submission type is not selected, the backimage element is hidden and it is assigned a null default value. Then, when Moodle comes to validate the form it checks the number of draft files assigned to this element VS the maximum number of authorized files which is 1 in this case. The DB request checks in the mdl_files table in search for the draft files which it thinks are associated with this element based on the user context (which is why it affects only one user) and the itemid which it takes from the value of the filemanager element. Since our value is null (0) then all draft files from this particular user with an itemid = 0 are considered as backimages then the error message appear and the assignment cannot be saved. We have to select the "Online Poodll" submission type to see the message since the backimage element is hidden.

My understanding is that the "backimage" element should be assigned a value given by the Moodle function file_get_unused_draft_itemid() which is how the toHtml() function of the filemanager element use to
assign an id to the element when it is rendered. That explains why the bug only happens when the backimage element is hidden. This value would then be used by Moodle to look for the right draft file with
itemid = element value.

Also the reason why this bug was going away on its own is that Moodle periodically delete old draft files in a cron job.

Error preventing the save of the assignment
assignsubmission_onlinepoodll error message

Some draft files with itemid 0 created by core_h5p for the user context
core_h5p draft files

Moodle filemanager element maxfiles validation. It looks for all draft files in the current user context with itemid = $element->getValue()
Moodle filemanager maxfiles check

OnlinePoodll get_settings function set the default value for backimage element to $backimage which is null if no entry exists in the mdl_assign_plugin_config for this assignement and onlinepoodll plugin. The element value is then 0.
assignsubmission_onlinepoodll backimage

I tried to insert this code in locallib.php line 107 just under $backimage = $this->get_config('backimage'); to see if it would fix the bug and it does. But I'm not sure if its the way to do it...
if(empty($backimage)) { require_once("$CFG->libdir/filelib.php"); $backimage = file_get_unused_draft_itemid(); }

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.