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

SCORM status never set to COMPLETION_COMPLETE if "passed" and "completed" are checked

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      Setup

      • A course with some students.
      • In that course, create two SCORM package activities, using each of the two attached files as the packages, and ensuring for both:
        • Under Attempts management, the Number of attempts is set to 1 attempt.
        • Under Activity completion, Show activity as complete when conditions are met is set and in Completion tracking, Passed and Completed are both ticked in require status.

      Testing Completion or Pass status

      1. Log in as student and go to the course.
      2. Go through each of the scorm activities, reaching the end and receiving a pass mark (in the golf activity, the correct answers are shown in bold, in the communications activity, you have multiple attempts, and can pass even if you get the final question wrong).
      3. Make sure you see Done: Complete or pass the activity on both activities.

      Test single status (pass)

      1. As a teacher/admin, edit both scorm activities and untick the Completed completion requirement, so only Passed is required and save.
      2. As the student, refresh and make sure the student sees Done: Pass the activity on both activities.

      Testing completion failed

      1. Log in as a different student and go to the course.
      2. Complete either one of the scorm activities, answering all questions incorrectly.
      3. Make sure that activity is flagged as Failed: Pass the activity.
      Show
      Setup A course with some students. In that course, create two SCORM package activities, using each of the two attached files as the packages, and ensuring for both: Under Attempts management , the Number of attempts is set to 1 attempt . Under Activity completion , Show activity as complete when conditions are met is set and in Completion tracking , Passed and Completed are both ticked in require status. Testing Completion or Pass status Log in as student and go to the course. Go through each of the scorm activities, reaching the end and receiving a pass mark (in the golf activity, the correct answers are shown in bold, in the communications activity, you have multiple attempts, and can pass even if you get the final question wrong). Make sure you see Done: Complete or pass the activity on both activities. Test single status (pass) As a teacher/admin, edit both scorm activities and untick the Completed completion requirement, so only Passed is required and save. As the student, refresh and make sure the student sees Done: Pass the activity on both activities. Testing completion failed Log in as a different student and go to the course. Complete either one of the scorm activities, answering all questions incorrectly. Make sure that activity is flagged as Failed: Pass the activity.
    • Affected Branches:
      MOODLE_311_STABLE
    • Fixed Branches:
      MOODLE_311_STABLE
    • Pull from Repository:
    • Pull 3.11 Branch:
      MDL-71796-311
    • Pull Master Branch:
      MDL-71796-master
    • Story Points:
      0
    • Sprint:
      HQ Team International Sprint 2, HQ Team International Sprint 3, HQ Team International Sprint 4

      Description

      1. create a SCORM activity
      2. in settings->"Activity completion" check both "passed" and "completed" conditions
      3. run the SCORM and get the "passed" (OR "completed") status from LO

      EXPECTED RESULT: activity marked as "complete"

      WHAT HAPPENS: activity is still to be "completed".

      -

      from the help in scorm settings->Activity completion->Require status:
      "Checking one or more statuses will require a user to achieve at least one of the checked statuses in order to be marked complete in this SCORM activity, as well as any other Activity Completion requirements"

      please, note: "...at least one of the checked statuses in order to be marked complete".
      that is correct, speaking of SCORM objects. and working fine until moodle 3.10.

      no longer working on moodle 3.11, despite what the "help" states.

      case 1:
      passed checked
      case 2:
      completed checked
      case 3:
      passed AND completed checked

      in
      mod/scorm/classes/completion/custom_completion.php

      you can see:

      $requiredcompletionstatusid = $this->cm->customdata['customcompletionrules']['completionstatusrequired'] ?? 0;
      // Check at least one track meets the required completion status value(s).
      foreach ($tracks as $track) {
      if (array_key_exists($track->value, $statuses))

      { $statusbits |= $statuses[$track->value]; }

      // All completion status requirements met.
      if ($statusbits == $requiredcompletionstatusid)

      { $status = COMPLETION_COMPLETE; break; }

      }

      if you have checked both conditions "completed" and "passed", $requiredcompletionstatusid equals to "6".

      but a student will never have both "completed" and "passed" tracks, therefore $statusbits will be 2 OR 4, never 6. consequently, $status will be never set to COMPLETION_COMPLETE

      if this is not a bug, then lot of people will have lot of troubles, having to re-set "Activity completion" for (possibly) hundred of SCORMs

      regards.

        Attachments

        1. MDL-71796_Test Passed.PNG
          26 kB
          Gladys Basiana
        2. MDL-71796 completion 39.png
          24 kB
          Simey Lameze
        3. MDL-71796 completion master.png
          42 kB
          Simey Lameze

          Issue Links

            Activity

              People

              Assignee:
              lameze Simey Lameze
              Reporter:
              muzzini Renato Muzzini
              Peer reviewer:
              Michael Hawkins Michael Hawkins
              Integrator:
              Ilya Tregubov Ilya Tregubov
              Tester:
              Gladys Basiana Gladys Basiana
              Participants:
              Component watchers:
              Sam Marshall, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona), Dan Marsden, Matteo Scaramuccia, Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Sujith Haridasan
              Votes:
              2 Vote for this issue
              Watchers:
              10 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                12/Jul/21

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 3 days, 1 hour, 17 minutes
                  3d 1h 17m