Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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)
Code Block
languagejs
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.
};
Info
iconfalse
title

See also

Common Course Record Import Scenarios

Queuing user enrollments via the course record import feature

...

Course credit allows the addition, or updating, of eligible credit on an individual course.

...

Course Credit (course_credit)
Code Block
languagejs
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,
};
false
Info
icon
title

See also

Awarding credit via web services

...

Credit awarded to an individual user in a course may be accessed via the course_credit_awarded endpoint.

...

Awarded Credit (course_credit_awarded)
Code Block
languagejs
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
};
false
Info
icon
title

See also

Awarding credit via web services

...

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)
Code Block
languagejs
var course_enrollment = {
  "nid" : 10,  // Course nid
  "uid" : 1,  // User ID
  "enrollmenttype" : "external_webservice", // A string detailing what service enrolled the user
  "type" : "course_enrollment", // The field bundle to use. Can be omitted.
  "status" : 1,  // 0 - Disabled, 1 - Enabled
};
Info
iconfalse
title

See also

Enrolling a user via web service

Queuing user enrollments via the course record import feature

...

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)
Code Block
languagejs
var course_report = (
      "nid" : 10, // Course nid
      "uid" : 1, // User ID
      "grade_result" : 0,
      "date_completed" : NULL, // Date in Epoch format or NULL if Incomplete
      "updated" : 1592512895, // Date in Epoch format
      "complete" : 0, // 0 - Incomplete, 1 - Complete
      "section" : "course_content", // The course object module type
      "section_name" : "Webservice Object",   // The course object module name
      "coid" : 30  // The course object id.
    );

...

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.

...

Course Object Fulfillment (course_object_fulfillment)
Code Block
languagejs
var course_object_fulfillment = {
  "coid" : 30,  // The course object id.
  "uid" : 1,   // User ID
  "grade_result" : 100,
  "date_started" : "1463756400",  // Date in Epoch format
  "date_completed" : "1463756400",  // Date in Epoch format
  "complete" : 1,  // 0 - Failed/Incomplete, 1 - Passed
};

...