Moodle
  1. Moodle
  2. MDL-28997

Courses aren't completing when all activities and quizes have been completed/passed

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Not a bug
    • Affects Version/s: 2.1.1
    • Fix Version/s: None
    • Component/s: Course completion, Quiz
    • Labels:
      None
    • Environment:
      Windows
    • Database:
      MySQL
    • Workaround:
      Hide

      None...

      Show
      None...
    • Affected Branches:
      MOODLE_21_STABLE

      Description

      After a user completes an activity or quiz, the course does not complete. It sits in pending status. In my site, we were embedding a url to a pdf, and the only requirement to complete the course is to view that url. Please see forum post: http://moodle.org/mod/forum/discuss.php?d=182626

      Create a course with
      -Upload PDF and enable course completion
      --Set it so all a student has to do is view the pdf for completion (no pre-reqs for course)
      -Log in and "take" the course (view pdf) as student
      --*Note, once a student reads it, they do in fact get a check marking it as completed
      -Log back in as Admin
      --Look at Course Completion Status
      --*Again, PDF View is marked complete, but the course is NOT marked complete

        Gliffy Diagrams

        1. MDL-28997
          0.7 kB
          Aaron Barnes
        1. courseCompletionAfterCron.jpg
          46 kB

          Activity

          Hide
          Michael de Raadt added a comment -

          I tried to replicate this, but it worked fine for me.

          Course completion checking is run as part of the cron process. Are you running cron? You can manually run cron to see if this is a problem.

          http://docs.moodle.org/20/en/Cron#Testing_cron_and_manual_trigger

          After forcing cron to run, I was able to see course the completion report change and the student's status go from "In progress" to "Complete".

          Show
          Michael de Raadt added a comment - I tried to replicate this, but it worked fine for me. Course completion checking is run as part of the cron process. Are you running cron? You can manually run cron to see if this is a problem. http://docs.moodle.org/20/en/Cron#Testing_cron_and_manual_trigger After forcing cron to run, I was able to see course the completion report change and the student's status go from "In progress" to "Complete".
          Hide
          IT @ United Electric added a comment -

          I have been running cron, but I decided to manually run it as you did and am still having the same issue. I also noticed that none of the tables in the db are being updated...I also found this in the forums as well: http://moodle.org/mod/forum/discuss.php?d=182904

          Show
          IT @ United Electric added a comment - I have been running cron, but I decided to manually run it as you did and am still having the same issue. I also noticed that none of the tables in the db are being updated...I also found this in the forums as well: http://moodle.org/mod/forum/discuss.php?d=182904
          Hide
          IT @ United Electric added a comment -

          Ah! I actually got this working! I forgot to add "$CFG->enablecompletion" to my config.php Sorry about that!

          Show
          IT @ United Electric added a comment - Ah! I actually got this working! I forgot to add "$CFG->enablecompletion" to my config.php Sorry about that!
          Hide
          Ray Lawrence added a comment -

          That shouldn't be required for standard out-of-the-box functionality. Should it?

          Show
          Ray Lawrence added a comment - That shouldn't be required for standard out-of-the-box functionality. Should it?
          Hide
          veronika smith added a comment -

          I struggled with this bug for days. I turned completion feature on in advanced settings, that's all I should have to do. It doesn't say anywhere that you have to add $CFG->enablecompletion to config.php (except here). Not very intuitive...

          Show
          veronika smith added a comment - I struggled with this bug for days. I turned completion feature on in advanced settings, that's all I should have to do. It doesn't say anywhere that you have to add $CFG->enablecompletion to config.php (except here). Not very intuitive...
          Hide
          Sam Marshall added a comment -

          Reassigning to default as this is a course completion issue (although probably not a reproducible one?) rather than activity completion. The activity completion bit is working (activity completion doesn't need cron to run).

          Please note that you should NOT need to set enablecompletion in config.php. This option can (and should!) be set on the advanced setting page of the normal admin settings web interface. There is no need to set it in config.php

          If for some reason course completion does not update without the setting in config.php, then this would be a bug in course completion system (doesn't seem very likely to me but who knows).

          Show
          Sam Marshall added a comment - Reassigning to default as this is a course completion issue (although probably not a reproducible one?) rather than activity completion. The activity completion bit is working (activity completion doesn't need cron to run). Please note that you should NOT need to set enablecompletion in config.php. This option can (and should!) be set on the advanced setting page of the normal admin settings web interface. There is no need to set it in config.php If for some reason course completion does not update without the setting in config.php, then this would be a bug in course completion system (doesn't seem very likely to me but who knows).
          Hide
          IT @ United Electric added a comment -

          I did have course completion enabled in the administrative settings on the site, but the courses still would not mark as complete. The activities would, but the course wouldn't. Once I edited the config.php, the course completion worked (and still does).

          Show
          IT @ United Electric added a comment - I did have course completion enabled in the administrative settings on the site, but the courses still would not mark as complete. The activities would, but the course wouldn't. Once I edited the config.php, the course completion worked (and still does).
          Hide
          Aaron Barnes added a comment -

          Hi,

          IT @ United Electric, could you try the patch I just attached and let me know if it fixes your issue?

          Thanks for the bug report!

          Aaron

          Show
          Aaron Barnes added a comment - Hi, IT @ United Electric, could you try the patch I just attached and let me know if it fixes your issue? Thanks for the bug report! Aaron
          Hide
          IT @ United Electric added a comment -

          I applied this patch, but it still does not seem to work. The activities are showing complete, but the actual "course completed" field is blank.

          I also noticed (not sure if this matters) that when we click the "unlock completion options and delete user completion data" the records for users are never removed. So after we have clicked that, the user goes back to the activity and it still shows as checked off.

          Show
          IT @ United Electric added a comment - I applied this patch, but it still does not seem to work. The activities are showing complete, but the actual "course completed" field is blank. I also noticed (not sure if this matters) that when we click the "unlock completion options and delete user completion data" the records for users are never removed. So after we have clicked that, the user goes back to the activity and it still shows as checked off.

            People

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

              Dates

              • Created:
                Updated:
                Resolved: