code
stringlengths
1
18.2k
def add_recipients(self, id, recipients): """ Add recipients. Add recipients to an existing group conversation. Response is similar to the GET/show action, except that only includes the latest message (e.g. "joe was added to the conversation by bob") """ path = {} data = {} params = {} # REQUIRED - PATH - id """ID""" p...
def add_message(self, id, body, attachment_ids=None, included_messages=None, media_comment_id=None, media_comment_type=None, recipients=None, user_note=None): """ Add a message. Add a message to an existing conversation. Response is similar to the GET/show action, except that only includes the latest message (i.e. what...
sent.""" data["body"] = body # OPTIONAL - attachment_ids """An array of attachments ids. These must be files that have been previously uploaded to the sender's "conversation attachments" folder.""" if attachment_ids is not None: data["attachment_ids"] = attachment_ids # OPTIONAL - media_comment_id """Media comment id o...
the user making the api call has permission, the recipient is a student and faculty journals are enabled in the account.""" if user_note is not None: data["user_note"] = user_note self.logger.debug("POST /api/v1/conversations/{id}/add_message with query params: {params} and form data: {data}".format(params=params, data...
def delete_message(self, id, remove): """ Delete a message. Delete messages from this conversation. Note that this only affects this user's view of the conversation. If all messages are deleted, the conversation will be as well (equivalent to DELETE) """ path = {} data = {} params = {} # REQUIRED - PATH - id """ID""" p...
def batch_update_conversations(self, event, conversation_ids): """ Batch update conversations. Perform a change on a set of conversations. Operates asynchronously; use the {api:ProgressController#show progress endpoint} to query the status of an operation. """ path = {} data = {} params = {} # REQUIRED - conversation_i...
def list_preferences_communication_channel_id(self, user_id, communication_channel_id): """ List preferences. Fetch all preferences for the given communication channel """ path = {} data = {} params = {} # REQUIRED - PATH - user_id """ID""" path["user_id"] = user_id # REQUIRED - PATH - communication_channel_id """ID"""...
def list_preferences_type(self, type, user_id, address): """ List preferences. Fetch all preferences for the given communication channel """ path = {} data = {} params = {} # REQUIRED - PATH - user_id """ID""" path["user_id"] = user_id # REQUIRED - PATH - type """ID""" path["type"] = type # REQUIRED - PATH - address ""...
def get_preference_communication_channel_id(self, user_id, notification, communication_channel_id): """ Get a preference. Fetch the preference for the given notification for the given communicaiton channel """ path = {} data = {} params = {} # REQUIRED - PATH - user_id """ID""" path["user_id"] = user_id # REQUIRED - PA...
def get_preference_type(self, type, user_id, address, notification): """ Get a preference. Fetch the preference for the given notification for the given communicaiton channel """ path = {} data = {} params = {} # REQUIRED - PATH - user_id """ID""" path["user_id"] = user_id # REQUIRED - PATH - type """ID""" path["type"]...
def update_preference_communication_channel_id(self, notification, communication_channel_id, notification_preferences_frequency): """ Update a preference. Change the preference for a single notification for a single communication channel """ path = {} data = {} params = {} # REQUIRED - PATH - communication_channel_id "...
def update_preference_type(self, type, address, notification, notification_preferences_frequency): """ Update a preference. Change the preference for a single notification for a single communication channel """ path = {} data = {} params = {} # REQUIRED - PATH - type """ID""" path["type"] = type # REQUIRED - PATH - add...
def update_preferences_by_category(self, category, communication_channel_id, notification_preferences_frequency): """ Update preferences by category. Change the preferences for multiple notifications based on the category for a single communication channel """ path = {} data = {} params = {} # REQUIRED - PATH - communi...
def main(cl_args=None): """ Direct execution. """ if cl_args is None and len(sys.argv) > 1: cl_args = sys.argv[1:] args = options.parse_args(cl_args) print("-------------------------------------------------------------------") print(" __ _____ ___ ____ _ __ ") print(" / / / _/ | / / | / / /__ (_) /_ ") print(" / /___/ ...
[] if livvkit.verify or livvkit.validate: functions.setup_output() if livvkit.verify: summary_elements.append(scheduler.run("numerics", numerics, functions.read_json(livvkit.numerics_model_config))) summary_elements.append(scheduler.run("verification", verification, functions.read_json(livvkit.verification_model_config...
HTTP on {host} port {port} (http://{host}:{port}/)'.format(host=sa[0], port=sa[1])) print('\nView the generated website by navigating to:') print('\n http://{host}:{port}/{path}/index.html'.format(host=sa[0], port=sa[1], path=os.path.relpath(livvkit.output_dir) )) print('\nExit by pressing `ctrl+c` to send a keyboard i...
def list_users_in_account(self, account_id, search_term=None): """ List users in account. Retrieve the list of users associated with this account. @example_request curl https://<canvas>/api/v1/accounts/self/users?search_term=<search value> \ -X GET \ -H 'Authorization: Bearer <token>' """ path = {} data = {} params = {...
non- administrative queries will only be compared against name.""" if search_term is not None: params["search_term"] = search_term self.logger.debug("GET /api/v1/accounts/{account_id}/users with query params: {params} and form data: {data}".format(params=params, data=data, **path)) return self.generic_request("GET", "/...
def create_user(self, account_id, pseudonym_unique_id, communication_channel_address=None, communication_channel_confirmation_url=None, communication_channel_skip_confirmation=None, communication_channel_type=None, enable_sis_reactivation=None, force_validations=None, pseudonym_authentication_provider_id=None, pseudony...
None: data["user[name]"] = user_name # OPTIONAL - user[short_name] """User's name as it will be displayed in discussions, messages, and comments.""" if user_short_name is not None: data["user[short_name]"] = user_short_name # OPTIONAL - user[sortable_name] """User's name as used to sort alphabetically in lists.""" if u...
OPTIONAL - user[terms_of_use] """Whether the user accepts the terms of use. Required if this is a self-registration and this canvas instance requires users to accept the terms (on by default). If this is true, it will mark the user as having accepted the terms of use.""" if user_terms_of_use is not None: data["user[ter...
a valid email address.""" data["pseudonym[unique_id]"] = pseudonym_unique_id # OPTIONAL - pseudonym[password] """User's password. Cannot be set during self-registration.""" if pseudonym_password is not None: data["pseudonym[password]"] = pseudonym_password # OPTIONAL - pseudonym[sis_user_id] """SIS ID for the user's ac...
- pseudonym[force_self_registration] """Send user a self-registration style email if true. Setting it means the users will get a notification asking them to "complete the registration process" by clicking it, setting a password, and letting them in. Will only be executed on if the user does not need admin approval. Def...
provider (in which case, it will find the first matching provider).""" if pseudonym_authentication_provider_id is not None: data["pseudonym[authentication_provider_id]"] = pseudonym_authentication_provider_id # OPTIONAL - communication_channel[type] """The communication channel type, e.g. 'email' or 'sms'.""" if commun...
confirm the channel. If this is true, it is recommended to set <tt>"pseudonym[send_confirmation]"</tt> to true as well. Otherwise, the user will not receive any messages about their account creation.""" if communication_channel_skip_confirmation is not None: data["communication_channel[skip_confirmation]"] = communicat...
force_validations is not None: data["force_validations"] = force_validations # OPTIONAL - enable_sis_reactivation """When true, will first try to re-activate a deleted user with matching sis_user_id if possible.""" if enable_sis_reactivation is not None: data["enable_sis_reactivation"] = enable_sis_reactivation self.lo...
def self_register_user(self, user_name, account_id, user_terms_of_use, pseudonym_unique_id, communication_channel_address=None, communication_channel_type=None, user_birthdate=None, user_locale=None, user_short_name=None, user_sortable_name=None, user_time_zone=None): """ Self register a user. Self register and return ...
is not None: data["user[sortable_name]"] = user_sortable_name # OPTIONAL - user[time_zone] """The time zone for the user. Allowed time zones are {http://www.iana.org/time-zones IANA time zones} or friendlier {http://api.rubyonrails.org/classes/ActiveSupport/TimeZone.html Ruby on Rails time zones}.""" if user_time_zone ...
communication_channel_type is not None: data["communication_channel[type]"] = communication_channel_type # OPTIONAL - communication_channel[address] """The communication channel address, e.g. the user's email address.""" if communication_channel_address is not None: data["communication_channel[address]"] = communicatio...
def update_user_settings(self, id, collapse_global_nav=None, manual_mark_as_read=None): """ Update user settings. Update an existing user's settings. """ path = {} data = {} params = {} # REQUIRED - PATH - id """ID""" path["id"] = id # OPTIONAL - manual_mark_as_read """If true, require user to manually mark discussion ...
def get_custom_color(self, id, asset_string): """ Get custom color. Returns the custom colors that have been saved for a user for a given context. The asset_string parameter should be in the format 'context_id', for example 'course_42'. """ path = {} data = {} params = {} # REQUIRED - PATH - id """ID""" path["id"] = id...
def edit_user(self, id, user_avatar_token=None, user_avatar_url=None, user_email=None, user_locale=None, user_name=None, user_short_name=None, user_sortable_name=None, user_time_zone=None): """ Edit a user. Modify an existing user. To modify a user's login, see the documentation for logins. """ path = {} data = {} para...
for the user. Allowed time zones are {http://www.iana.org/time-zones IANA time zones} or friendlier {http://api.rubyonrails.org/classes/ActiveSupport/TimeZone.html Ruby on Rails time zones}.""" if user_time_zone is not None: data["user[time_zone]"] = user_time_zone # OPTIONAL - user[email] """The default email address ...
to change without notice. It should be consumed with this api endpoint and used in the user update endpoint, and should not be constructed by the client.""" if user_avatar_token is not None: data["user[avatar][token]"] = user_avatar_token # OPTIONAL - user[avatar][url] """To set the user's avatar to point to an externa...
def merge_user_into_another_user_destination_user_id(self, id, destination_user_id): """ Merge user into another user. Merge a user into another user. To merge users, the caller must have permissions to manage both users. This should be considered irreversible. This will delete the user and move all the data into the d...
def get_user_profile(self, user_id): """ Get user profile. Returns user profile data, including user id, name, and profile pic. When requesting the profile for the user accessing the API, the user's calendar feed URL will be returned as well. """ path = {} data = {} params = {} # REQUIRED - PATH - user_id """ID""" path...
def list_user_page_views(self, user_id, end_time=None, start_time=None): """ List user page views. Return the user's page view history in json format, similar to the available CSV download. Pagination is used as described in API basics section. Page views are returned in descending order, newest to oldest. """ path = {...
params=params, all_pages=True)
def store_custom_data(self, ns, data, user_id): """ Store custom data. Store arbitrary user data as JSON. Arbitrary JSON data can be stored for a User. A typical scenario would be an external site/service that registers users in Canvas and wants to capture additional info about them. The part of the URL that follows +/...
requests. A request with Content-Type multipart/form-data or Content-Type application/x-www-form-urlencoded can only be used to store strings. Example PUT with multipart/form-data data: curl 'https://<canvas>/api/v1/users/<user_id>/custom_data/telephone' \ -X PUT \ -F 'ns=com.my-organization.canvas-app' \ -F 'data=555-...
'Authorization: Bearer <token>' Response: !!!javascript { "data": "40in" } If you want to store more than just strings (i.e. numbers, arrays, hashes, true, false, and/or null), you must make a request with Content-Type application/json as in the following example. Example PUT with JSON data: curl 'https://<canvas>/api/...
accessed by including the object's (possibly nested) keys in the scope of a GET request. Example {api:UsersController#get_custom_data GET} with a generated scope: curl 'https://<canvas>/api/v1/users/<user_id>/custom_data/a-hash/a/b' \ -X GET \ -F 'ns=com.my-organization.canvas-app' \ -H 'Authorization: Bearer <token>' ...
caused a conflict and data was not stored. This happens when storing data at the requested scope would cause data at an outer scope to be lost. e.g., if +/custom_data+ was +{"fashion_app": {"hair": "blonde"}}+, but you tried to +`PUT /custom_data/fashion_app/hair/style -F data=buzz`+, then for the request to succeed,th...
other Canvas API apps aren't likely to use, such as a reverse DNS for your organization.""" data["ns"] = ns # REQUIRED - data """The data you want to store for the user, at the specified scope. If the data is composed of (possibly nested) JSON objects, scopes will be generated for the (nested) keys (see examples).""" d...
def list_course_nicknames(self): """ List course nicknames. Returns all course nicknames you have set. """ path = {} data = {} params = {} self.logger.debug("GET /api/v1/users/self/course_nicknames with query params: {params} and form data: {data}".format(params=params, data=data, **path)) return self.generic_request("...
def set_course_nickname(self, nickname, course_id): """ Set course nickname. Set a nickname for the given course. This will replace the course's name in output of API calls you make subsequently, as well as in selected places in the Canvas web user interface. """ path = {} data = {} params = {} # REQUIRED - PATH - cour...
def get_sis_import_list(self, account_id, created_since=None): """ Get SIS import list. Returns the list of SIS imports for an account Example: curl 'https://<canvas>/api/v1/accounts/<account_id>/sis_imports' \ -H "Authorization: Bearer <token>" """ path = {} data = {} params = {} # REQUIRED - PATH - account_id """ID""...
def import_sis_data(self, account_id, add_sis_stickiness=None, attachment=None, batch_mode=None, batch_mode_term_id=None, clear_sis_stickiness=None, diffing_data_set_identifier=None, diffing_remaster_data_set=None, extension=None, import_type=None, override_sis_stickiness=None): """ Import SIS data. Import SIS data int...
ways to post SIS import data - either via a multipart/form-data form-field-style attachment, or via a non-multipart raw post request. 'attachment' is required for multipart/form-data style posts. Assumed to be SIS data from a file upload form field named 'attachment'. Examples: curl -F attachment=@<filename> -H "Author...
text/csv' --data-binary @<filename>.csv \ -H "Authorization: Bearer <token>" \ 'https://<canvas>/api/v1/accounts/<account_id>/sis_imports.json?import_type=instructure_csv&batch_mode=1&batch_mode_term_id=15'""" if attachment is not None: if type(attachment) is file: files['attachment'] = (os.path.basename(attachment.nam...
batch mode, deleting any data previously imported via SIS that is not present in this latest import. See the SIS CSV Format page for details.""" if batch_mode is not None: data["batch_mode"] = batch_mode # OPTIONAL - batch_mode_term_id """Limit deletions to only this term. Required if batch mode is enabled.""" if batch...
OPTIONAL - add_sis_stickiness """This option, if present, will process all changes as if they were UI changes. This means that "stickiness" will be added to changed fields. This option is only processed if 'override_sis_stickiness' is also provided.""" if add_sis_stickiness is not None: data["add_sis_stickiness"] = add...
difference between the two. See the SIS CSV Format documentation for more details.""" if diffing_data_set_identifier is not None: data["diffing_data_set_identifier"] = diffing_data_set_identifier # OPTIONAL - diffing_remaster_data_set """If true, and diffing_data_set_identifier is sent, this SIS import will be part of ...
def abort_all_pending_sis_imports(self, account_id): """ Abort all pending SIS imports. Abort already created but not processed or processing SIS imports. """ path = {} data = {} params = {} # REQUIRED - PATH - account_id """ID""" path["account_id"] = account_id self.logger.debug("PUT /api/v1/accounts/{account_id}/sis_...
def file_finder(dirname="."): """ Find the files in ``dirname`` under Mercurial version control according to the setuptools spec (see http://peak.telecommunity.com/DevCenter/setuptools#adding-support-for-other-revision-control-systems ). """ import distutils.log dirname = dirname or '.' try: valid_mgrs = managers.RepoM...
def patch_egg_info(force_hg_version=False): """ A hack to replace egg_info.tagged_version with a wrapped version that will use the mercurial version if indicated. `force_hg_version` is used for hgtools itself. """ from setuptools.command.egg_info import egg_info from pkg_resources import safe_version import functools o...
def version_calc(dist, attr, value): """ Handler for parameter to setup(use_vcs_version=value) attr should be 'use_vcs_version' (also allows use_hg_version for compatibility). bool(value) should be true to invoke this plugin. value may optionally be a dict and supply options to the plugin. """ expected_attrs = 'use_hg_...
def get_or_create(name, value): """ returns the storage space defined by name if space does not exist yet it will first be created with the specified value """ if name not in storage: storage[name] = value return storage[name]
def parse_module(module): '''Parse a module's attributes and generate a markdown document.''' attributes = [ (name, type_) for (name, type_) in getmembers(module) if (isclass(type_) or isfunction(type_)) and type_.__module__ == module.__name__ and not type_.__name__.startswith('_') ] attribute_docs = ['## {0}'.format(m...
def Retry(target=None, args=[], kwargs={}, options={"retry": True, "interval": 1}): """ options retry True, infinity retries False, no retries Number, retries times interval time period for retry return None if no success Message if success """ retry = options["retry"] interval = options["interval"] while True: try: re...
def create_crud_func(self, method, request_type="CRUD"): """ create_crud_func """ def _crud(resource, data=None, block=True, timeout=60, topic="/controller", tunnel=None, qos=0): """ _crud block True: wait until response arrival False: wait until message is already published to local broker """ headers = { "resource": ...
def create_response(self, message, sign): """ return function for response """ def _response(code=200, data=None): """ _response """ resp_msg = message.to_response(code=code, data=data, sign=sign) with self._session.session_lock: mid = self._conn.publish(topic="/controller", qos=0, payload=resp_msg.to_dict()) session =...
def list_assignment_groups(self, course_id, exclude_assignment_submission_types=None, grading_period_id=None, include=None, override_assignment_dates=None, scope_assignments_to_student=None): """ List assignment groups. Returns the list of assignment groups for the current context. The returned groups are sorted by the...
exclude_assignment_submission_types is not None: self._validate_enum(exclude_assignment_submission_types, ["online_quiz", "discussion_topic", "wiki_page", "external_tool"]) params["exclude_assignment_submission_types"] = exclude_assignment_submission_types # OPTIONAL - override_assignment_dates """Apply assignment over...
if scope_assignments_to_student is not None: params["scope_assignments_to_student"] = scope_assignments_to_student self.logger.debug("GET /api/v1/courses/{course_id}/assignment_groups with query params: {params} and form data: {data}".format(params=params, data=data, **path)) return self.generic_request("GET", "/api/v1...
def get_assignment_group(self, course_id, assignment_group_id, grading_period_id=None, include=None, override_assignment_dates=None): """ Get an Assignment Group. Returns the assignment group with the given id. """ path = {} data = {} params = {} # REQUIRED - PATH - course_id """ID""" path["course_id"] = course_id # RE...
the grading period in which assignment groups are being requested (Requires the Multiple Grading Periods account feature turned on)""" if grading_period_id is not None: params["grading_period_id"] = grading_period_id self.logger.debug("GET /api/v1/courses/{course_id}/assignment_groups/{assignment_group_id} with query p...
def create_assignment_group(self, course_id, group_weight=None, integration_data=None, name=None, position=None, rules=None, sis_source_id=None): """ Create an Assignment Group. Create a new assignment group for this course. """ path = {} data = {} params = {} # REQUIRED - PATH - course_id """ID""" path["course_id"] = ...
- integration_data """The integration data of the Assignment Group""" if integration_data is not None: data["integration_data"] = integration_data # OPTIONAL - rules """The grading rules that are applied within this assignment group See the Assignment Group object definition for format""" if rules is not None: data["ru...
def edit_assignment_group(self, course_id, assignment_group_id): """ Edit an Assignment Group. Modify an existing Assignment Group. Accepts the same parameters as Assignment Group creation """ path = {} data = {} params = {} # REQUIRED - PATH - course_id """ID""" path["course_id"] = course_id # REQUIRED - PATH - assign...
def create_question_group(self, quiz_id, course_id, quiz_groups_assessment_question_bank_id=None, quiz_groups_name=None, quiz_groups_pick_count=None, quiz_groups_question_points=None): """ Create a question group. Create a new question group for this quiz <b>201 Created</b> response code is returned if the creation was...
- quiz_groups[assessment_question_bank_id] """The id of the assessment question bank to pull questions from.""" if quiz_groups_assessment_question_bank_id is not None: data["quiz_groups[assessment_question_bank_id]"] = quiz_groups_assessment_question_bank_id self.logger.debug("POST /api/v1/courses/{course_id}/quizzes/{...
def update_question_group(self, id, quiz_id, course_id, quiz_groups_name=None, quiz_groups_pick_count=None, quiz_groups_question_points=None): """ Update a question group. Update a question group """ path = {} data = {} params = {} # REQUIRED - PATH - course_id """ID""" path["course_id"] = course_id # REQUIRED - PATH -...
form data: {data}".format(params=params, data=data, **path)) return self.generic_request("PUT", "/api/v1/courses/{course_id}/quizzes/{quiz_id}/groups/{id}".format(**path), data=data, params=params, no_data=True)
def reorder_question_groups(self, id, quiz_id, order_id, course_id, order_type=None): """ Reorder question groups. Change the order of the quiz questions within the group <b>204 No Content<b> response code is returned if the reorder was successful. """ path = {} data = {} params = {} # REQUIRED - PATH - course_id """ID...
def list_your_courses(self, enrollment_role=None, enrollment_role_id=None, enrollment_state=None, enrollment_type=None, include=None, state=None): """ List your courses. Returns the list of active courses for the current user. """ path = {} data = {} params = {} # OPTIONAL - enrollment_type """When set, only return cou...
'TaEnrollment', 'ObserverEnrollment', or 'DesignerEnrollment'.""" if enrollment_role is not None: params["enrollment_role"] = enrollment_role # OPTIONAL - enrollment_role_id """When set, only return courses where the user is enrolled with the specified course-level role. This can be a role created with the {api:RoleOve...
submissions needing grading for all assignments is returned. - "syllabus_body": Optional information to include with each Course. When syllabus_body is given the user-generated html for the course syllabus is returned. - "public_description": Optional information to include with each Course. When public_description is ...
'current_grading_period_title', 'current_grading_period_id', current_period_computed_current_score', 'current_period_computed_final_score', 'current_period_computed_current_grade', and 'current_period_computed_final_grade' (see Enrollment documentation for more information on these fields). In addition, when this argum...
and 'next_requirement_url', a string url to the next requirement item, and 'completed_at', the date the course was completed (null if incomplete). 'next_requirement_url' will be null if all requirements have been completed or the current module does not require sequential progress. "course_progress" will return an erro...
integer for the total amount of active and invited students. - "passback_status": Include the grade passback_status - "favorites": Optional information to include with each Course. Indicates if the user has marked the course as a favorite course. - "teachers": Teacher information to include with each Course. Returns an...
"storage_quota_used_mb", "total_students", "passback_status", "favorites", "teachers", "observed_users"]) params["include"] = include # OPTIONAL - state """If set, only return courses that are in the given state(s). By default, "available" is returned for students and observers, and anything except "deleted", for all o...
def list_courses_for_user(self, user_id, enrollment_state=None, include=None, state=None): """ List courses for a user. Returns a list of active courses for this user. To view the course list for a user other than yourself, you must be either an observer of that user or an administrator. """ path = {} data = {} params ...
with each Course. When public_description is given the user-generated text for the course public description is returned. - "total_scores": Optional information to include with each Course. When total_scores is given, any student enrollments will also include the fields 'computed_current_score', 'computed_final_score',...
if the course is configured to hide final grades or if the total_scores argument is not included. - "term": Optional information to include with each Course. When term is given, the information for the enrollment term for each course is returned. - "course_progress": Optional information to include with each Course. Wh...
not require sequential progress. "course_progress" will return an error message if the course is not module based or the user is not enrolled as a student in the course. - "sections": Section enrollment information to include with each Course. Returns an array of hashes containing the section ID (id), section name (nam...
course. - "teachers": Teacher information to include with each Course. Returns an array of hashes containing the {api:Users:UserDisplay UserDisplay} information for each teacher in the course. - "observed_users": Optional information to include with each Course. Will include data for observed users if the current user ...
"deleted", for all other enrollment types""" if state is not None: self._validate_enum(state, ["unpublished", "available", "completed", "deleted"]) params["state"] = state # OPTIONAL - enrollment_state """When set, only return courses where the user has an enrollment with the given state. This will respect section/cour...
def create_new_course(self, account_id, course_allow_student_forum_attachments=None, course_allow_student_wiki_edits=None, course_allow_wiki_comments=None, course_apply_assignment_group_weights=None, course_course_code=None, course_course_format=None, course_end_at=None, course_grading_standard_id=None, course_hide_fin...
course[end_at] """Course end date in ISO8601 format. e.g. 2011-01-01T01:00Z""" if course_end_at is not None: data["course[end_at]"] = course_end_at # OPTIONAL - course[license] """The name of the licensing. Should be one of the following abbreviations (a descriptive name is included in parenthesis for reference): - 'pr...
public only to authenticated users.""" if course_is_public_to_auth_users is not None: data["course[is_public_to_auth_users]"] = course_is_public_to_auth_users # OPTIONAL - course[public_syllabus] """Set to true to make the course syllabus public.""" if course_public_syllabus is not None: data["course[public_syllabus]"]...
"""If true, students can attach files to forum posts.""" if course_allow_student_forum_attachments is not None: data["course[allow_student_forum_attachments]"] = course_allow_student_forum_attachments # OPTIONAL - course[open_enrollment] """Set to true if the course is open enrollment.""" if course_open_enrollment is n...
- course[integration_id] """The unique Integration identifier.""" if course_integration_id is not None: data["course[integration_id]"] = course_integration_id # OPTIONAL - course[hide_final_grades] """If this option is set to true, the totals in student grades summary will be hidden.""" if course_hide_final_grades is n...
OPTIONAL - enroll_me """Set to true to enroll the current user as the teacher.""" if enroll_me is not None: data["enroll_me"] = enroll_me # OPTIONAL - course[syllabus_body] """The syllabus body for the course""" if course_syllabus_body is not None: data["course[syllabus_body]"] = course_syllabus_body # OPTIONAL - cours...
= enable_sis_reactivation self.logger.debug("POST /api/v1/accounts/{account_id}/courses with query params: {params} and form data: {data}".format(params=params, data=data, **path)) return self.generic_request("POST", "/api/v1/accounts/{account_id}/courses".format(**path), data=data, params=params, single_item=True)
def list_users_in_course_users(self, course_id, enrollment_role=None, enrollment_role_id=None, enrollment_state=None, enrollment_type=None, include=None, search_term=None, user_id=None, user_ids=None): """ List users in course. Returns the list of users in this course. And optionally the user's enrollments in the cours...
"""Deprecated When set, only return users enrolled with the specified course-level role. This can be a role created with the {api:RoleOverridesController#add_role Add Role API} or a base role type of 'StudentEnrollment', 'TeacherEnrollment', 'TaEnrollment', 'ObserverEnrollment', or 'DesignerEnrollment'.""" if enrollmen...
account has permission to manage or view all grades, each enrollment will include a 'grades' key with 'current_score', 'final_score', 'current_grade' and 'final_grade' values. - "locked": Optionally include whether an enrollment is locked. - "avatar_url": Optionally include avatar_url. - "bio": Optionally include each ...
is not None: params["user_id"] = user_id # OPTIONAL - user_ids """If included, the course users set will only include users with IDs specified by the param. Note: this will not work in conjunction with the "user_id" argument but multiple user_ids can be included.""" if user_ids is not None: params["user_ids"] = user_id...
def conclude_course(self, id, event): """ Conclude a course. Delete or conclude an existing course """ path = {} data = {} params = {} # REQUIRED - PATH - id """ID""" path["id"] = id # REQUIRED - event """The action to take on the course.""" self._validate_enum(event, ["delete", "conclude"]) params["event"] = event sel...