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

Mod completion cannot be changed on certain cases

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 2.4.9, 2.6.2
    • Fix Version/s: None
    • Component/s: Activity completion
    • Labels:
    • Testing Instructions:
      Hide
      1. Create a forum with automatic completion tracking.
      2. Set one standard completion setting (i.e must view) and one Forum completion setting (i.e. must create 1 discussion).
      3. Save and let some user complete the activity
      4. Edit the same forum and unlock the settings
        Now, the battle begins...
      5. CASE A:
        1. Change the completion settings (i.e add must reply once).
        2. Save
        3. All seems right but returning to the edit, the completion not changed!
      6. CASE B:
        1. Change the completion settings unsetting all the standard completion settings (i.e must view).
        2. Save
        3. It gets the error "When you select automatic completion, you must also enable at least one requirement (below)."
      Show
      Create a forum with automatic completion tracking. Set one standard completion setting (i.e must view) and one Forum completion setting (i.e. must create 1 discussion). Save and let some user complete the activity Edit the same forum and unlock the settings Now, the battle begins... CASE A: Change the completion settings (i.e add must reply once). Save All seems right but returning to the edit, the completion not changed! CASE B: Change the completion settings unsetting all the standard completion settings (i.e must view). Save It gets the error "When you select automatic completion, you must also enable at least one requirement (below)."
    • Workaround:
      Hide

      Changes to be made:
      On course/moodleform_mod.php function definition_after_data
      Arround line 213.
      Change this:

      if ($mform->exportValue('unlockcompletion')) {
      

      By this:

      if ($mform->exportValue('unlockcompletion') || $mform->exportValue('completionunlocked')) {
      

      Show
      Changes to be made: On course/moodleform_mod.php function definition_after_data Arround line 213. Change this: if ($mform->exportValue('unlockcompletion')) { By this: if ($mform->exportValue('unlockcompletion') || $mform->exportValue('completionunlocked')) {
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_24_STABLE, MOODLE_26_STABLE

      Description

      In activities with added completion settings the settings remain frozen after Unlocking the completion settings.

      After some investigation this is caused because it doesn't read the completionunlocked setting when freezing forms and, as it freezes, the completion data is erased.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                pferre22 Pau Ferrer
                Participants:
                Component watchers:
                Sam Marshall, Amaia Anabitarte, Bas Brands, Carlos Escobedo, Sara Arjona (@sarjona), Víctor Déniz Falcón
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: