Moodle
  1. Moodle
  2. MDL-38210

Error when running participation report for Workshop activity

    Details

    • Type: Bug Bug
    • Status: Development in progress
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 2.4.1, 2.5.5, 2.6.2, 2.7
    • Fix Version/s: None
    • Component/s: Reports, Workshop
    • Database:
      Microsoft SQL
    • Testing Instructions:
      Hide

      1. Enrol admin / teacher as a student in a course
      2. Create a workshop
      3. Setup accordingly
      4. Submit a submission
      5. Open participation report and view report on the workshop module
      6. Multiple views for the admin / teacher
      7. Post for the admin / teacher

      Show
      1. Enrol admin / teacher as a student in a course 2. Create a workshop 3. Setup accordingly 4. Submit a submission 5. Open participation report and view report on the workshop module 6. Multiple views for the admin / teacher 7. Post for the admin / teacher
    • Affected Branches:
      MOODLE_24_STABLE, MOODLE_25_STABLE, MOODLE_26_STABLE, MOODLE_27_STABLE
    • Pull from Repository:
    • Pull 2.6 Branch:
      mdl38210-moodle26
    • Pull Master Branch:
      mdl38210-master

      Description

      When I try and run a participation report for a Workshop activity (which does have submissions), I receive the following error message:

      Module workshop is missing the code needed to perform this function

      Debugging reveals the following stack trace:

      Debug info:
      Error code: modulemissingcode
      Stack trace:
      line 467 of /lib/setuplib.php: moodle_exception thrown
      line 173 of /report/participation/index.php: call to print_error()

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            David Mudrak added a comment -

            Good catch! Thanks for reporting this. I can confirm that Workshop 2.x has never had required workshop_get_view_actions() and workshop_get_post_actions() callbacks. And nobody has noticed since Moodle 2.0 :-o

            Show
            David Mudrak added a comment - Good catch! Thanks for reporting this. I can confirm that Workshop 2.x has never had required workshop_get_view_actions() and workshop_get_post_actions() callbacks. And nobody has noticed since Moodle 2.0 :-o
            Hide
            Tim Lock added a comment -

            Hi David,

            Any progress on this patch?

            Show
            Tim Lock added a comment - Hi David, Any progress on this patch?
            Hide
            Tim Lock added a comment -

            Added github links.

            Show
            Tim Lock added a comment - Added github links.
            Hide
            CiBoT added a comment -

            Results for MDL-38210

            Show
            CiBoT added a comment - Results for MDL-38210 Remote repository: https://github.com/tlock/moodle.git Remote branch mdl38210-moodle25 to be integrated into upstream MOODLE_25_STABLE Executed job http://integration.moodle.org/job/Precheck%20remote%20branch/2681 Error: The mdl38210-moodle25 branch at https://github.com/tlock/moodle.git exceeds the maximum number of commits ( 18 > 15) Remote branch mdl38210-moodle26 to be integrated into upstream MOODLE_26_STABLE Executed job http://integration.moodle.org/job/Precheck%20remote%20branch/2682 Error: The mdl38210-moodle26 branch at https://github.com/tlock/moodle.git exceeds the maximum number of commits ( 28 > 15) Remote branch mdl38210-master to be integrated into upstream master Executed job http://integration.moodle.org/job/Precheck%20remote%20branch/2683 Error: The mdl38210-master branch at https://github.com/tlock/moodle.git exceeds the maximum number of commits ( 90 > 15)
            Hide
            Ankit Agarwal added a comment -

            Hi,
            You might want to keep an eye on the changes in MDL-41283, you might have to update your master branch based on MDL-41283.

            Ps:- I have not reviewed the full code.

            Cheers

            Show
            Ankit Agarwal added a comment - Hi, You might want to keep an eye on the changes in MDL-41283 , you might have to update your master branch based on MDL-41283 . Ps:- I have not reviewed the full code. Cheers
            Hide
            David Mudrak added a comment -

            Good catch on MDL-41283 in progress. However, I'm not sure if rebasing against a "wip" branch is a good idea.

            Show
            David Mudrak added a comment - Good catch on MDL-41283 in progress. However, I'm not sure if rebasing against a "wip" branch is a good idea.
            Hide
            David Mudrak added a comment -

            Thanks for your work on this Tim. I have some things to discuss.

            • Firstly, I still have a feeling that the current behaviour of the Participation report is wrong. It should not die just because some activity module does not implement callbacks it expects. It should throw a DEBUG_NORMAL message and skip. But that's another issue.
            • Workshop logs more actions (like 'view example' or 'add assessment') than you included in the patch. Did you intentionally selected just some of them? If so, what was the criterion?
            • WRT the coding style, I would like to keep space after commas and some note in the phpDoc block that these two functions are used by the participation report.
            Show
            David Mudrak added a comment - Thanks for your work on this Tim. I have some things to discuss. Firstly, I still have a feeling that the current behaviour of the Participation report is wrong. It should not die just because some activity module does not implement callbacks it expects. It should throw a DEBUG_NORMAL message and skip. But that's another issue. Workshop logs more actions (like 'view example' or 'add assessment') than you included in the patch. Did you intentionally selected just some of them? If so, what was the criterion? WRT the coding style, I would like to keep space after commas and some note in the phpDoc block that these two functions are used by the participation report.
            Hide
            Ankit Agarwal added a comment -

            Yup, it is being changed a lot as we speak, would be nice to wait for a week or so for that to be integrated, before rebasing and pushing this forward.

            Show
            Ankit Agarwal added a comment - Yup, it is being changed a lot as we speak, would be nice to wait for a week or so for that to be integrated, before rebasing and pushing this forward.
            Hide
            David Mudrak added a comment -

            OK, let's wait then. I believe that the code freeze does not apply to this (as this is a bug, not a new feature) and the patch will be pretty trivial.

            Show
            David Mudrak added a comment - OK, let's wait then. I believe that the code freeze does not apply to this (as this is a bug, not a new feature) and the patch will be pretty trivial.
            Hide
            Tim Lock added a comment -

            Updated github links accordingly.

            I picked the main activities in the Moodle logs which I have included more now.

            Show
            Tim Lock added a comment - Updated github links accordingly. I picked the main activities in the Moodle logs which I have included more now.
            Hide
            CiBoT added a comment -
            Show
            CiBoT added a comment - Results for MDL-38210 Remote repository: https://github.com/tlock/moodle.git Remote branch mdl38210-moodle25 to be integrated into upstream MOODLE_25_STABLE Executed job http://integration.moodle.org/job/Precheck%20remote%20branch/2703 Details: http://integration.moodle.org/job/Precheck%20remote%20branch/2703/artifact/work/smurf.html Remote branch mdl38210-moodle26 to be integrated into upstream MOODLE_26_STABLE Executed job http://integration.moodle.org/job/Precheck%20remote%20branch/2704 Details: http://integration.moodle.org/job/Precheck%20remote%20branch/2704/artifact/work/smurf.html Remote branch mdl38210-master to be integrated into upstream master Executed job http://integration.moodle.org/job/Precheck%20remote%20branch/2705 Details: http://integration.moodle.org/job/Precheck%20remote%20branch/2705/artifact/work/smurf.html
            Hide
            David Mudrak added a comment -

            Thanks Tim. Looking at mod/workshop/db/log.php it seems that most of relevant actions are now returned

            $logs = array(
                // workshop instance log actions
                array('module'=>'workshop', 'action'=>'add', 'mtable'=>'workshop', 'field'=>'name'),
                array('module'=>'workshop', 'action'=>'update', 'mtable'=>'workshop', 'field'=>'name'),
                array('module'=>'workshop', 'action'=>'view', 'mtable'=>'workshop', 'field'=>'name'),
                array('module'=>'workshop', 'action'=>'view all', 'mtable'=>'workshop', 'field'=>'name'),
                // submission log actions
                array('module'=>'workshop', 'action'=>'add submission', 'mtable'=>'workshop_submissions', 'field'=>'title'),
                array('module'=>'workshop', 'action'=>'update submission', 'mtable'=>'workshop_submissions', 'field'=>'title'),
                array('module'=>'workshop', 'action'=>'view submission', 'mtable'=>'workshop_submissions', 'field'=>'title'),
                // assessment log actions
                array('module'=>'workshop', 'action'=>'add assessment', 'mtable'=>'workshop_submissions', 'field'=>'title'),
                array('module'=>'workshop', 'action'=>'update assessment', 'mtable'=>'workshop_submissions', 'field'=>'title'),
                // example log actions
                array('module'=>'workshop', 'action'=>'add example', 'mtable'=>'workshop_submissions', 'field'=>'title'),
                array('module'=>'workshop', 'action'=>'update example', 'mtable'=>'workshop_submissions', 'field'=>'title'),
                array('module'=>'workshop', 'action'=>'view example', 'mtable'=>'workshop_submissions', 'field'=>'title'),
                // example assessment log actions
                array('module'=>'workshop', 'action'=>'add reference assessment', 'mtable'=>'workshop_submissions', 'field'=>'title'),
                array('module'=>'workshop', 'action'=>'update reference assessment', 'mtable'=>'workshop_submissions', 'field'=>'title'),
                array('module'=>'workshop', 'action'=>'add example assessment', 'mtable'=>'workshop_submissions', 'field'=>'title'),
                array('module'=>'workshop', 'action'=>'update example assessment', 'mtable'=>'workshop_submissions', 'field'=>'title'),
                // grading evaluation log actions
                array('module'=>'workshop', 'action'=>'update aggregate grades', 'mtable'=>'workshop', 'field'=>'name'),
                array('module'=>'workshop', 'action'=>'update clear aggregated grades', 'mtable'=>'workshop', 'field'=>'name'),
                array('module'=>'workshop', 'action'=>'update clear assessments', 'mtable'=>'workshop', 'field'=>'name'),
            );
            

            I think that "update assessment" should be returned too.

            But. I must admit I'm a bit confused by inconsistencies with what kind of actions are being returned here by various modules. For example, the plain "view" is considered as a "get" action by the Quiz while not by the new Assignment. Actions like "add" (when new instance is created) do not seem to be considered as relevant participation actions.

            It would be good to actually talk a bit about what the Participation report is even considered to display.

            Show
            David Mudrak added a comment - Thanks Tim. Looking at mod/workshop/db/log.php it seems that most of relevant actions are now returned $logs = array( // workshop instance log actions array('module'=>'workshop', 'action'=>'add', 'mtable'=>'workshop', 'field'=>'name'), array('module'=>'workshop', 'action'=>'update', 'mtable'=>'workshop', 'field'=>'name'), array('module'=>'workshop', 'action'=>'view', 'mtable'=>'workshop', 'field'=>'name'), array('module'=>'workshop', 'action'=>'view all', 'mtable'=>'workshop', 'field'=>'name'), // submission log actions array('module'=>'workshop', 'action'=>'add submission', 'mtable'=>'workshop_submissions', 'field'=>'title'), array('module'=>'workshop', 'action'=>'update submission', 'mtable'=>'workshop_submissions', 'field'=>'title'), array('module'=>'workshop', 'action'=>'view submission', 'mtable'=>'workshop_submissions', 'field'=>'title'), // assessment log actions array('module'=>'workshop', 'action'=>'add assessment', 'mtable'=>'workshop_submissions', 'field'=>'title'), array('module'=>'workshop', 'action'=>'update assessment', 'mtable'=>'workshop_submissions', 'field'=>'title'), // example log actions array('module'=>'workshop', 'action'=>'add example', 'mtable'=>'workshop_submissions', 'field'=>'title'), array('module'=>'workshop', 'action'=>'update example', 'mtable'=>'workshop_submissions', 'field'=>'title'), array('module'=>'workshop', 'action'=>'view example', 'mtable'=>'workshop_submissions', 'field'=>'title'), // example assessment log actions array('module'=>'workshop', 'action'=>'add reference assessment', 'mtable'=>'workshop_submissions', 'field'=>'title'), array('module'=>'workshop', 'action'=>'update reference assessment', 'mtable'=>'workshop_submissions', 'field'=>'title'), array('module'=>'workshop', 'action'=>'add example assessment', 'mtable'=>'workshop_submissions', 'field'=>'title'), array('module'=>'workshop', 'action'=>'update example assessment', 'mtable'=>'workshop_submissions', 'field'=>'title'), // grading evaluation log actions array('module'=>'workshop', 'action'=>'update aggregate grades', 'mtable'=>'workshop', 'field'=>'name'), array('module'=>'workshop', 'action'=>'update clear aggregated grades', 'mtable'=>'workshop', 'field'=>'name'), array('module'=>'workshop', 'action'=>'update clear assessments', 'mtable'=>'workshop', 'field'=>'name'), ); I think that "update assessment" should be returned too. But. I must admit I'm a bit confused by inconsistencies with what kind of actions are being returned here by various modules. For example, the plain "view" is considered as a "get" action by the Quiz while not by the new Assignment. Actions like "add" (when new instance is created) do not seem to be considered as relevant participation actions. It would be good to actually talk a bit about what the Participation report is even considered to display.

              People

              • Votes:
                2 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated: