Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-40055

Replace add_to_log with an event trigger - mod_assign

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      Test pre-requisites

      • An assignment with some submissions

      Some of the tests will require modification of the activity settings

      Test 1

      1. Make sure there is an entry in mdl_log after the following actions, and no errors occur.
        1. Download all submissions
        2. Granting an time extension to a student
        3. Locking a submission
        4. Unlocking a submission
        5. Revealing the identities of the students
        6. Reverting a submission to a draft
        7. Assigning a marker to a submission
        8. Setting the workflow state of a submission
        9. Starting a submission from a previous attempt
        10. Accepting the submission statement
        11. Uploading a submission which would still be a draft after upload
        12. Grading a submission

      Test 2

      1. Use an existing plagiarism plugin, and ensure it still works.
      Show
      Test pre-requisites An assignment with some submissions Some of the tests will require modification of the activity settings Test 1 Make sure there is an entry in mdl_log after the following actions, and no errors occur. Download all submissions Granting an time extension to a student Locking a submission Unlocking a submission Revealing the identities of the students Reverting a submission to a draft Assigning a marker to a submission Setting the workflow state of a submission Starting a submission from a previous attempt Accepting the submission statement Uploading a submission which would still be a draft after upload Grading a submission Test 2 Use an existing plagiarism plugin, and ensure it still works.
    • Affected Branches:
      MOODLE_25_STABLE
    • Fixed Branches:
      MOODLE_26_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-40055-master
    • Story Points:
      40
    • Sprint:
      BACKEND Sprint 4

      Description

      Replace the add_to_log calls for the following area, with a call to the get_legacy_logdata function in the event class.

      mod/assign (26 calls)
      /mod/assign/index.php:35: add_to_log($course->id, 'assign', 'view all', 'index.php?id=$course->id', '');
      /mod/assign/locallib.php:2416: add_to_log($this->get_course()->id,

      investigate this function
      /mod/assign/locallib.php:2408: public function add_to_log($action = '', $info = '', $url='') {
      And these lines:
      /mod/assign/feedback/offline/locallib.php:167: $this->assignment->add_to_log('grade submission', $this->assignment->format_grade_for_log($grade));
      /mod/assign/feedback/offline/locallib.php:195: $this->assignment->add_to_log('save grading feedback', $logdesc);
      /mod/assign/locallib.php:2110: $this->add_to_log('view submission', $logmessage);
      /mod/assign/locallib.php:2133: $this->add_to_log('view feedback', $logmessage);
      /mod/assign/locallib.php:2392: $this->add_to_log('download all submissions', get_string('downloadall', 'assign'));
      /mod/assign/locallib.php:2810: $this->add_to_log('view grading form', $msg);
      /mod/assign/locallib.php:2846: $this->add_to_log('view', get_string('viewrevealidentitiesconfirm', 'assign'));
      /mod/assign/locallib.php:3059: $this->add_to_log('view submission grading table', $logmessage);
      /mod/assign/locallib.php:3146: $this->add_to_log('view submit assignment form', get_string('viewownsubmissionform', 'assign'));
      /mod/assign/locallib.php:3367: $this->add_to_log('view batch set marking workflow state', get_string('viewbatchsetmarkingworkflowstate', 'assign'));
      /mod/assign/locallib.php:3428: $this->add_to_log('view batch set marker allocation', get_string('viewbatchmarkingallocation', 'assign'));
      /mod/assign/locallib.php:3481: $this->add_to_log('view confirm submit assignment form', $logmessage);
      /mod/assign/locallib.php:3828: $this->add_to_log('view', get_string('viewownsubmissionstatus', 'assign'));
      /mod/assign/locallib.php:4493: $this->add_to_log('submission statement accepted', $logmessage);
      /mod/assign/locallib.php:4495: $this->add_to_log('submit for grading', $this->format_submission_for_log($submission));
      /mod/assign/locallib.php:4529: $this->add_to_log('grant extension', $userid);
      /mod/assign/locallib.php:4762: $this->add_to_log('grade submission', $this->format_grade_for_log($grade));
      /mod/assign/locallib.php:4811: $this->add_to_log('reveal identities', get_string('revealidentities', 'assign'));
      /mod/assign/locallib.php:4999: $this->add_to_log('submissioncopied', $this->format_submission_for_log($submission));
      /mod/assign/locallib.php:5105: $this->add_to_log('submission statement accepted', $logmessage);
      /mod/assign/locallib.php:5107: $this->add_to_log('submit', $this->format_submission_for_log($submission));
      /mod/assign/locallib.php:5613: $this->add_to_log('revert submission to draft', $logmessage);
      /mod/assign/locallib.php:5652: $this->add_to_log('lock submission', $logmessage);
      /mod/assign/locallib.php:5692: $this->add_to_log('set marking workflow state', $message);
      /mod/assign/locallib.php:5734: $this->add_to_log('set marking allocation', $message);
      /mod/assign/locallib.php:5774: $this->add_to_log('unlock submission', $logmessage);
      /mod/assign/locallib.php:5831: $this->add_to_log('grade submission', $this->format_grade_for_log($grade));

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              fred Frédéric Massart
              Reporter:
              abgreeve Adrian Greeve
              Peer reviewer:
              Adrian Greeve
              Integrator:
              Dan Poltawski
              Tester:
              Mark Nelson
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón, Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                18/Nov/13