Moodle
  1. Moodle
  2. MDL-27491

Survey and Wiki modules do not report completion information

    Details

    • Testing Instructions:
      Hide

      0. Enable completion tracking at site level and for a test course.
      1. On the test course, create a wiki and a survey. Set both to 'Mark complete automatically when conditions are met' and tick the 'Require view' condition.
      2. Turn editing off and look at the course. Observe that the two activities are marked as not completed (blank icon with no tickbox).
      3. Click into each activity in turn. In the case of the wiki, create the first page and put some content in and save it. (There needs to be a page in order for it to be counted as 'viewed'.) You don't need to do anything in the survey.
      4. Look at the course again.

      EXPECTED RESULT:
      Both activities should now display a tick mark alongside, indicating that they have been completed because you viewed them.

      Show
      0. Enable completion tracking at site level and for a test course. 1. On the test course, create a wiki and a survey. Set both to 'Mark complete automatically when conditions are met' and tick the 'Require view' condition. 2. Turn editing off and look at the course. Observe that the two activities are marked as not completed (blank icon with no tickbox). 3. Click into each activity in turn. In the case of the wiki, create the first page and put some content in and save it. (There needs to be a page in order for it to be counted as 'viewed'.) You don't need to do anything in the survey. 4. Look at the course again. EXPECTED RESULT: Both activities should now display a tick mark alongside, indicating that they have been completed because you viewed them.
    • Affected Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE
    • Pull Master Branch:
      MDL-27491-master
    • Rank:
      17195

      Description

      Survey and wiki modules are not integrated with the completion engine. They at least need to tell the completion engine when they are viewed.

      This code is found in other modules, but not in wikis and surveys:

      $completion = new completion_info($course);
      $completion->set_module_viewed($cm);

        Issue Links

          Activity

          Hide
          Michael de Raadt added a comment -

          Thanks for reporting this.

          I've increased the priority for this, partly because it is important and also because it has been duplicated.

          Show
          Michael de Raadt added a comment - Thanks for reporting this. I've increased the priority for this, partly because it is important and also because it has been duplicated.
          Hide
          Michael de Raadt added a comment -

          There is more good information and a possible solution in the linked duplicate issue.

          Show
          Michael de Raadt added a comment - There is more good information and a possible solution in the linked duplicate issue.
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Hi Sam,

          the fix seemed perfect on github, 1 simple commit (47b6ced1) adding the viewed thing to survey and wiki. But if I merge your branch against integration I get 3 extra commits, by Charles Fulton, related to MDL-27242 (work in progress afaik, perhaps you messed your master?).

          So this to ask for confirmation about simply cherry-picking 47b6ced1 (and backporting it) being correct, leaving Charles' stuff 100% out. Sounds ok? I'll be happy to do so after confirmation, TIA!

          Ciao

          Show
          Eloy Lafuente (stronk7) added a comment - Hi Sam, the fix seemed perfect on github, 1 simple commit (47b6ced1) adding the viewed thing to survey and wiki. But if I merge your branch against integration I get 3 extra commits, by Charles Fulton, related to MDL-27242 (work in progress afaik, perhaps you messed your master?). So this to ask for confirmation about simply cherry-picking 47b6ced1 (and backporting it) being correct, leaving Charles' stuff 100% out. Sounds ok? I'll be happy to do so after confirmation, TIA! Ciao
          Hide
          Sam Marshall added a comment -

          hi Eloy, argh! Yes the cherry-pick of the single commit is correct.

          However I have deleted my master branch, recreated from upstream, and rebased so it should work the merge way too now if you want to do that. (Now fiddling with other commits in integration too, sigh...)

          Show
          Sam Marshall added a comment - hi Eloy, argh! Yes the cherry-pick of the single commit is correct. However I have deleted my master branch, recreated from upstream, and rebased so it should work the merge way too now if you want to do that. (Now fiddling with other commits in integration too, sigh...)
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Integrated, thanks!

          Note: I've backported it also to 20_STABLE by cherry-pick.

          Show
          Eloy Lafuente (stronk7) added a comment - Integrated, thanks! Note: I've backported it also to 20_STABLE by cherry-pick.
          Hide
          Sam Hemelryk added a comment -

          Thanks guys, this is a pass!

          Show
          Sam Hemelryk added a comment - Thanks guys, this is a pass!
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Sent upstream and closing, many thanks!

          Show
          Eloy Lafuente (stronk7) added a comment - Sent upstream and closing, many thanks!

            People

            • Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: