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

Add missing validation to events.

XMLWordPrintable

    • MOODLE_26_STABLE, MOODLE_27_STABLE, MOODLE_28_STABLE
    • MOODLE_27_STABLE
    • MDL-45445_master
    • Hide
      Disclaimer

      It's specially important to perform all the tests under 27_STABLE, to ensure we are not introducing any "validation regression" there.

      Test 1
      1. Run all unit tests and ensure they all pass.
      2. Wait for behat results not throwing any unexpected validation msg.
      Test 2
      1. Log in as an administrator.
      2. Visit <yoursite>/admin/settings.php?section=optionalsubsystems.
      3. Turn on ‘Enable web services’ and 'Enable completion tracking’.
      4. Visit <yoursite>/admin/settings.php?section=externalservices and click ‘Edit’ next to ‘Moodle mobile web service’.
      5. Set the 'Moodle mobile web service’ to enabled.
      6. Visit <yoursite>/login/token.php?username=<username>&password=<password>&service=moodle_mobile_app and ensure you get a proper display (eg. “ {"token":"c6bd6b76ecadfda3ba356ec30b9a2f30”}

        ”) (tests \core\event\webservice_token_created event).

      7. Create a course and enable completion tracking.
      8. Enrol a few users into this course.
      9. Visit <yoursite>/user/index.php?id=<courseid> to view the users (tests \core\event\user_list_viewed event).
      10. Click on one of the names of the users (tests \core\event\user_profile_viewed event).
      11. Create a lesson.
      12. Add an essay question.
      13. Log in as a student and answer the essay.
      14. As an administrator click on the lesson then ‘Grade essays’ tab.
      15. Click on the essay (tests \mod_lesson\event\essay_attempt_viewed event).
      16. Create a scorm.
      17. Log in as a student and attempt the scorm.
      18. Click to view the scorm and then the ‘Reports’ tab (tests \mod_scorm\event\report_viewed event).
      19. Click on the number under ‘Attempt’ for the user you attempted the scorm with (tests \mod_scorm\event\user_report_viewed event).
      20. Click on the link “Track details” (tests \mod_scorm\event\tracks_viewed).
      21. In the URL change userreport.php to userreportinteractions.php and click enter (tests mod_scorm\event\interactions_viewed event).
      22. Visit <yoursite>/mod/scorm/loadsco.php?id=<coursemoduleid>&scoid=2 (tests mod_scorm\event\sco_launched.php event).
      23. Create a workshop activity.
      24. Click on the workshop and complete all the tasks in ‘Setup phase’.
      25. Switch to the ‘Submission phase’.
      26. Log in as a student.
      27. Click on ‘Start preparing your submission’ and submit the form (tests \mod_workshop\event\submission_created and submission_viewed event).
      28. Click to ‘Edit submission’ and update it (tests \mod_workshop\event\submission_updated event).
      29. Log back in as the admin and view the workshop.
      30. Switch the workshop to the ‘Assessment phase’.
      31. Click on the submission and give a grade, comment and submit (tests \mod_workshop\event\submission_assessed event).
      32. Click on the submission again.
      33. Click on ‘Re-assess’ and update what you put in earlier and click submit (tests \mod_workshop\event\submission_reassessed event).
      34. Change the workshop phase to “Grading evaluation phase”.
      35. Click on the link ‘Workshop toolbox’ and click ‘Clear all aggregated grades’ (tests \mod_workshop\event\assessment_evaluations_reset event).
      36. Click on the the link ‘Workshop toolbox’ and click on ‘Clear assessments’ (tests \mod_workshop\event\assessments_reset event).
      37. Run the cron.
      38. Visit <yoursite>/sm/report/completion/user.php?id=<userid>&course=<courseid> where courseid is the id of the course you have been working on (tests \report_completion\event\user_report_viewed event).
      Show
      Disclaimer It's specially important to perform all the tests under 27_STABLE, to ensure we are not introducing any "validation regression" there. Test 1 Run all unit tests and ensure they all pass. Wait for behat results not throwing any unexpected validation msg. Test 2 Log in as an administrator. Visit <yoursite>/admin/settings.php?section=optionalsubsystems. Turn on ‘Enable web services’ and 'Enable completion tracking’. Visit <yoursite>/admin/settings.php?section=externalservices and click ‘Edit’ next to ‘Moodle mobile web service’. Set the 'Moodle mobile web service’ to enabled. Visit <yoursite>/login/token.php?username=<username>&password=<password>&service=moodle_mobile_app and ensure you get a proper display (eg. “ {"token":"c6bd6b76ecadfda3ba356ec30b9a2f30”} ”) (tests \core\event\webservice_token_created event). Create a course and enable completion tracking. Enrol a few users into this course. Visit <yoursite>/user/index.php?id=<courseid> to view the users (tests \core\event\user_list_viewed event). Click on one of the names of the users (tests \core\event\user_profile_viewed event). Create a lesson. Add an essay question. Log in as a student and answer the essay. As an administrator click on the lesson then ‘Grade essays’ tab. Click on the essay (tests \mod_lesson\event\essay_attempt_viewed event). Create a scorm. Log in as a student and attempt the scorm. Click to view the scorm and then the ‘Reports’ tab (tests \mod_scorm\event\report_viewed event). Click on the number under ‘Attempt’ for the user you attempted the scorm with (tests \mod_scorm\event\user_report_viewed event). Click on the link “Track details” (tests \mod_scorm\event\tracks_viewed). In the URL change userreport.php to userreportinteractions.php and click enter (tests mod_scorm\event\interactions_viewed event). Visit <yoursite>/mod/scorm/loadsco.php?id=<coursemoduleid>&scoid=2 (tests mod_scorm\event\sco_launched.php event). Create a workshop activity. Click on the workshop and complete all the tasks in ‘Setup phase’. Switch to the ‘Submission phase’. Log in as a student. Click on ‘Start preparing your submission’ and submit the form (tests \mod_workshop\event\submission_created and submission_viewed event). Click to ‘Edit submission’ and update it (tests \mod_workshop\event\submission_updated event). Log back in as the admin and view the workshop. Switch the workshop to the ‘Assessment phase’. Click on the submission and give a grade, comment and submit (tests \mod_workshop\event\submission_assessed event). Click on the submission again. Click on ‘Re-assess’ and update what you put in earlier and click submit (tests \mod_workshop\event\submission_reassessed event). Change the workshop phase to “Grading evaluation phase”. Click on the link ‘Workshop toolbox’ and click ‘Clear all aggregated grades’ (tests \mod_workshop\event\assessment_evaluations_reset event). Click on the the link ‘Workshop toolbox’ and click on ‘Clear assessments’ (tests \mod_workshop\event\assessments_reset event). Run the cron. Visit <yoursite>/sm/report/completion/user.php?id=<userid>&course=<courseid> where courseid is the id of the course you have been working on (tests \report_completion\event\user_report_viewed event).

      Create two separate commits

      1) Add debugging messages for events that were introduced in 2.6 that require 'other' fields to be validated.
      2) Add exceptions for events introduced in 2.7 that require 'other' fields to be validated.

            markn Mark Nelson
            markn Mark Nelson
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Michael de Raadt Michael de Raadt
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

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