Struct Course

Source
pub struct Course {
Show 42 fields pub id: usize, pub sis_course_id: Option<String>, pub uuid: Option<String>, pub integration_id: Option<usize>, pub sis_import_id: Option<usize>, pub name: Option<String>, pub course_code: Option<String>, pub workflow_state: Option<String>, pub account_id: Option<usize>, pub root_account_id: Option<usize>, pub enrollment_term_id: Option<usize>, pub grading_standard_id: Option<usize>, pub grade_passback_setting: Option<String>, pub created_at: Option<String>, pub start_at: Option<String>, pub end_at: Option<String>, pub locale: Option<String>, pub total_students: Option<usize>, pub default_view: Option<String>, pub syllabus_body: Option<String>, pub needs_grading_count: Option<usize>, pub apply_assignment_group_weights: Option<bool>, pub permissions: Option<Vec<String>>, pub is_public: Option<bool>, pub is_public_to_auth_users: Option<bool>, pub public_syllabus: Option<bool>, pub public_syllabus_to_auth: Option<bool>, pub public_description: Option<String>, pub storage_quota_mb: Option<usize>, pub storage_quota_used_mb: Option<usize>, pub hide_final_grades: Option<bool>, pub license: Option<String>, pub allow_student_assignment_edits: Option<bool>, pub allow_wiki_comments: Option<bool>, pub allow_student_forum_attachments: Option<bool>, pub open_enrollment: Option<bool>, pub self_enrollment: Option<bool>, pub restrict_enrollments_to_course_dates: Option<bool>, pub course_format: Option<String>, pub access_restricted_by_date: Option<bool>, pub time_zone: Option<String>, pub blueprint: Option<bool>,
}

Fields§

§id: usize§sis_course_id: Option<String>§uuid: Option<String>§integration_id: Option<usize>§sis_import_id: Option<usize>§name: Option<String>§course_code: Option<String>§workflow_state: Option<String>§account_id: Option<usize>§root_account_id: Option<usize>§enrollment_term_id: Option<usize>§grading_standard_id: Option<usize>§grade_passback_setting: Option<String>§created_at: Option<String>§start_at: Option<String>§end_at: Option<String>§locale: Option<String>§total_students: Option<usize>§default_view: Option<String>§syllabus_body: Option<String>§needs_grading_count: Option<usize>§apply_assignment_group_weights: Option<bool>§permissions: Option<Vec<String>>§is_public: Option<bool>§is_public_to_auth_users: Option<bool>§public_syllabus: Option<bool>§public_syllabus_to_auth: Option<bool>§public_description: Option<String>§storage_quota_mb: Option<usize>§storage_quota_used_mb: Option<usize>§hide_final_grades: Option<bool>§license: Option<String>§allow_student_assignment_edits: Option<bool>§allow_wiki_comments: Option<bool>§allow_student_forum_attachments: Option<bool>§open_enrollment: Option<bool>§self_enrollment: Option<bool>§restrict_enrollments_to_course_dates: Option<bool>§course_format: Option<String>§access_restricted_by_date: Option<bool>§time_zone: Option<String>§blueprint: Option<bool>

Implementations§

Source§

impl Course

Source

pub fn courses() -> Result<GetPagedObjectRequest<Course>>

Get all courses from the current user.

Get all outcome links for context - BETA

Source

pub fn get_assignment( &self, assignment_id: usize, ) -> Result<GetObjectRequest<Assignment>>

Return the assignment with the given id.

Source

pub fn get_assignment_group( &self, assignment_group_id: usize, ) -> Result<GetObjectRequest<AssignmentGroup>>

Retrieve specified assignment group for the specified course.

Source

pub fn get_assignment_groups( &self, ) -> Result<GetPagedObjectRequest<AssignmentGroup>>

List assignment groups for the specified course.

Source

pub fn get_assignments(&self) -> Result<GetPagedObjectRequest<Assignment>>

Get all the assignments of a course.

Source

pub fn get_assignments_for_group( &self, assignment_group_id: usize, ) -> Result<GetPagedObjectRequest<Assignment>>

Returns a list of assignments for the given assignment group.

Source

pub fn get_users(&self) -> Result<GetPagedObjectRequest<User>>

Get all the users from the course. This includes: teachers, students, teacher assistants…

Source

pub fn get_students(&self) -> Result<GetPagedObjectRequest<User>>

Get only the students from the course.

Source

pub fn get_files(&self) -> Result<GetPagedObjectRequest<File>>

Get all the files of a course.

Trait Implementations§

Source§

impl Debug for Course

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Course

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for Course

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

§

impl Freeze for Course

§

impl RefUnwindSafe for Course

§

impl Send for Course

§

impl Sync for Course

§

impl Unpin for Course

§

impl UnwindSafe for Course

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> MaybeSendSync for T