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

Replace add_to_log with an event trigger - mod_survey

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.6
    • Fix Version/s: 2.7
    • Component/s: Survey
    • Labels:
    • Testing Instructions:
      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
    • Affected Branches:
      MOODLE_26_STABLE
    • Fixed Branches:
      MOODLE_27_STABLE
    • Pull Master Branch:
      wip-mdl-40919
    • Story Points:
      20
    • Sprint:
      BACKEND Sprint 11

      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_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);

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              rajeshtaneja Rajesh Taneja
              Reporter:
              abgreeve Adrian Greeve
              Peer reviewer:
              Petr Skoda
              Integrator:
              Damyon Wiese
              Tester:
              Michael de Raadt
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                12/May/14