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.

      Upgrade test:

      Setup before upgrade - Requires db access:

      1. Create a course
      2. Create an assignment and quiz with the following set:
        1. Activity completion
          1. Completion tracking - Show activity as complete when conditions are met
          2. Student must receive a grade to complete this activity - Checked
          3. Student must receive a passing grade to complete this activity - Checked (QUIZ ONLY)

      Testing:

      1. Upgrade the site with the patch included
      2. Go to the course created earlier
      3. Go to the assignment and edit it's settings
      4. Confirm the completion criteria is still set as before
      5. Go to the quiz and edit it's settings
      6. Repeat #4
      7. 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

      Manual testing:

      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
        2. Student 2 - Assignment completed
        3. Student 3 - Assignment completed
      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 - Assignment not completed
        2. Student 2 - Assignment not completed
        3. Student 3 - Assignment completed
      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 the cross mark is red (indicating they haven't reached pass grade)
        2. Student 2 - Assignment completed and the tick mark is green
        3. Student 3 - Assignment completed and the tick mark is green
      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 and confirm the 'Activity completion' criteria matches the original activity.

      Legacy backup and restore of quiz :

      Prerequisites:

      1. Requires a Moodle instance < 4.0 - OldMoodle
      2. Requires a Moodle instance > 4.0 - NewMoodle
      3. On OldMoodle, create a course with a quiz(QuizA) with the following additional settings
        1. Activity completion
          1. Completion tracking - Show activity as complete when conditions are met
          2. Student must receive a grade to complete this activity - Checked
          3. Student must receive a passing grade to complete this activity - Checked

      Testing

      1. On OldMoodle, backup QuizA using the default settings
      2. Once the backup is done, download the file.
      3. On NewMoodle, create a course
      4. Click on the 'Restore' option from within the Course admin section
      5. Upload the file from #2
      6. Continue through the restore process with the default settings.
      7. Once completed go to the restored activity(RestoredQuiz)
      8. Confirm RestoredQuiz's settings matches up with QuizA's settings. In particular 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. Upgrade test: Setup before upgrade - Requires db access: Create a course Create an assignment and quiz with the following set: Activity completion Completion tracking - Show activity as complete when conditions are met Student must receive a grade to complete this activity - Checked Student must receive a passing grade to complete this activity - Checked (QUIZ ONLY) Testing: Upgrade the site with the patch included 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 #4 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 Manual testing: 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 Student 2 - Assignment completed Student 3 - Assignment completed 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 - Assignment not completed Student 2 - Assignment not completed Student 3 - Assignment completed 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 the cross mark is red (indicating they haven't reached pass grade) Student 2 - Assignment completed and the tick mark is green Student 3 - Assignment completed and the tick mark is green 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 and confirm the 'Activity completion' criteria matches the original activity. Legacy backup and restore of quiz : Prerequisites: Requires a Moodle instance < 4.0 - OldMoodle Requires a Moodle instance > 4.0 - NewMoodle On OldMoodle, create a course with a quiz(QuizA) with the following additional settings Activity completion Completion tracking - Show activity as complete when conditions are met Student must receive a grade to complete this activity - Checked Student must receive a passing grade to complete this activity - Checked Testing On OldMoodle, backup QuizA using the default settings Once the backup is done, download the file. On NewMoodle, create a course Click on the 'Restore' option from within the Course admin section Upload the file from #2 Continue through the restore process with the default settings. Once completed go to the restored activity(RestoredQuiz) Confirm RestoredQuiz's settings matches up with QuizA's settings. In particular 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 3.10 Branch:
      MDL-52206-310-8
    • Pull Master Branch:
      MDL-52206-master-8
    • Story Points:
      5
    • 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

      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:
              Mathew May
              Integrator:
              Jake Dallimore
              Participants:
              Component watchers:
              Sam Marshall, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Tim Hunt, Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              58 Vote for this issue
              Watchers:
              48 Start watching this issue

                Dates

                Created:
                Updated:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 week, 1 day, 1 hour, 50 minutes
                  1w 1d 1h 50m