Note:

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

Course completion: Difference between revisions

From MoodleDocs
No edit summary
Line 1: Line 1:
{{Moodle 2.0}}<p class="note">This is a SPECIFICATION for a feature in Moodle 2.0 that is still under development</p>
{{Moodle 2.0}}<p class="note">This is a SPECIFICATION for a feature in Moodle 2.0 that is still under development</p>


==Overview==
=Overview=


We need a way to flag when a user has finished a course. :-)
We need to allow several criteria for a "student" to 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
* '''Course grade''': A "student" meets or exceeds a passing grade in the course
* '''Unenrol''': A "student" unenrols (useful for external enrolment plugins)
* '''Date''': After a specified date all "students" enroled in the course have completed it
* '''Duration after enrolment''': After a specified about of time (e.g., 3 months)
* '''Activity completion''': A "student" completes an activity, building on [https://docs.moodle.org/en/Development:Conditional_activities#Completion_tracking_2 activity completion] feature developed for 2.0 by Sam Marshall from OU.


==Settings==
We need to record when/how the course completion criteria are met for a "student". Then we need to flag when the "student" has finished a course. :-)
* 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.


[[Image:Completion2.png]]
We also need reporting to allow:
* A "student" to see how they are progressing in the course
* A "teacher" to see how students are progressing in the course


==Criteria==
=Settings=
Several types of criteria can determine if a course is completed for a user. All criteria can be enabled/selected and all criteria (except unenrolment) can be required. By default, all criteria are disabled/not-selected and not required.
==Site-level settings==
[https://docs.moodle.org/en/Development:Conditional_activities#Completion_tracking_2 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.


Using the enabled/selected and required settings with more than one criteria provides a couple logical options for course completion, as shown in the examples below:
'''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)


'''Example 1''': Criteria used in an 'OR' combination
==Course settings page==
* Criteria 1 - enabled, but not required
[https://docs.moodle.org/en/Development:Conditional_activities#Completion_tracking_2 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.
* Criteria 2 - enabled, but not required
Result: A student can meet either Criteria 1 OR Criteria 2 to complete the course.


'''Example 2''': Criteria used in an 'AND' combination
"Enable completion tracking" setting (found in the Site Administration block's Advanced features / optional subsystems settings page) for activity completion.  
* Criteria 1 - enabled and required
* Criteria 2 - enabled and required
Result: A student must meet Criteria 1 AND Criteria 2 to complete the course.


The course settings page will not accepted both non-required and required criteria that are enabled. Using a similar example, error checking on the course settings page will NOT accept the following:
'''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)


'''Example 3''': Criteria which will NOT be accepted
==Course completion admin page==
* Criteria 1 - enabled, but not required
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 shown in the following mockup:
* Criteria 2 - enabled and required
The result would be a student must meet only Criteria 2 to complete the course, and enabling Criteria 1 has no effect. In the example above, the page will be accepted if (1) Criteria 1 is disabled, (2) Criteria 1 is required, or (3) Criteria 2 is not required.


===Manual self-completion===
[[Image:Edit_course_settings_1244178746044.png|thumb|600px|Edit course completion settings]]
Interface:
* A single selection drop-down list with "yes" or "no" options.


Default value:
==Enabled versus required criteria==
* The "no" option is selected.
We need to allow criteria to be enabled (i.e., "optional") or required (i.e., "must be done").


Display rules:
We need some rules about enabled and required criteria in a course:
* When the "no" option is selected, the "Required" checkbox becomes ungreyed out.
* By default, all criteria are not enabled and not required.
* Each criteria type (e.g., "Manual self completion", "Manual completion by", etc) can be enabled.
* Each criteria type (except unenrolment) can be required.
* Each criteria type instance (e.g., a specific user role, or quiz) must be enabled before it can be required (see the screenshot of the criteria admin settings - the "required" check box is greyed out until the criteria is enabled).


Result:
'''Note:''' Since each criteria will be stored as a record in the course_completion_items table, "disabled" (i.e., "not needed") criteria will not be tracked or mentioned further.
* If set to "yes", the current user manually indicate for her/himself that the course is complete.


===Manual completion by===
==Determining completion from combinations of criteria==
Interface:
We have several types of criteria to determine if a "student" has completed a course. We need to be able to use the criteria in combination. We also need to make use of the enabled and required values (described above). Here are the possible scenarios and the logic we'll use to handle them:
* A multiple selection drop-down list provides a list of all system roles.


Display rules:
'''More than one criteria, both are required'''
* No options in the list are selected.
* We follow strict 'AND' logic between the required criteria to determine course completion.
Example:
* Criteria 1 - enabled and required
* Criteria 2 - enabled and required
Results:
* A "student" must meet Criteria 1 AND Criteria 2 to complete the course.
* We track data for Criteria 1 and 2 for the "student".


'''More than one criteria, at least one is required and at least one is enabled'''
* 'Required' criteria ''trumps'' 'enabled' criteria, and we follow strict 'AND' logic between the required criteria to determine course completion.
Example:
* Criteria 1 - enabled, but not required
* Criteria 2 - enabled and required
Results:
Results:
* If roles are selected, users assigned to each selected role in the course will have options in the Completion progress report to manually "Mark complete" each student enrolled in the course.
* A "student" must meet ONLY Criteria 2 to complete the course (Criteria 1 is optional and has no effect on course completion)
* Once a student has been marked complete, they will have met the criteria.
* We track data for Criteria 1 and 2 for the "student".
 
'''More than one criteria, both are only enabled'''
* We follow strict 'OR' logic between the enabled criteria to determine course completion.
Example:
* Criteria 1 - enabled, but not required
* Criteria 2 - enabled, but not required
Result:
* A "student" must meet either Criteria 1 OR Criteria 2 to complete the course.
* We track data for Criteria 1 and 2 for the "student".


===Activities completed===
==Criteria details==
Interface:
===Manual self-completion===
* 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.
'''Action:'''
* A "student" can manually indicate that s/he has completed the course via the course's Completion progress block.
'''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.


Display rules:
'''Tracked:'''
* If "Activity completion" is disabled for the course, the drop-down list and the "required" option should be greyed-out. This message should appear:
* The roleid of the user who marked the "student" complete.
"Activity completion must be enabled for this course (see the setting above)."
* The userid of the user who marked the "student" complete.
* 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:
* The day/time when the user marked the "student" as complete in the course.
"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:
'''Notes:'''
* A student has completed the course when all the selected activities in the course are completed (see [[Conditional_activities]]).
# 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.
# 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 Completion progress report] will not provide a checkbox in the "Mark complete" column when viewed by any user in the role in the course.
# We really making use of a role capability and permissions here.


===Passing grade===
===Activities completed===
Interface:
'''Action:'''
* 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:
'''Tracked:'''
* If "Passing grade" is enabled, a student should met the criteria when earning a total course grade above the passing grade.
* The cmid, module type, and activity/resource name for each activity.
* The day/time when the criteria was detected as complete.


===Date===
'''Note:'''
Interface:
# The list of activities/resources will contain:
* Three single selection drop-down lists with "day", "month", and "year" options and a checkbox labeled "Disable."  
#* 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")
# "Activity completion" is disabled for the site and course, the "Activities completed" field set will not appear in the list of criteria. 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."''


Default values:
===Course grade===
* The three drop-down menus will display today's date and will be greyed out
'''Action:'''
* The checkbox labeled "Disable" will be selected.
* A "student" will met the criteria when earning a total course grade above the passing grade.


Display rules:
'''Tracked:'''
* Deselecting the "Disable" checkbox will ungrey out the three drop-down menus.
* The day/time when the criteria was deemed complete


Result:
'''Note:'''
* A student enroled in the course should met the criteria after a specified date.
* 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.


===Period after enrolment===
===Date===
Interface:
'''Action:'''
* Two selection drop-down lists. One will display integer count 1-30, and the second will display "day", "week", "month."
* A "student" enroled in the course will met the criteria after a specified date.


Default values:
'''Tracked:'''
* The two drop-down menus will display "30" and "day" respectively, and will be greyed out.
* The day/time when specified day was evaluated as having passed.
* The checkbox labeled "Disable" will be selected.


Display rules:
===Duration after enrolment===
* Deselecting the "Disable" checkbox will ungrey out the two drop-down menus.
'''Action:'''
* A "student" mets the criteria after the specified number of days after his/her enrolment.


Result:
'''Tracked:'''
* A student enroled in the course should met the criteria the specified number of days after his/her enrolment.
* The day/time when the "student" marked him/herself complete.


===Unenrolment===
===Unenrolment===
Interface:
'''Action:'''
* A single selection drop-down list with "yes" or "no" options.


Result:
'''Tracked:'''
* A student enrolled in the course should meet the criteria when unenroled (e.g., by a Teacher, etc).


==Notifications==
==Notifications==
Interface:
===Enable===
* 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.
If enabled, a "student" will receive notification when s/he has completed the course via the completion criteria.


Result:
===Notify===
* If enabled, a student receives notification when meeting all completion criteria for the course.
Users assigned to each selected role in the course will receive notification when each "student" completes 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==
==Locking completion settings==
Line 136: Line 166:
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.
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 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.


=Reporting=
==Completion progress report==
==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".
[https://docs.moodle.org/en/Development:Conditional_activities#Completion_tracking_2 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 will display a table of:
The report shows:
* All users in the course
* A column for each of the activities/resources in the course with "Completion tracking" enabled"
** The list of users will be sortable, searchable, and filterable (by group, groupings, and/or user profile fields).
* A row for each user enroled in the course
** User profile fields (standard and custom) can be added/removed as columns in the list.
* The completion status for each activity
* All criteria enabled for completion (e.g., "Manual self completion", "Manual completion by", etc)
 
'''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
* 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.
* 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):
Below is a mockup with all course completion criteria appearing (i.e., all criteria types have been enabled in a course):


[[Image:Completion_report.png]]
[[Image: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.
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.
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.
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)


==Completion in the gradebook==
==Completion in the gradebook==
Line 167: Line 209:
* Completion criteria met (e.g., "[Role name] approved, [User name]", "passing grade: [passing value/percentage]")
* Completion criteria met (e.g., "[Role name] approved, [User name]", "passing grade: [passing value/percentage]")


==Completion block==
==Completion progress 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 completion is enabled for the site and 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 the enabled criteria are required, the introduction text should say:
If none of the enabled criteria are required, the introduction text should say:
"All of the following criteria are required for completion"
:''"All of the following criteria are required for completion"''


If the enabled criteria are NOT required, the introduction text should say:
If the enabled criteria are NOT required, the introduction text should say:
"Any one of the following criteria is required for completion"
:''"Any one of the following criteria is required for completion"''


Example progress statements for each type of criteria:
Example progress statements for each type of criteria:
Line 185: Line 232:
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).
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).


==Cron==
Activity completion criteria/status (if enabled for course completion) should be included in the block. See [http://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").
A cron function will check these conditions and add/remove entries from the course_completion table as necessary.
 
TODO: create a mock-up of how this would look.


==Data structures==
=Data structures=


===course_completion===
===course===
This new table will be populated with a record when a user has completed a course:
The course table will require the following new fields:


{| border="1" cellpadding="2" cellspacing="0"
{| border="1" cellpadding="2" cellspacing="0"
Line 200: Line 248:


|-
|-
|'''id'''
|'''enablecoursecompletion'''
|int(10)
|int(1)
|
|
|Auto incrementing
|The course is using course completion


|-
|-
|'''userid'''
|'''completionnotify'''
|int(10)
|int(1)
|
|
|The user who has completed the course
|Notify the user who has completed the course
 
|}
 
 
===course_completion_items===
This new table will be populated with a each item for course completion:
 
{| border="1" cellpadding="2" cellspacing="0"
!Field
!Type
!Default
!Info
 
|-
|-
|'''courseid'''
|'''id'''
|int(10)
|int(10)
|
|
|The course that has been completed
|Auto incrementing


|-
|-
|'''completionstate'''
|'''course'''
|int(10)
|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
|The id of the course that the course completion item relates to


|-
|-
|'''progressstate'''
|'''itemname'''
|int(10)
|varchar(100)
|
|null
|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.
|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.


|-
|-
|'''progressmax'''
|'''itemtype'''
|int(10)
|int(20)
|
|
|The maximum progress value. 100 = percentage. This field is also used when displaying student progress if activity completion is a criteria for course completion.
|The type of item ('self', 'role', 'mod', 'grade', 'enrolperiod', 'date', 'postenrol'). Used for all item types.


|-
|-
|'''gradepass'''
|'''itemmodule'''
|float(10,5)
|varchar(100)
|
|null
|The minimum grade needed to pass the course (if passing grade criteria enabled)
|The name of the module (e.g., 'scorm', 'quiz', 'feedback'). Used only if itemtype='mod'.


|-
|-
|'''finalgrade '''
|'''iteminstance'''
|float(11,0)
|int(10)
|NULL
|null
|The final course grade scored in the course (if passing grade criteria enabled)
|The id of the activity or resource module. Used only if itemtype='mod'.


|-
|-
|'''usercompleted'''
|'''enrolperiod'''
|int(1)
|int(10)
|
|null
|The user manually self-completed (if manual self-completion criteria enabled)
|The number of days after enrolment. Used only if itemtype='enrolperiod'.


|-
|-
|'''completedby'''
|'''date'''
|int(10)
|int(10)
|
|
|The course was manually deemed complete for the user by this other user (if manual completion criteria used)
|The time stamp of the date for course completion. Used only if itemtype='date'.


|-
|-
|'''completedroleid'''
|'''required'''
|int(10)
|int(1)
|
|
|The role of the user who manually completed the user (if manual completion criteria used)
|The item is required. Used for all item types except unenrol.
|}
 
 
===course_completion_notify===
This new table will be populated with the roles which should be notified for this course
 
{| border="1" cellpadding="2" cellspacing="0"
!Field
!Type
!Default
!Info


|-
|-
|'''datefinish'''
|'''id'''
|int(10)
|int(10)
|
|
|The finish date criteria for course completion (if finish date criteria used)
|Auto incrementing


|-
|-
|'''unenroled'''
|'''course'''
|int(10)
|int(10)
|
|
|The user was unenroled (if unenrolment criteria used)
|The id of the course that the condition applies to


|-
|-
|'''deleted'''
|'''role'''
|int(1)
|int(10)
|
|
|The course was deleted
|The id of the role that should be sent a notification when a course has been completed


|-
|-
|'''timestart'''
|'''message'''
|int(10)
|text
|
|
|The date/time the user enroled in the course
|HTML formatted message to be sent to the user assigned to the role.


|-
|-
|'''timecompleted'''
|'''timesent'''
|int(10)
|int(10)
|
|
|The date/time the user completed the course
|Timestamp of when the notification was sent


|}
|}


===course===
===course_completion===
The course table will require the following new fields:
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.


{| border="1" cellpadding="2" cellspacing="0"
{| border="1" cellpadding="2" cellspacing="0"
Line 306: Line 378:


|-
|-
|'''enablecoursecompletion'''
|'''id'''
|int(1)
|int(10)
|
|Auto incrementing
 
|-
|'''userid'''
|int(10)
|
|The id of the user who has completed the course
|-
|'''course'''
|int(10)
|
|
|The course is using course completion
|The id of the completed course


|-
|-
|'''completeself'''
|'''progressstate'''
|int(1)
|int(10)
|
|
|Students can manually complete
|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.


|-
|-
|'''completerole'''
|'''progressmax'''
|int(10)
|int(10)
|
|
|Roles can complete -- probably just use capabilities for this
|The maximum progress value. 100 = percentage. This field is also used when displaying student progress if activity completion is a criteria for course completion.


|-
|-
|'''completeactivities'''
|'''gradepass'''
|int(1)
|number(10)
|
|
|Activities must be completed
|The minimum grade needed to pass the course (if passing grade criteria enabled)


|-
|-
|'''completegrade'''
|'''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)
|int(1)
|
|null
|Passing grade must be achieved.
|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


|-
|-
|'''completebydate'''
|'''deleted'''
|int(1)
|int(1)
|null
|The course was deleted
|-
|'''timenotified'''
|int(10)
|
|
|Passing grade must be achieved.
|Timestamp when the user was notified


|-
|-
|'''completeunenrol'''
|'''timeenroled'''
|int(1)
|int(10)
|
|
|Unenroling completes the course
|Timestamp when the user enroled in the course


|-
|-
|'''completenotify'''
|'''timecompleted'''
|int(1)
|int(10)
|
|
|Notify users when they've completed a course
|Timestamp when the user completed the course
 
|}
 
 
 
=Role capabilities=
{| border="1" cellpadding="2" cellspacing="0"
|'''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


|}
|}


==Backup and restore==
=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:''' If enabled, compare the grade to the pass grade.
* '''Unenrol:''' If enabled, get all users who are haven't met this criteria and have a timestamp in the timeend field in the role_assignments table.
* '''Date:''' If enabled, check if the date exceeds the current date.
* '''Duration after enrolment:''' If enabled, get all users for whom (the timestamp for timestart of the role assignment in the course + the period after enrolment) >= the current timestamp
* '''Activity completion:''' Get all records in the course_modules_completion table that relate to activities/resources in the course
* '''Course completion:''' Evaluate the completion criteria and values, and update the completion 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.
* The new completion fields in the course table will be included in the backup.
* When user data is included in a course backup, the backup will also include the contents of the course_completion table.
* 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.
 
=Tracking Issues=
* http://tracker.moodle.org/browse/MDL-2631 Course credits and tracking of student's completion
 
=Questions=
==Weighting completion progress==
* Should the enabled and/or required criteria be weighted to measure progress?
* What weighting options should be available?
==Broader controls==
* Some criteria should be manageable by an "admin" from the site-level for policy / consistency purposes. What should they be? Maybe "completion by unenrolment"?
* Should there be controls on a category level?

Revision as of 05:49, 6 June 2009

Moodle 2.0

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

Overview

We need to allow several criteria for a "student" to 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
  • Course grade: A "student" meets or exceeds a passing grade in the course
  • Unenrol: A "student" unenrols (useful for external enrolment plugins)
  • Date: After a specified date all "students" enroled in the course have completed it
  • Duration after enrolment: After a specified about of time (e.g., 3 months)
  • Activity completion: A "student" completes an activity, building on activity completion feature developed for 2.0 by Sam Marshall from OU.

We need to record when/how the course completion criteria are met for a "student". Then we need to flag when the "student" has finished a course. :-)

We also need reporting to allow:

  • A "student" to see how they are progressing in the course
  • A "teacher" to see how students are progressing in the course

Settings

Site-level 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 page

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 admin page

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 shown in the following mockup:

File:Edit course settings 1244178746044.png
Edit course completion settings

Enabled versus required criteria

We need to allow criteria to be enabled (i.e., "optional") or required (i.e., "must be done").

We need some rules about enabled and required criteria in a course:

  • By default, all criteria are not enabled and not required.
  • Each criteria type (e.g., "Manual self completion", "Manual completion by", etc) can be enabled.
  • Each criteria type (except unenrolment) can be required.
  • Each criteria type instance (e.g., a specific user role, or quiz) must be enabled before it can be required (see the screenshot of the criteria admin settings - the "required" check box is greyed out until the criteria is enabled).

Note: Since each criteria will be stored as a record in the course_completion_items table, "disabled" (i.e., "not needed") criteria will not be tracked or mentioned further.

Determining completion from combinations of criteria

We have several types of criteria to determine if a "student" has completed a course. We need to be able to use the criteria in combination. We also need to make use of the enabled and required values (described above). Here are the possible scenarios and the logic we'll use to handle them:

More than one criteria, both are required

  • We follow strict 'AND' logic between the required criteria to determine course completion.

Example:

  • Criteria 1 - enabled and required
  • Criteria 2 - enabled and required

Results:

  • A "student" must meet Criteria 1 AND Criteria 2 to complete the course.
  • We track data for Criteria 1 and 2 for the "student".

More than one criteria, at least one is required and at least one is enabled

  • 'Required' criteria trumps 'enabled' criteria, and we follow strict 'AND' logic between the required criteria to determine course completion.

Example:

  • Criteria 1 - enabled, but not required
  • Criteria 2 - enabled and required

Results:

  • A "student" must meet ONLY Criteria 2 to complete the course (Criteria 1 is optional and has no effect on course completion)
  • We track data for Criteria 1 and 2 for the "student".

More than one criteria, both are only enabled

  • We follow strict 'OR' logic between the enabled criteria to determine course completion.

Example:

  • Criteria 1 - enabled, but not required
  • Criteria 2 - enabled, but not required

Result:

  • A "student" must meet either Criteria 1 OR Criteria 2 to complete the course.
  • We track data for Criteria 1 and 2 for the "student".

Criteria details

Manual self-completion

Action:

  • A "student" can manually indicate that s/he has completed the course via the course's Completion progress block.

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 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 making use of a role capability and permissions here.

Activities completed

Action:

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. "Activity completion" is disabled for the site and course, the "Activities completed" field set will not appear in the list of criteria. 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)."
  3. 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"
  4. 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."

Course grade

Action:

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

Tracked:

  • The day/time when the criteria was deemed complete

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 met the criteria after a specified date.

Tracked:

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

Duration after enrolment

Action:

  • A "student" mets 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:

Tracked:

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 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.

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.

Reporting

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.

Below is a mockup with all course completion criteria appearing (i.e., all criteria types have been enabled in a course):

Completion report.png

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)

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 progress block

If completion is enabled for the site and 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 none of the enabled criteria are required, the introduction text should say:

"All of the following criteria are required for completion"

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

"Any one of the following criteria is required for completion"

Example progress statements for each type of criteria:

  1. you have marked yourself completed for this course
  2. your teacher has not yet marked you completed
  3. x of y activities completed
  4. x out of y days remaining
  5. course grade x% below passing grade of y%

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").

TODO: create a mock-up of how this would look.

Data structures

course

The course table will require the following new fields:

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_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 or resource module. 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'.
required int(1) The item is required. Used for all item types except unenrol.


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

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
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 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


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

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: If enabled, compare the grade to the pass grade.
  • Unenrol: If enabled, get all users who are haven't met this criteria and have a timestamp in the timeend field in the role_assignments table.
  • Date: If enabled, check if the date exceeds the current date.
  • Duration after enrolment: If enabled, get all users for whom (the timestamp for timestart of the role assignment in the course + the period after enrolment) >= the current timestamp
  • Activity completion: Get all records in the course_modules_completion table that relate to activities/resources in the course
  • Course completion: Evaluate the completion criteria and values, and update the completion 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.

Tracking Issues

Questions

Weighting completion progress

  • Should the enabled and/or required criteria be weighted to measure progress?
  • What weighting options should be available?

Broader controls

  • Some criteria should be manageable by an "admin" from the site-level for policy / consistency purposes. What should they be? Maybe "completion by unenrolment"?
  • Should there be controls on a category level?