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

Adding/modifying questions to/in the question bank is not logged

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      Automated Testing:

      • Run phpunit tests for questions (vendor/bin/phpunit core_question_events_testcase question/tests/events_test.php)

      Manual testing:

      • Create a question
      • Update a question
      • Move a question to another category
      • Preview a question
      • Delete a question
      • Import questions into the question bank
      • Export questions from the question bank
      • Create a category
      • Update a category
      • View the contents of a category
      • Delete a category

      (Perform each of these tasks in the category, course, and activity context) Make sure each action appears in the logs.

      back up and restore the course (including logs) used in the step above, verify that the log entries are restored correctly.

      Show
      Automated Testing: Run phpunit tests for questions (vendor/bin/phpunit core_question_events_testcase question/tests/events_test.php) Manual testing: Create a question Update a question Move a question to another category Preview a question Delete a question Import questions into the question bank Export questions from the question bank Create a category Update a category View the contents of a category Delete a category (Perform each of these tasks in the category, course, and activity context) Make sure each action appears in the logs. back up and restore the course (including logs) used in the step above, verify that the log entries are restored correctly.
    • Difficulty:
      Moderate
    • Affected Branches:
      MOODLE_23_STABLE, MOODLE_31_STABLE, MOODLE_32_STABLE, MOODLE_33_STABLE, MOODLE_34_STABLE, MOODLE_35_STABLE, MOODLE_36_STABLE, MOODLE_37_STABLE
    • Fixed Branches:
      MOODLE_37_STABLE
    • Epic Link:
    • Pull from Repository:
    • Pull Master Branch:
      MDL-36088-master
    • Story Points:
      40

      Description

      Adding questions through a quiz is logged, but I found that the action of adding a question to the question bank is not logged.

      Replication steps:

      1. Log in as a teacher
      2. Navigate to a course
      3. Navigate to Settings > Course admin > Question bank
      4. Create a new question
      5. Modify an existing question
      6. Navigate to Navigation > My courses > CourseXXX > Reports > Logs (or look in the log table in the DB)
      7. Click 'Get these logs'

      Expected result: Question bank changes should be shown

      Actual result: No entries for adding/modifying question bank questions are recorded

      Full list of missing events in question bank:

      • Creating a question
      • updating a question (should also be triggered when question is moved to a new category)
      • deleting a question
      • Duplicating a question
      • Updating a question category (should also be triggered when category is moved to another parent)
      • deleting a question category
      • Importing questions (separate event is optional but still requires question_created event for each individual question)
      • Exporting questions (note: crud=r)

      Oddly there is one existing event \core\event\question_category_created

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                27 Vote for this issue
                Watchers:
                19 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  20/May/19

                  Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 2 days, 45 minutes
                  2d 45m