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

Course section progress indication incorrect

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide
      1. Enable completion
      2. Create course in topics format where each section is displayed on a separate page, enable completion for the course
      3. Add several activities to the sections, including:
      • activity with manual completion
      • activity that is completed on viewing
      • activity that is completed on receiving a grade
      • activity that is completed on receiving a grade AND has a non-zero passing grade (this can be set up through gradebook)
      1. As a student(s) view the course, complete or not complete some activities
      2. Make sure that course overview page always shows the correct progress indicator for each section.
      Show
      Enable completion Create course in topics format where each section is displayed on a separate page, enable completion for the course Add several activities to the sections, including: activity with manual completion activity that is completed on viewing activity that is completed on receiving a grade activity that is completed on receiving a grade AND has a non-zero passing grade (this can be set up through gradebook) As a student(s) view the course, complete or not complete some activities Make sure that course overview page always shows the correct progress indicator for each section.
    • Affected Branches:
      MOODLE_25_STABLE, MOODLE_26_STABLE, MOODLE_27_STABLE
    • Fixed Branches:
      MOODLE_25_STABLE, MOODLE_26_STABLE
    • Pull Master Branch:
      wip-MDL-43821-master

      Description

      On the main page of a course, activity completion progress is reported for each section as "Progress: x / y". This is incorrect where the section contains quizzes requiring a non-zero passing grade as a pass is not counted as a completion.

      To reproduce error:
      Create a course in topics format, display one section per page, with a section containing one quiz and one url link.
      Give the quiz a non-zero passing grade (through the gradebook) and activity completion criteria set to "Student must receive a grade to complete this activity".
      For the url set the activity completion criteria to "Student must view this activity to complete it".
      Log in as a student.
      View the course front page.
      The progress indicators for that section shows "Progress 0 / 2"
      Enter the section and visit the link and fail the quiz.
      View the course front page.
      The progress indicators for that section shows "Progress 1 / 2"
      Enter the section and pass the quiz.
      View the course front page.

      WHAT I EXPECTED:
      The progress indicator shows "Progress: 2 / 2"

      WHAT ACTUALLY HAPPENS:
      The progress indicator shows "Progress: 1 / 2"

      I think the problem is in renderer.php under course/format.
      The offending line appears to count the activities with completion state COMPLETION_COMPLETE but not COMPLETION_COMPLETE_PASS:
      if ($completiondata->completionstate == COMPLETION_COMPLETE)

      { $complete++; }
      Changing the code as follows appears to fix the problem to:
      if ($completiondata->completionstate == COMPLETION_COMPLETE || $completiondata->completionstate == COMPLETION_COMPLETE_PASS) { $complete++; }

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                9 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  10/Mar/14