Step 1 – Provision a course
To provision a course a POST request must be made to:
POST /api/v2/schools/{school_id}/courses
The attributes for creating courses are listed in the schema section of the course documentation
External_id
The external_id can be used to add a reference to a unique id of a course in your own organisation. You can use the external_id alongside the Search API to find a course in Ans based on the provided external_id.
Step 2 – Add users to a course
To add users to a course a PATCH request must be made to:
PATCH /api/v2/courses/{course_id}
Users can be added to a course with one of the following four roles:
- Instructors
- Invigilators
- Learners
- Reviewers
Additional information about roles in courses can be found here.
Additional Information about updating courses
Learners have an extra attribute “extra_time”, which allows the learner to receive extra time within an exam.
It is possible to give users (excluding learners) a custom role in the course, by setting the role_id. As of this moment, custom roles can only be created through the interface and are only available through a beta feature.
To retrieve the roles a GET request must be made to:
POST /api/v2/schools/{school_id}/roles
Step 3 – Provision an assignment
To provision an assignment a POST request must be made to:
POST /api/v2/courses/{course_id}/assignments
The attributes for creating assignments are listed in the schema section of the assignment documentation.
External_id
The external_id can be used to add a reference to a unique id of an assignment in your own organisation. You can use the external_id alongside the Search API to find an assignment in Ans based on the provided external_id.
Reviewers
Before the reviewers can be assigned to an assignment, they must already be a part of the course. Reviewers can be set for the assignment in two ways, namely exercise reviewers and group reviewers.
Exercise reviewers are only allowed to review the specific exercises they are assigned to, unless they have the instructor role. Then they can review any of the exercises.
The obtain the list of exercises of an assignment, a GET request must be made to:
GET /api/v2/assignments/{assignment_id}/exercises
Group reviewers are only allowed to review the exercises for the groups they are assigned to, unless they have the instructor role. Then they can review any of the groups.
The obtain the list of groups of a course, a GET request must be made to:
GET /api/v2/courses/{course_id}/groups
Integrations
The Safe Exam Browser integration and the Safe Exam Browser Server integration can be set when creating or updating an assignment.
The Safe Exam Browser integration is enabled as soon as any values are sent alongside the “config” attribute within the “safe_exam_browser” attribute, if no values are sent alongside the “config” attribute then the default values for the configuration are set. The Ans API supports setting additional configuration options for the configuration, these additional options can be found in the following document. For removing the integration from the assignment, the “safe_exam_browser” attribute must be sent without any values.
The Safe Exam Browser Server integration can be enabled by setting {"enabled": "true"}
, the configuration keys can be set with the “config_keys” attribute. The integration can be disabled by setting {"enabled": "false"}
.
Step 4 – Add timeslots to an assignment
To provision a timeslot a POST request must be made to:
POST /api/v2/assignments/{assignment_id}/timeslots
The attributes for creating timeslots are listed in the schema section of the timeslot documentation.
Users are granted access to an assignment based on the range of dates and times set in the timeslot.
External_id
The external_id can be used to add a reference to a timeslot for an assignment. You can use the external_id alongside the Search API to find a timeslot in Ans based on the provided external_id.
A time limit for the assignment can be set with the “duration” attribute, where the value represents the amount of minutes.
The timeslot can either have a group set or a klass set but not both. If neither the attribute “group_id” or “klass_id” are set, then the timeslot for the assignment is available for all students.
Comments
0 comments
Please sign in to leave a comment.