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

  • PROJECT STATE: Proposal
  • MAIN TRACKER ISSUE: MDL-2631 Course credits and tracking of student's completion
  • DISCUSSION AND COMMENTS: not announced on moodle.org yet
  • AUTHOR: Jonathan Newman and others

Overview

We need to flag when the "student" has finished a course. :-)

We need to allow several types of criteria to determine how a "student" can complete a course:

  • Manual self completion: A "student" can mark her/himself complete a course.
  • Manual completion by: An "admin", "teacher", "tutor", etc can mark a student complete for a course.
  • Activity completion: A "student" completes an activity, building on Activity Completion developed for 2.0 by Sam Marshall from OU.
  • Course grade: A "student" meets or exceeds a passing grade in the course.
  • Date: After a specified date all "students" are marked as completed in a course.
  • Duration after enrolment: After a specified about of time after enrolment (e.g., 12 weeks), a "student" is automatically marked as complete in a course.
  • Unenrol: After being unenroled, a "student" is marked complete for the course. Useful for external enrolment plugins.

We need to record when and how a "student" meets each criteria in a course.

We need to regularly aggregate the results for the criteria, measure progress, and check to see if a "student" has completed a course.

We need to show:

  • A "student" the necessary criteria to complete a course
  • A "student" how s/he is progressing in a course along the necessary criteria
  • A "teacher" how his/her students are progressing in a course and which students have completed it

Settings

Site settings

Activity Completion provides an "Enable completion tracking" setting (found in the Site Administration block's Advanced features / optional subsystems settings page) for activity completion. We need to change the setting's name and add another setting for course completion.

Proposed changes:

  • Rename the setting "Enable activity completion tracking" (the setting will continue to allow activity completion to be enabled in all courses)
  • Create a new setting named "Enable course completion tracking" (the setting will allow course completion to be enabled in all courses)

Course settings

Activity Completion provides a fieldset (named "Student progress") which contains a setting (named "Completion tracking") which enables/disables activity completion in a course. We need to rename the setting to describe activity completion and add a setting to enable course completion.

"Enable completion tracking" setting (found in the Site Administration block's Advanced features / optional subsystems settings page) for activity completion.

Proposed changes:

  • Rename the setting "Completion tracking" to "Activity completion tracking" (the setting will continue to make activity completion features available in the courses)
  • Create a new setting named "Course completion tracking" (the setting will make course completion features available in the course)

Course completion settings

When course completion is enabled in a course (see above), a menu item labeled "Completion" will appear in the course Administration block on the main course page. When a user clicks on the "Completion" link, the course completion admin page will display the criteria described below and in the mockup also below:

Edit course completion settings

Criteria enabling

We need to allow criteria to be enabled.

We need some rules about enabled criteria in a course:

  • Each criteria (e.g., "Manual self completion", "Manual completion by", etc) can be enabled
  • By default, all criteria are not enabled

Criteria aggregation

We need to define overall aggregation methods for the criteria type. We also need to a consistent set of aggregation methods for criteria types which have more than one possible option to determine an individual user's course completion:

  • "Manual completion by" // more than one role can be enabled to determine if a student has completed the course
  • "Activity completed" // more than one activity completion can be selected to determine if a student has completed the course

Aggregation methods:

Method Required to complete the criteria type Example Info
All All of the enabled child criteria must be completed Not applicable
Any Any one (1) of the enabled child criteria must be completed Not applicable
Fraction A fraction of the enabled child criteria must be completed 0.25,0.5,0.9
Units A specified number of the enabled child criteria must be completed 2,3,4 A unit of 1 is equivalent to 'any'. A unit equal to the number of enabled child criteria is equivalent to 'all'.

Criteria types

Manual self-completion

Action:

Tracked:

  • The day/time when the "student" marked him/herself complete.

Manual completion by

Action:

  • A user assigned to the role in the course will see a checkbox in the Completion progress report, which will allow him/her to manually "Mark complete" each applicable student enrolled in the course.

Tracked:

  • The roleid of the user who marked the "student" complete.
  • The userid of the user who marked the "student" complete.
  • The day/time when the user marked the "student" as complete in the course.

Notes:

  1. The Completion progress report will respect:
    • Separate groups: A "teacher" will only be able to see and mark complete students in her/his group(s) if separate groups is enabled.
    • Role assignments on the USER-level context: A "Tutor" or "Mentor" will only be able to see and mark complete users assigned to him/her.
  2. The criteria can be met only once by the role:
    • If more than one user is assigned to the role and has the capability of marking the user complete
    • After a "student" has been marked complete one time by a user in the role, the Completion progress report will not provide a checkbox in the "Mark complete" column when viewed by any user in the role in the course.
  3. We really be relying on role capabilities and permissions for this.

Activities completed

Action:

  • A "student" will meet the criteria when completing the specified activity, per the activity's 'Activity Completion' settings.

Tracked:

  • The cmid, module type, and activity/resource name for each activity.
  • The day/time when the criteria was detected as complete.

Note:

  1. The list of activities/resources will contain:
    • Each activity/resource in the course with "Completion tracking" enabled within the activity/resource.
    • The type of each activity followed by the activity name (i.e., "[mod name] - [activity/resource name]"). See the mockup on this page (or for a basic example: "Quiz - Derivatives").
  2. If "Activity completion" is not enabled for the site, the "Activities completed" field set will not appear on the page.
  3. If "Activity completion" is enabled for the site and not enabled for the course, the "Activities completed" field set will appear and it will only contain this message:
    "Activity completion must be enabled for this course."
  4. If "Activity completion" is enabled for the site and course, and there are no activities in the course, the "Activities completed" field set will appear and it will only contain this message:
    "Currently, there are no activities in this course"
  5. If "Activity completion" is enabled for the site and course, and there are activities but none have activity completion enabled, the "Activities completed" field set will appear and it will only contain this message:
    "Currently, none of the activities in this course have defined activity completion settings."

Course grade

Action:

  • A "student" will meet the criteria when earning a total course grade above the passing grade.

Tracked:

  • The day/time when the user's course grade was evaluated as having exceeded the passing grade.

Note:

  • 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 the settings page for the top level category for the course.

Date

Action:

  • A "student" enroled in the course will automatically meet the criteria after a specified date.

Tracked:

  • The day/time when specified day was evaluated as having passed.

Duration after enrolment

Action:

  • A "student" will meet the criteria after the specified number of days after his/her enrolment.

Tracked:

  • The day/time when the "student" marked him/herself complete.

Unenrolment

Action:

  • A "student" will meet the criteria when being unenroled from the course.

Tracked:

  • The day/time when the "student" was unenroled from the course.

Notifications

Enable

If enabled, a "student" will receive notification when s/he has completed the course via the completion criteria.

Notify

Users assigned to each selected role in the course will receive notification when each "student" completes the course.

Locking

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.

Activity settings

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.

If an activity is being tracked for course completion, we should add a warning/confirmation screen when an "admin" attempts to delete it. The message should say, "[Activity name] is currently a criteria for course completion. Are you sure you want to delete it?" [Delete anyway] / [Cancel]. If the "admin" confirms, the activity will be deleted however completion data for users who completed it will still remain tracked.

Should the activity completion data remain? Should the course completion data be re-aggregated?

Data structures

course

The course table will require the following new fields (as well as renaming 'enablecompletion' to 'enableactivitycompletion'):

Field Type Default Info
enablecoursecompletion int(1) The course is using course completion
completionnotify int(1) Notify the user who has completed the course

course_completion_aggregation_methods

This new table will be populated with the aggregation method for "Overall criteria", "Manual completion by", and "Activities completed".

Field Type Default Info
id int(10) Auto incrementing
course int(10) The id of the course that the course completion aggregation relates to
itemtype int(20) The type of item used for types: 'overall', 'role', 'mod'.
method int(1) 1 '1'='all', '2'='any', '3'='fraction', '4'='unit'.

course_completion_items

This new table will be populated with a each item for course completion:

Field Type Default Info
id int(10) Auto incrementing
course int(10) The id of the course that the course completion item relates to
itemname varchar(100) null The name of the item (e.g. "Mark yourself complete", "Teacher marks you complete", "[Activity name]", "[postenrol] days after enrolment", "Official Date: [date]". Used for all item types except unenrol.
itemtype int(20) The type of item ('self', 'role', 'mod', 'grade', 'enrolperiod', 'date', 'postenrol'). Used for all item types.
itemmodule varchar(100) null The name of the module (e.g., 'scorm', 'quiz', 'feedback'). Used only if itemtype='mod'.
iteminstance int(10) null The id of the activity/resource module or role. Used only if itemtype='mod'.
enrolperiod int(10) null The number of days after enrolment. Used only if itemtype='enrolperiod'.
date int(10) The time stamp of the date for course completion. Used only if itemtype='date'.
lock int(1) The item is locked.
locktime int(10) The timestamp of the day/time when the item was locked.

course_completion_notify

This new table will be populated with the roles which should be notified for this course

Field Type Default Info
id int(10) Auto incrementing
course int(10) The id of the course that the condition applies to
role int(10) The id of the role that should be sent a notification when a course has been completed
message text HTML formatted message to be sent to the user assigned to the role.
timesent int(10) Timestamp of when the notification was sent

course_completion_completions

This new table will be populated with a record for a user when s/he is enroled in the course. It will be updated as the user meets course completion criteria selected/enabled for a course.

Field Type Default Info
id int(10) Auto incrementing
userid int(10) The id of the user who has completed the course
course int(10) The id of the completed course
gradepass number(10) The minimum grade needed to pass the course (if passing grade criteria enabled)
gradefinal number(10) null The final grade for the course (included regardless of whether a passing grade was required)
activities text null Serialized, base64 encoded: "[course_modules_completion->id],[mod->name],[Activity/Resource name],[some kind of activity completion criteria statement] for each activity enabled for completion.
completedself int(10) null The timestamp of when the user manually self-completed (if manual self-completion criteria enabled)
completedrole text null Serialized, base64 encoded: "[user->id],[role->id],[timestamp]" for each user who manually marked the user complete.
completeddate int(1) null A completion date was used as a criteria for completing the course. The date will appear in the timecompleted column.
unenroled int(10) null Timestamp when the user was unenroled
deleted int(1) null The course was deleted
timenotified int(10) Timestamp when the user was notified
timeenroled int(10) Timestamp when the user enroled in the course
timecompleted int(10) Timestamp when the user completed the course

Evaluating completion

Since the gradebook aggregation is performed via cron, it makes sense that course completion is also evaluated by cron.

This creates an issue in which the progress block will not instantly not show course completion after the necessary criteria has been met by a "student". However, this can be solved by adding some instructional text to say "may take a few minutes to update".

Role capabilities

Feature Description Capability
Progress block Mark self-complete in progress block block/progress:markselfcomplete
Progress report View course progress report coursereport/progress:view
Progress report Mark users complete in course progress report coursereport/progress:markcomplete

Course reporting

Completion progress report

Course completion progress report

Activity Completion provides a "Completion progress report". The report can be found via on "Reports" menu item link in the course Administration block and when "Completion tracking" is enabled for the site and course.

The report shows:

  • A column for each of the activities/resources in the course with "Completion tracking" enabled"
  • A row for each user enroled in the course
  • The completion status for each activity

Proposed changes:

  • Include in the report all enabled criteria for course completion (e.g., "Manual self completion", "Manual completion by", as well as the activities etc)
  • Each user's status for completion of each criteria, indicated by a status icon
  • Allow the completion admin page to determine which activities are shown in the report
  • Allow the list of users to be sortable, searchable, and filterable (by group, groupings, and/or user profile fields).
  • Allow user profile fields (standard and custom) can be added/removed as columns in the list.
  • When rolling over the each icon, additional details (including the completion date) will display.

See the mockup to the right with all course completion criteria appearing (i.e., all criteria types have been enabled in a course).

As described further above, 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.

Not shown in the mockup, however we should display the specified values under the applicable heading in the report for each of the following feilds:

  • Period after enrolment
  • Passing grade
  • Date (for completion)

Gradebook

  1. If "Passing grade" is enabled as a criteria for course completion, a grader should have the option of seeing completion status (i.e., "complete" / "not complete") as a column in the grader report.
  2. If a user assigned to a role that is enabled for "Manual completion by", the user should have the option of manually indicating which 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.

We should also provide an option to show course completion status in gradebook exports. Field options will include:

  • Completion status (e.g., "Complete", "Not complete")
  • Completion date

Completion progress block

Course completion progress block

If completion is enabled for the site and a course, a completion block will be available to be added to the course.

The block will allow a "student" to see:

  • The completion criteria for the completion the course
  • His/her status for completion of each criteria (similar to the Completion progress report)
  • His/her overall completion status for the course (complete / not complete)

If at least one of the enabled criteria are required, the introduction text should say:

"The criteria below are required"

If the enabled criteria are NOT required, the introduction text should say:

"At least one criteria is required"

If the current user can self complete the course, the block will provide an "I've completed this course" button (if the user has not already marked him/herself complete).

Activity completion criteria/status (if enabled for course completion) should be included in the block. See [https://tracker.moodle.org/browse/MDL-16466 MDL-16466] ("Activities on the course page do not convey to student that completion is expected or available for the activity").

User (course) profile

Activity and course completion criteria/status data should appear in a user's "Outline report" and "Complete report" in the user profile area.

Site reporting

User (site) profile

Activity and course completion criteria/status data should appear in a user's "Outline report" and "Complete report" in the user profile area.

TODO: Create a mockup.

My Moodle

Activity and course completion criteria/status data should appear with the course and course activity listings.

TODO: Create a mockup.

Cron

A cron function will check the criteria and update the course_completion_items table as necessary. Here's a breakdown of the tasks for each criteria, and will need to be optimised for performance and scalability across all courses:

  • Manual self completion: Cron not needed, performed directly from the Completion progress block.
  • Manual completion by: Cron not needed, performed directly via the Completion progress report.
  • Course grade: Compare the course grade to the passing grade.
  • Unenrol: Compare course_completion->unenroled to role_assignments->timeend for the "student" role in the course.
  • Date: Compare the current date to the specified date.
  • Duration after enrolment: Compare the current date to the role_assignments->timestart + the specified period after enrolment.
  • Activity completion: Evaluate the necessary records in the course_modules_completion table.
  • Course completion: Aggregate the necessary fields in course_completion table, updating the timecompleted field with the current timestamp if the user has met the necessary criteria.
  • Notifications: Send out them out to the user (if enabled) and to users in the selected role.

Backup and restore

  • The new completion fields in the course table will be included in the backup.
  • Entries in the course_completion_items table for the course should also be included in the backup.
  • When user data is included in a course backup, the backup will also include records in the course_completion table for the course.

Questions

Gradebook

  • Should we also optionally include in the export the completion criteria met (e.g., "[Role name] approved, [User name]", "passing grade: [passing value/percentage]")?

Hidden completion criteria

  • Should some completion criteria be hidden from a "student" in the completion progress block?

Weighted completion progress

  • Should criteria be weighted to how sprogress? This would allow a full term paper would show much more weight than a one night homework assignment.
  • If so, what weighting methods should be available (percentage, unit)?
  • Should one option use a course's grade items (i.e, activity module) weighting for aggregating a course grade?

Completion progress indicators

  • Should we show indicator icons in the Completion progress block instead of text?

Activity completion status override

  • Should a "teacher" be able to manually override the completion status for an activity, even though it was automatically determined to be not complete by the activity?

Site and category settings

  • Some criteria should probably be manageable by an "admin" from the site level for policy / consistency purposes. For example, should "completion by unenrolment" only be managed at the site level?
  • Would it be very useful to have controls on a category level that apply to all courses contained within it, and any sub-categories? Note: That will risk though complexity and performance considerations, however it might have high benefit through ensuring consistent settings/criteria across categories.