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

Move "Require passing grade" completion option to core

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      Confirm behat and unit tests pass.

      Behat test provided.

      Before upgrade:

      Setup before upgrade - Requires db access:

      1. Install a moodle site based on the the latest weekly

        git checkout 411150a42465aab5d4f58923aa329b704315da0c

      2. Restore the course - backup-moodle2-course-52-c1_1-20210630-1158.mbz
      3. Enrol 2 students to the course
      4. As a student, attempt the quiz activity (Note the state of the activity completion)

      Upgrade Test:

      1. Checkout master

        git checkout master

      2. Upgrade the site
        1. CLI

           sudo -u apache /usr/bin/php admin/cli/upgrade.php 

        2. Via browser as admin
      3. Confirm no issues during upgrade
      4. Go to the course created earlier
      5. Go to the assignment and edit it's settings
      6. Confirm the completion criteria is still set as before
      7. Go to the quiz and edit it's settings
      8. Repeat #6
      9. Go to your db and confirm the following:
        1. For the quiz:
          1. The quiz table does not have a completionpass column
          2. The corresponding course_module record has completionusegrade and completionpassgrade set to 1
          3. completiongradeitemnumber is not null
        2. For the assignment
          1. The corresponding course_module record has completionusegrade set to 1 and completionpassgrade set to 0
      10. Log in as the student who completed the quiz
      11. Confirm the activity completion is the same

      Manual feature testing:

      Behat tests covers all activities. The following is for a smoke test.

      Setup

      1. As admin, enable completion tracking by the following:
        1. Administration > Site administration > Advanced features check the "Enable completion tracking" box
      2. Create a course with completion tracking enabled.
      3. Enrol 3 students into the course.
      4. Create an assignment with the following:
        1. Submission types - Online text
        2. Require students to click the submit button - Yes
        3. In Grade,
          1. Type - Point
          2. Maximum grade - 100
          3. Grading method - Simple direct grading
          4. Grade to pass - 50
        4. In Activity completion
          1. Completion tracking - 'Show activity as complete when conditions are met'
          2. Use grade - 'Student must receive a grade to complete this activity'
          3. Require grade - 'Student must receive a passing grade to complete this activity'
      5. The 3 students have submitted the assignment.

      Testing:

      1. Login as an admin/teacher
      2. Go to the course
      3. Go to the assignment and view all submissions
      4. Submit the following grades
        1. Student 1 - 40
        2. Student 2 - 50
        3. Student 3 - 60
      5. Login as the following students and confirm in the course page the corresponding completion state
        1. Student 1 - Assignment not completed - Require grade marked as failed, Require pass grade marked as todo
        2. Student 2 - Assignment completed - Require grade marked as done, Require pass grade marked as done
        3. Student 3 - Assignment completed - Require grade marked as done, Require pass grade marked as done
      6. As an admin, go to the course and edit the assignment settings
      7. Confirm, the Grade to pass field is disabled.
      8. Click on 'Unlock completion options' and set the 'Grade to Pass' to 55
      9. Save the form
      10. Run your site's cron <site>/admin/cron.php
      11. Login as the following students and confirm the corresponding completion state
        1. Student 1 - As per 5.1
        2. Student 2 - Assignment not completed - Require grade marked as failed, Require pass grade marked as todo
        3. Student 3 - As per 5.3
      12. As an admin, Click on 'Unlock completion options', set only 'Student must receive a grade to complete this activity', reset the 'Grade to pass' to 50 and save
      13. Run your site's cron <site>/admin/cron.php
      14. Login as the following students and confirm in the course page the corresponding completion state
        1. Student 1 - Assignment completed and 'Require grade' marked as failed
        2. Student 2 - Assignment completed and 'Require grade' marked as done
        3. Student 3 - Assignment completed and 'Require grade' marked as done
      15. Login as an admin and backup the assignment
      16. Restore the the backup into a new course
      17. Go to the restored assignment and edit it's settings
      18. Confirm that the activity completion criteria is correctly setup and matches the original assignment.

      Repeat the tests with the other activities which have completion enabled.

      Backup and Restore:

      1. Contd from previous test,
      2. Go to the course created previously
      3. Initiate backup of an activity via the course admin menu (https://docs.moodle.org/39/en/Course_backup)
      4. Continue through all the backup steps using default settings
      5. Once the backup is completed click on the continue button
      6. Once on the 'Restore course' page, click the restore link against the file in the 'Course backup area'
      7. Restore the file into the existing course
      8. Once the restore process is completed, go to the restored activity
      9. Edit the settings
      10. confirm the 'Activity completion' criteria matches the original activity.

      Legacy backup and restore of quiz :

      1. On an install with the patch
      2. Login as admin
      3. Go to Site Administration > Course > Restore course
      4. Upload the backup-moodle2-course-52-c1_1-20210630-1158.mbz
      5. Continue through the restore process with the default settings.
      6. Once completed go to the restored quiz
      7. Confirm the quiz settings matches up with the following:
        1. Confirm Completion tracking - Show activity as complete when conditions are met
        2. Confirm Student must receive a grade to complete this activity - Checked
        3. Confirm Student must receive a passing grade to complete this activity - Checked
      Show
      Confirm behat and unit tests pass. Behat test provided. Before upgrade: Setup before upgrade - Requires db access: Install a moodle site based on the the latest weekly git checkout 411150a42465aab5d4f58923aa329b704315da0c Restore the course -  backup-moodle2-course-52-c1_1-20210630-1158.mbz Enrol 2 students to the course As a student, attempt the quiz activity (Note the state of the activity completion) Upgrade Test: Checkout master git checkout master Upgrade the site CLI sudo -u apache /usr/bin/php admin/cli/upgrade.php Via browser as admin Confirm no issues during upgrade Go to the course created earlier Go to the assignment and edit it's settings Confirm the completion criteria is still set as before Go to the quiz and edit it's settings Repeat #6 Go to your db and confirm the following: For the quiz: The quiz table does not have a completionpass column The corresponding course_module record has completionusegrade and completionpassgrade set to 1 completiongradeitemnumber is not null For the assignment The corresponding course_module record has completionusegrade set to 1 and completionpassgrade set to 0 Log in as the student who completed the quiz Confirm the activity completion is the same Manual feature testing: Behat tests covers all activities. The following is for a smoke test. Setup As admin, enable completion tracking by the following: Administration > Site administration > Advanced features check the "Enable completion tracking" box Create a course with completion tracking enabled. Enrol 3 students into the course. Create an assignment with the following: Submission types - Online text Require students to click the submit button - Yes In Grade, Type - Point Maximum grade - 100 Grading method - Simple direct grading Grade to pass - 50 In Activity completion Completion tracking - 'Show activity as complete when conditions are met' Use grade - 'Student must receive a grade to complete this activity' Require grade - 'Student must receive a passing grade to complete this activity' The 3 students have submitted the assignment. Testing: Login as an admin/teacher Go to the course Go to the assignment and view all submissions Submit the following grades Student 1 - 40 Student 2 - 50 Student 3 - 60 Login as the following students and confirm  in the course page the corresponding completion state Student 1 - Assignment not completed - Require grade marked as failed, Require pass grade marked as todo Student 2 - Assignment completed - Require grade marked as done, Require pass grade marked as done Student 3 - Assignment completed - Require grade marked as done, Require pass grade marked as done As an admin, go to the course and edit the assignment settings Confirm , the Grade to pass field is disabled. Click on 'Unlock completion options' and set the 'Grade to Pass' to 55 Save the form Run your site's cron  <site>/admin/cron.php Login as the following students and confirm the corresponding completion state Student 1 - As per 5.1 Student 2 - Assignment not completed - Require grade marked as failed, Require pass grade marked as todo Student 3 - As per 5.3 As an admin, Click on 'Unlock completion options', set only 'Student must receive a grade to complete this activity', reset the 'Grade to pass' to 50 and save Run your site's cron  <site>/admin/cron.php Login as the following students and confirm  in the course page the corresponding completion state Student 1 - Assignment completed and 'Require grade' marked as failed Student 2 - Assignment completed and 'Require grade' marked as done Student 3 - Assignment completed and 'Require grade' marked as done Login as an admin and backup the assignment Restore the the backup into a new course Go to the restored assignment and edit it's settings Confirm that the activity completion criteria is correctly setup and matches the original assignment. Repeat the tests with the other activities which have completion enabled. Backup and Restore: Contd from previous test, Go to the course created previously Initiate backup of an activity via the course admin menu ( https://docs.moodle.org/39/en/Course_backup ) Continue through all the backup steps using default settings Once the backup is completed click on the continue button Once on the 'Restore course' page, click the restore link against the file in the 'Course backup area' Restore the file into the existing course Once the restore process is completed, go to the restored activity Edit the settings confirm the 'Activity completion' criteria matches the original activity. Legacy backup and restore of quiz : On an install with the patch Login as admin Go to Site Administration > Course > Restore course Upload the  backup-moodle2-course-52-c1_1-20210630-1158.mbz Continue through the restore process with the default settings. Once completed go to the restored quiz Confirm the quiz settings matches up with the following: Confirm Completion tracking - Show activity as complete when conditions are met Confirm Student must receive a grade to complete this activity - Checked Confirm Student must receive a passing grade to complete this activity - Checked
    • Affected Branches:
      MOODLE_29_STABLE, MOODLE_31_STABLE, MOODLE_33_STABLE, MOODLE_35_STABLE, MOODLE_36_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-52206-master-rebased
    • Story Points:
      3
    • Sprint:
      Activity Sprint 2, Activity Sprint 7, Activity Sprint 8, Activity Sprint 9, 4.0 holding pattern 3, 4.0 holding pattern 4, 4.0 holding pattern 5, 4.0 holding pattern 6, 4.0 holding pattern 12, 4.0 Navigation blitz, 4.0 Navigation blitz 2, QA blitz 3, Navigation push ahead

      Description

      Allow all core modules to have the ability to set a completion criteria of 'Require passing grade' similar to how quiz currently does.

      Original description -
      Administration > Site administration > Advanced features check the "Enable completion tracking" box.
      Administration > Course administration > Edit settings and enable the "Completion tracking section".
      Add an assignment > Set a passing grade for the assignment.
      Activity completion (of the assignment) > I CAN'T SEE THE OPTION "REQUIRE PASSING GRADE".

      ... And I need it, please
      Actually, the best option I can choose is "Students must receive a grade to complete this activity". But in this case, passed and no-passed assignments are marked as "completed".

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              peterdias Peter Dias
              Reporter:
              giugiupir giulia
              Peer reviewer:
              Jake Dallimore Jake Dallimore
              Integrator:
              Sara Arjona (@sarjona) Sara Arjona (@sarjona)
              Participants:
              Component watchers:
              Sam Marshall, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona), Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Sujith Haridasan, Tim Hunt, Andrew Lyons, Dongsheng Cai, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              75 Vote for this issue
              Watchers:
              59 Start watching this issue

                Dates

                Created:
                Updated:

                  Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 week, 4 days, 1 hour, 21 minutes
                  1w 4d 1h 21m