Note:

If you want to create a new page for developers, you should create it on the Moodle Developer Resource site.

Course completion

From MoodleDocs

Moodle 2.0

This is a SPECIFICATION for a feature in Moodle 2.0 that is still under development

Overview

We need a way to flag when a user has finished a course.  :-)

Settings

  • At the site level, the "Enable completion tracking" setting (found in the Site Administration block's Advanced features / optional subsystems settings page) will turn on both activity and course completion tracking (progress) features at course level.
  • At the course level, "Enable course completion" will be grouped with "Enable activity completion" in the course settings page under the "Student progress" heading.
  • When course completion is enabled, the course completion criteria settings will appear (i.e., similar to how the "Show Advanced" button allows additional setting to appear) as shown below.

File:Completion2.png

Criteria

Several criteria can determine if a course is completed for a user. Criteria can be used in combination, and all criteria (except unenrolment) can be required.

Manual self-completion

Interface:

  • A single selection drop-down list with "yes" or "no" options.

Default value:

  • The "no" option is selected.

Display rules:

  • When the "no" option is selected, the "Required" checkbox becomes ungreyed out.

Result:

  • If set to "yes", a student can manually indicate that the course is complete.

Manual completion by

Interface:

  • A multiple selection drop-down list provides a list of all system roles.

Display rules:

  • No options in the list are selected.

Results:

  • If roles are selected, users assigned to each selected role in the course can manually "Mark complete" (via the Completion progress report) that a student has completed the course.
  • Once a student has been marked complete, they will have met the criteria.

Activities completed

Interface:

  • A multiple selection drop-down list containing the "type - name" pair (i.e., "[mod name] - [activity/resource name]" or "Quiz - Derivatives") for each activity/resource in the course with activity completion settings defined.

Display rules:

  • If "Activity completion" is disabled for the course, the drop-down list and the "required" option should be greyed-out. This message should appear:
"Activity completion must be enabled for this course (see the setting above)."
  • If "Activity completion" is enabled and there are no activities in the course (either not added or deleted), the drop-down list and the "required" option are should be greyed-out. This message should appear:
"Currently, there are no activities in this course"
  • If "Activity completion" is enabled, there are activities in the course and none of the activities have defined activity completion settings, the drop-down list and the "required" option should be greyed-out. This message should appear:
"Currently, none of the activities in this course have defined activity completion settings."

Result:

  • A student has completed the course when all the selected activities in the course are completed (see Conditional_activities).

Passing grade

Interface:

  • A text input box labeled "Passing grade" and a checkbox labeled "Disable."

Default values:

  • The text input box should contain the value "0.00000" and the text input box should be greyed out.
  • The checkbox labeled "Disable" should be selected.
  • The checkbox labeled "Required" should be greyed out.

Display rules:

  • If the "Disable" is unselected, the text input box and the "Required" checkbox become ungreyed out.
  • The passing grade can also be updated via the course's "Grade to pass" setting found in the Grader report's edit page for the top level category for the course.
  • Once a student has completed the course, both the "Passing grade" setting on the course page and the "Grade to pass" setting in the top level category for the course will be locked. A message about locking will appear on

Result:

  • If "Passing grade" is enabled, a student should met the criteria when earning a total course grade above the passing grade.

Date

Interface:

  • Three single selection drop-down lists with "day", "month", and "year" options and a checkbox labeled "Disable."

Default values:

  • The three drop-down menus will display today's date and will be greyed out
  • The checkbox labeled "Disable" will be selected.

Display rules:

  • Deselecting the "Disable" checkbox will ungrey out the three drop-down menus.

Result:

  • A student enroled in the course should met the criteria after a specified date.

Unenrolment

Interface:

  • A single selection drop-down list with "yes" or "no" options.

Result:

  • A student enrolled in the course should meet the criteria when unenrolled (e.g., by a Teacher, etc).

Notifications

Interface:

  • A single selection drop-down list with "enabled" or "disabled" options. Also, a multiple selection drop-down list provides a list of all system roles.

Result:

  • If enabled, a student receives notification when meeting all completion criteria for the course.
  • If other roles are selected, users assigned to each selected role in the course should receive notification when the course completion criteria is met for a student in the course.

Locking completion settings

When the first student has completed the course, the course completion criteria settings will be locked. The course settings can be unlocked (via an "Unlock course completion options" button), however a warning message will be displayed stating that unlocking the settings requires deleting all prior course completion data for the course. Once the completion data is deleted, the settings become unlocked (i.e., un-greyed out).

This is consistent with activity completion in 2.0, in which activity completion settings are locked when a user first completes an activity. Activity completion settings can be unlocked after all completion activity is deleted.

If activity completion is enabled and activity completion is a criteria for course completion, then all activity completion settings will be locked once a student has completed the course. In this case, unlocking an activity's completion settings will require deleting both the activity's completion data and the course's completion data.

Completion progress report

The idea here is to add the course completion data with the activity completion data already in the "Completion progress report" (found via on "Reports" link in the course Admin block) and clicking on "Completion progress report".

The report will display a table of:

  • All users in the course
    • The list of users will be sortable, searchable, and filterable (by group, groupings, and/or user profile fields).
    • User profile fields (standard and custom) can be added/removed as columns in the list.
  • All criteria enabled for completion (e.g., "Manual self completion", "Manual completion by", etc)
  • Each user's status for completion of each criteria, indicated by a status icon
  • When rolling over the each icon, additional details (including the completion date) will display.

Below is an example with all course completion criteria appearing (ie, all criteria has been enabled):

Completion report.png

Display rules for separate groups will apply. If separate groups is enabled for the course, a "teacher" will only see students and completion data for users in the group(s) that she/he is assigned to.

Options for exporting completion data to CSV, ODF or Excel will be available. Completion dates will be included in the export.

A column labeled "Mark complete" will appear containing a checkbox for each student if the user viewing the report is assigned to a role that is allowed to manually indicate that the students have completed the course.

Completion in the gradebook

If course completion is enabled for the course, "Completion status" will also appear as a column in the grader report. If the user viewing the grader report is assigned to a role that is allowed to manually indicate that students have completed the course, a "Mark complete" column will appear to the right of the "Course total" column with a checkbox for each student who has not yet completed the course.

Course completion data can also be included in the gradebook exports. Field options will include:

  • Completion status (e.g., "Complete", "Not complete")
  • Completion date
  • Completion criteria met (e.g., "[Role name] approved, [User name]", "passing grade: [passing value/percentage]")

Completion block

If completion is enabled for the site and course, a completion block will appear that displays the students completion status (complete / not complete), the completion criteria options for the course, and the status for completion of each criteria (similar to the Completion progress report).

If students are allowed to manually complete a course, the block will provide an "I've completed this course" button.

Cron

A cron function will check these conditions and add/remove entries from the course_completion table as necessary.

Data structures

course_completion

This new table will be populated with a record when a user has completed a course:

Field Type Default Info
id int(10) Auto incrementing
userid int(10) The user who has completed the course
courseid int(10) The course that has been completed
completionstate int(10) The user has completed the course. 0 or no row = not complete, 1 = completed, 2 = completed with grade above passing, 3 = completed with grade below passing
progressstate int(10) The user's current course completion progress as a value or percentage. This field is used when displaying student progress if activity completion is a criteria for course completion.
progressmax int(10) The maximum progress value. 100 = percentage. This field is also used when displaying student progress if activity completion is a criteria for course completion.
gradepass float(10,5) The minimum grade needed to pass the course (if passing grade criteria enabled)
finalgrade float(11,0) NULL The final course grade scored in the course (if passing grade criteria enabled)
usercompleted int(1) The user manually self-completed (if manual self-completion criteria enabled)
completedby int(10) The course was manually deemed complete for the user by this other user (if manual completion criteria used)
completedroleid int(10) The role of the user who manually completed the user (if manual completion criteria used)
datefinish int(10) The finish date criteria for course completion (if finish date criteria used)
unenroled int(10) The user was unenroled (if unenrolment criteria used)
deleted int(1) The course was deleted
timestart int(10) The date/time the user enroled in the course
timecompleted int(10) The date/time the user completed the course

course

The course table will require the following new fields:

Field Type Default Info
enablecoursecompletion int(1) The course is using course completion
completeself int(1) Students can manually complete
completerole int(10) Roles can complete -- probably just use capabilities for this
completeactivities int(1) Activities must be completed
completegrade int(1) Passing grade must be achieved.
completebydate int(1) Passing grade must be achieved.
completeunenrol int(1) Unenroling completes the course
completenotify int(1) Notify users when they've completed a course