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

Replace add_to_log with an event trigger - mod_survey

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 2.7
    • 2.6
    • Survey
    • MOODLE_26_STABLE
    • MOODLE_27_STABLE
    • wip-mdl-40919
    • Hide

      Test 1:

      1. Run phpunit mod/survey/tests/events_test.php

      Test 2:

      1. Create a survey and view it
      2. Change the view.php to index.php and the id to the id of the course in the URL.
      3. Visit <yoursite>/report/log/index.php?id=1 and click 'Get these logs'.
      4. Ensure there are two logs; "survey view all" and "survey view form"
      5. As student submit survey and log back in as admin
      6. View survey report (Survey administration -> Response reports -> Questions)
      7. In live log report you should see "survey view report"
      8. Download survey report (Survey administration -> Response reports -> Download results and click "Download in ODS format) and you should see "survey download" log
      Show
      Test 1: Run phpunit mod/survey/tests/events_test.php Test 2: Create a survey and view it Change the view.php to index.php and the id to the id of the course in the URL. Visit <yoursite>/report/log/index.php?id=1 and click 'Get these logs'. Ensure there are two logs; "survey view all" and "survey view form" As student submit survey and log back in as admin View survey report (Survey administration -> Response reports -> Questions) In live log report you should see "survey view report" Download survey report (Survey administration -> Response reports -> Download results and click "Download in ODS format) and you should see "survey download" log
    • 20
    • BACKEND Sprint 11

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

      mod_survey
      /mod/survey/report.php:95: add_to_log($course->id, "survey", "view report", "report.php?id=$cm->id", "$survey->id", $cm->id);
      /mod/survey/index.php:17: add_to_log($course->id, "survey", "view all", "index.php?id=$course->id", "");
      /mod/survey/save.php:57: add_to_log($course->id, "survey", "submit", "view.php?id=$cm->id", "$survey->id", "$cm->id");
      /mod/survey/view.php:99: add_to_log($course->id, "survey", "view graph", "view.php?id=$cm->id", $survey->id, $cm->id);
      /mod/survey/view.php:136: add_to_log($course->id, "survey", "view form", "view.php?id=$cm->id", $survey->id, $cm->id);
      /mod/survey/download.php:54:add_to_log($course->id, "survey", "download", $PAGE->url->out(), "$survey->id", $cm->id);

            rajeshtaneja Rajesh Taneja
            abgreeve Adrian Greeve
            Petr Skoda Petr Skoda
            Damyon Wiese Damyon Wiese
            Michael de Raadt Michael de Raadt
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

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