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

Replace add_to_log with an event trigger - mod_workshop

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 2.7
    • 2.6
    • Workshop
    • MOODLE_26_STABLE
    • MOODLE_27_STABLE
    • w06_MDL-40921_m27_workshopevents
    • Hide
      • Check that there are no errors while running through the testing instructions.

      Testing

      1. Create a workshop activity.
      2. Complete all the suggested requirements for the setup phase (green ticks will appear when you have met the requirements).
      3. Move the workshop to the submission phase.
      4. Make some submissions as a few different students.
      5. log back in as a teacher / manager / admin and check the "All submissions" section of mod/workshop/view.php
      6. Allocate submissions to students and then move the workshop into the assessment phase.
      7. Log in as different students and assess other submissions.
      8. Log in as a teacher and move the workshop through the Grading evaluation phase and the closed phase.

      Unit tests

      1. run phpunit mod/workshop/tests/events_test.php
      2. run phpunit mod/workshop/tests/locallib_test.php
      • Ensure that there are no errors when running these tests.
      Show
      Check that there are no errors while running through the testing instructions. Testing Create a workshop activity. Complete all the suggested requirements for the setup phase (green ticks will appear when you have met the requirements). Move the workshop to the submission phase. Make some submissions as a few different students. log back in as a teacher / manager / admin and check the "All submissions" section of mod/workshop/view.php Allocate submissions to students and then move the workshop into the assessment phase. Log in as different students and assess other submissions. Log in as a teacher and move the workshop through the Grading evaluation phase and the closed phase. Unit tests run phpunit mod/workshop/tests/events_test.php run phpunit mod/workshop/tests/locallib_test.php Ensure that there are no errors when running these tests.
    • 40
    • BACKEND Sprint 10

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

      mod_workshop
      /mod/workshop/index.php:36: add_to_log($course->id, 'workshop', 'view all', "index.php?id=$course->id", '');
      /mod/workshop/locallib.php:1525: add_to_log($this->course->id, 'workshop', $action, $logurl, $info, $this->cm->id);
      check out this function:
      /mod/workshop/locallib.php:1514 log()
      Check out these class to the log function
      /mod/workshop/aggregate.php:56 $workshop->log('update aggregate grades');
      /mod/workshop/assessment.php:162 $workshop->log('add assessment', $workshop->assess_url($assessment->id), $assessment->submissionid);
      /mod/workshop/assessment.php:164 $workshop->log('update assessment', $workshop->assess_url($assessment->id), $assessment->submissionid);
      mod/workshop/exassessment.php:92 $workshop->log('add reference assessment', $workshop->exassess_url($assessment->id), $assessment->submissionid);
      mod/workshop/exassessment.php:94 $workshop->log('update reference assessment', $workshop->exassess_url($assessment->id), $assessment->submissionid);
      mod/workshop/exassessment.php:98 $workshop->log('add example assessment', $workshop->exassess_url($assessment->id), $assessment->submissionid);
      mod/workshop/exassessment.php:100 $workshop->log('update example assessment', $workshop->exassess_url($assessment->id), $assessment->submissionid);
      mod/workshop/exsubmission.php:60 $workshop->log('view example', $workshop->exsubmission_url($example->id), $example->id);
      mod/workshop/exsubmission.php:165 $workshop->log('add example', $workshop->exsubmission_url($example->id), $example->id);
      mod/workshop/exsubmission.php:167 $workshop->log('update example', $workshop->exsubmission_url($example->id), $example->id);
      mod/workshop/lib.php:950 $workshop->log('update switch phase', $workshop->view_url(), $workshop->phase);
      mod/workshop/submission.php:54 $workshop->log('view submission', $workshop->submission_url($submission->id), $submission->id);
      mod/workshop/submission.php:192 $workshop->log('add submission', $workshop->submission_url($submission->id), $submission->id);
      mod/workshop/submission.php:194 $workshop->log('update submission', $workshop->submission_url($submission->id), $submission->id);
      mod/workshop/toolbox.php:44 $workshop->log('update clear aggregated grades');
      mod/workshop/toolbox.php:51 $workshop->log('update clear assessments');
      mod/workshop/view.php:57 $workshop->log('view');
      mod/workshop/view.php:74 $workshop->log('update switch phase', $workshop->view_url(), $workshop->phase);
      Also check out the following
      mod/workshop/allocation/scheduled/lib.php:237: $result->log($data->settings, 'debug');
      mod/workshop/allocation/random/lib.php:111: $result->log(get_string('numofrandomlyallocatedsubmissions', 'workshopallocation_random', count($randomallocations)));
      mod/workshop/allocation/random/lib.php:117: $result->log(get_string('numofselfallocatedsubmissions', 'workshopallocation_random', count($selfallocations)));
      mod/workshop/allocation/random/lib.php:121: $result->log(get_string('noallocationtoadd', 'workshopallocation_random'), 'info');
      mod/workshop/allocation/random/lib.php:155: $result->log(get_string('allocationaddeddetail', 'workshopallocation_random', $a), 'ok', 1);
      mod/workshop/allocation/random/lib.php:157: $result->log(get_string('allocationreuseddetail', 'workshopallocation_random', $a), 'ok', 1);
      mod/workshop/allocation/random/lib.php:165: $result->log(get_string('numofdeallocatedassessment', 'workshopallocation_random', count($delassessments)), 'info');
      mod/workshop/allocation/random/lib.php:175: $result->log(get_string('allocationdeallocategraded', 'workshopallocation_random', $a), 'error', 1);
      mod/workshop/allocation/random/lib.php:178: $result->log(get_string('assessmentdeleteddetail', 'workshopallocation_random', $a), 'info', 1);
      mod/workshop/allocation/random/lib.php:452: $result->log(get_string('resultnumperauthor', 'workshopallocation_random', $numofreviews), 'info');
      mod/workshop/allocation/random/lib.php:459: $result->log(get_string('resultnumperreviewer', 'workshopallocation_random', $numofreviews), 'info');
      mod/workshop/allocation/random/lib.php:512: $result->log('processing circle group id ' . $circlegroupid, 'debug');
      mod/workshop/allocation/random/lib.php:520: $result->log('iteration ' . $requiredreviews, 'debug');
      mod/workshop/allocation/random/lib.php:523: $result->log('skipping circle id ' . $circleid, 'debug');
      mod/workshop/allocation/random/lib.php:526: $result->log('processing circle id ' . $circleid, 'debug');
      mod/workshop/allocation/random/lib.php:539: $result->log(get_string('resultnomorepeers', 'workshopallocation_random'), 'error', 1);
      mod/workshop/allocation/random/lib.php:546: $result->log(get_string('resultnomorepeersingroup', 'workshopallocation_random'), 'error', 1);
      mod/workshop/allocation/random/lib.php:567: $result->log(get_string('resultnotenoughpeers', 'workshopallocation_random'), 'error', 1);
      mod/workshop/allocation/random/lib.php:570: $result->log('next square should be from group id ' . $targetgroup, 'debug', 1);
      mod/workshop/allocation/random/lib.php:578: $result->log('unable to find an available square. trying another group', 'debug', 1);
      mod/workshop/allocation/random/lib.php:582: $result->log('target square = ' . $targetsquare, 'debug', 1);
      mod/workshop/allocation/random/lib.php:587: $result->log('increasing square workload to ' . $squareworkload[$targetsquare], 'debug', 1);
      mod/workshop/allocation/random/lib.php:595: $result->log('increasing group workload to ' . $squaregroupsworkload[$targetgroup], 'debug', 1);

            skodak Petr Skoda
            abgreeve Adrian Greeve
            Petr Skoda Petr Skoda
            Damyon Wiese Damyon Wiese
            Marina Glancy Marina Glancy
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.