Enrollment/Credits - Web Service Data Structures
Course Records
Course record imports, via the transcript_import endpoint, allow remote services to queue enrollments for user, that are processed upon the user's next login.
Imported Transcript Record (transcript_import)
var transcript_import = {
"imported" : 0, // imported must be 0 upon initial creation to trigger the enrollment. Records set to 1 are not imported.
"nid" : 10, // The course nid
"attended" : 0, // 1 = attended
"complete" : 1, // 0 = incomplete; 1 = complete (Triggers credit awarding)
"external_mail" : "webservice_user@dlcdev.com", // External_mail is used to match a user, when uid is not available.
"date_completed" : "1463756400", // Date in Epoch format
"start" : "1463756400", // Date in Epoch format
"credit_type" : "ama", // The credit type machine name to award. May be NULL, or omitted, if not awarding credit
"credits" : 10.50, // The number of credits.
};
Course Credit
Course credit allows the addition, or updating, of eligible credit on an individual course.
Course Credit (course_credit)
var course_credit = {
"nid" : 10, // The course nid
"type" : "ama", // The credit type machine name to award.
"increments" : ".25",
"min" : "1.00",
"max" : "10.00",
"active" : 1, // 0 = Disabled; 1 = Enabled
"enable_variable_credit" : 1,
};
See also
Awarded Credit
Credit awarded to an individual user in a course may be accessed via the course_credit_awarded endpoint.
Awarded Credit (course_credit_awarded)
var course_credit_awarded = {
"nid" : 10, // Course nid
"uid" : 1, // User ID
"type" : "ama", // The credit type machine name to award.
"credits" : 4, // Number of credits
};
See also
Course Enrollment
Enrollment records may be added directly to the system via the course_enrollment endpoint. This does not require the user to login.
Course Enrollment (course_enrollment)
Course Report
The course report contains the user's completion status, grade and section. External web services may update this to mark a user as complete or incomplete.
Course report (course_report)
Course Object Fulfillment
External web services may set the completion status, and grades, of individual course objects a user is taking, within a course. The record is associated to the individual via their uid, and course object id (coid). The coid is obtainable via the Course Outline. An objects course object id is distinct from the course nid.