mirror of
https://github.com/alexmickelson/canvasManagement.git
synced 2026-03-26 15:48:32 -06:00
passing canvas models tests
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
namespace CanvasModel.Assignments;
|
||||
|
||||
public record AssignmentDateModel
|
||||
(
|
||||
[property: JsonPropertyName("title")]
|
||||
string Title,
|
||||
|
||||
[property: JsonPropertyName("id")]
|
||||
ulong? Id = null,
|
||||
|
||||
[property: JsonPropertyName("base")]
|
||||
bool? Base = null,
|
||||
|
||||
[property: JsonPropertyName("due_at")]
|
||||
DateTime? DueAt = null,
|
||||
|
||||
[property: JsonPropertyName("unlock_at")]
|
||||
DateTime? UnlockAt = null,
|
||||
|
||||
[property: JsonPropertyName("lock_at")]
|
||||
DateTime? LockAt = null
|
||||
);
|
||||
209
Management/Models/CanvasModels/Assignments/AssignmentModel.cs
Normal file
209
Management/Models/CanvasModels/Assignments/AssignmentModel.cs
Normal file
@@ -0,0 +1,209 @@
|
||||
using CanvasModel.Discussions;
|
||||
using CanvasModel.Submissions;
|
||||
|
||||
namespace CanvasModel.Assignments;
|
||||
|
||||
public record AssignmentModel
|
||||
(
|
||||
|
||||
[property: JsonPropertyName("id")]
|
||||
ulong Id,
|
||||
|
||||
[property: JsonPropertyName("name")]
|
||||
string Name,
|
||||
|
||||
[property: JsonPropertyName("description")]
|
||||
string Description,
|
||||
|
||||
[property: JsonPropertyName("created_at")]
|
||||
DateTime CreatedAt,
|
||||
|
||||
[property: JsonPropertyName("has_overrides")]
|
||||
bool HasOverrides,
|
||||
|
||||
[property: JsonPropertyName("course_id")]
|
||||
ulong CourseId,
|
||||
|
||||
[property: JsonPropertyName("html_url")]
|
||||
string HtmlUrl,
|
||||
|
||||
[property: JsonPropertyName("submissions_download_url")]
|
||||
string SubmissionsDownloadUrl,
|
||||
|
||||
[property: JsonPropertyName("assignment_group_id")]
|
||||
ulong AssignmentGroupId,
|
||||
|
||||
[property: JsonPropertyName("due_date_required")]
|
||||
bool DueDateRequired,
|
||||
|
||||
[property: JsonPropertyName("max_name_length")]
|
||||
uint MaxNameLength,
|
||||
|
||||
[property: JsonPropertyName("peer_reviews")]
|
||||
bool PeerReviews,
|
||||
|
||||
[property: JsonPropertyName("automatic_peer_reviews")]
|
||||
bool AutomaticPeerReviews,
|
||||
|
||||
[property: JsonPropertyName("position")]
|
||||
ulong Position,
|
||||
|
||||
[property: JsonPropertyName("grading_type")]
|
||||
string GradingType,
|
||||
|
||||
[property: JsonPropertyName("published")]
|
||||
bool Published,
|
||||
|
||||
[property: JsonPropertyName("unpublishable")]
|
||||
bool Unpublishable,
|
||||
|
||||
[property: JsonPropertyName("only_visible_to_overrides")]
|
||||
bool OnlyVisibleToOverrides,
|
||||
|
||||
[property: JsonPropertyName("locked_for_user")]
|
||||
bool LockedForUser,
|
||||
|
||||
[property: JsonPropertyName("moderated_grading")]
|
||||
bool ModeratedGrading,
|
||||
|
||||
[property: JsonPropertyName("grader_count")]
|
||||
uint GraderCount,
|
||||
|
||||
[property: JsonPropertyName("allowed_attempts")]
|
||||
int AllowedAttempts,
|
||||
|
||||
[property: JsonPropertyName("submission_types")]
|
||||
IEnumerable<string> SubmissionTypes,
|
||||
|
||||
[property: JsonPropertyName("updated_at")]
|
||||
DateTime? UpdatedAt = null,
|
||||
|
||||
[property: JsonPropertyName("due_at")]
|
||||
DateTime? DueAt = null,
|
||||
|
||||
[property: JsonPropertyName("lock_at")]
|
||||
DateTime? LockAt = null,
|
||||
|
||||
[property: JsonPropertyName("unlock_at")]
|
||||
DateTime? UnlockAt = null,
|
||||
|
||||
[property: JsonPropertyName("all_dates")]
|
||||
IEnumerable<AssignmentDateModel>? AllDates = null,
|
||||
|
||||
[property: JsonPropertyName("allowed_extensions")]
|
||||
IEnumerable<string>? AllowedExtensions = null,
|
||||
|
||||
[property: JsonPropertyName("turnitin_enabled")]
|
||||
bool? TurnitinEnabled = null,
|
||||
|
||||
[property: JsonPropertyName("vericite_enabled")]
|
||||
bool? VeriCiteEnabled = null,
|
||||
|
||||
[property: JsonPropertyName("turnitin_settings")]
|
||||
TurnitinSettingsModel? TurnitinSettings = null,
|
||||
|
||||
[property: JsonPropertyName("grade_group_students_individually")]
|
||||
bool? GradeGroupStudentsIndividually = null,
|
||||
|
||||
[property: JsonPropertyName("external_tool_tag_attributes")]
|
||||
ExternalToolTagAttributesModel? ExternalToolTagAttributes = null,
|
||||
|
||||
[property: JsonPropertyName("peer_review_count")]
|
||||
uint? PeerReviewCount = null,
|
||||
|
||||
[property: JsonPropertyName("peer_reviews_assign_at")]
|
||||
DateTime? PeerReviewsAssignAt = null,
|
||||
|
||||
[property: JsonPropertyName("intra_group_peer_reviews")]
|
||||
bool? IntraGroupPeerReviews = null,
|
||||
|
||||
[property: JsonPropertyName("group_category_id")]
|
||||
ulong? GroupCategoryId = null,
|
||||
|
||||
[property: JsonPropertyName("needs_grading_count")]
|
||||
uint? NeedsGradingCount = null,
|
||||
|
||||
[property: JsonPropertyName("needs_grading_count_be_section")]
|
||||
IEnumerable<NeedsGradingCountModel>? NeedsGradingCountBySection = null,
|
||||
|
||||
[property: JsonPropertyName("post_to_sis")]
|
||||
bool? PostToSis = null,
|
||||
|
||||
[property: JsonPropertyName("integration_id")]
|
||||
string? IntegrationId = null,
|
||||
|
||||
[property: JsonPropertyName("integration_data")]
|
||||
object? IntegrationData = null,
|
||||
|
||||
[property: JsonPropertyName("muted")]
|
||||
bool? Muted = null,
|
||||
|
||||
[property: JsonPropertyName("points_possible")]
|
||||
double? PointsPossible = null,
|
||||
|
||||
[property: JsonPropertyName("has_submitted_submissions")]
|
||||
bool? HasSubmittedSubmissions = null,
|
||||
|
||||
[property: JsonPropertyName("grading_standard_id")]
|
||||
ulong? GradingStandardId = null,
|
||||
|
||||
[property: JsonPropertyName("lock_info")]
|
||||
LockInfoModel? LockInfo = null,
|
||||
|
||||
[property: JsonPropertyName("lock_explanation")]
|
||||
string? LockExplanation = null,
|
||||
|
||||
[property: JsonPropertyName("quiz_id")]
|
||||
ulong? QuizId = null,
|
||||
|
||||
[property: JsonPropertyName("anonymous_submissions")]
|
||||
bool? AnonymousSubmissions = null,
|
||||
|
||||
[property: JsonPropertyName("discussion_topic")]
|
||||
DiscussionTopicModel? DiscussionTopic = null,
|
||||
|
||||
[property: JsonPropertyName("freeze_on_copy")]
|
||||
bool? FreezeOnCopy = null,
|
||||
|
||||
[property: JsonPropertyName("frozen")]
|
||||
bool? Frozen = null,
|
||||
|
||||
[property: JsonPropertyName("frozen_attributes")]
|
||||
IEnumerable<string>? FrozenAttributes = null,
|
||||
|
||||
[property: JsonPropertyName("submission")]
|
||||
SubmissionModel? Submission = null,
|
||||
|
||||
[property: JsonPropertyName("use_rubric_for_grading")]
|
||||
bool? UseRubricForGrading = null,
|
||||
|
||||
[property: JsonPropertyName("rubric_settings")]
|
||||
object? RubricSettings = null,
|
||||
|
||||
[property: JsonPropertyName("rubric")]
|
||||
IEnumerable<RubricCriteriaModel>? Rubric = null,
|
||||
|
||||
[property: JsonPropertyName("assignment_visibility")]
|
||||
IEnumerable<ulong>? AssignmentVisibility = null,
|
||||
|
||||
[property: JsonPropertyName("overrides")]
|
||||
IEnumerable<AssignmentOverrideModel>? Overrides = null,
|
||||
|
||||
[property: JsonPropertyName("omit_from_final_grade")]
|
||||
bool? OmitFromFinalGrade = null,
|
||||
|
||||
[property: JsonPropertyName("final_grader_id")]
|
||||
ulong? FinalGraderId = null,
|
||||
|
||||
[property: JsonPropertyName("grader_comments_visible_to_graders")]
|
||||
bool? GraderCommentsVisibleToGraders = null,
|
||||
|
||||
[property: JsonPropertyName("graders_anonymous_to_graders")]
|
||||
bool? GradersAnonymousToGraders = null,
|
||||
|
||||
[property: JsonPropertyName("grader_names_anonymous_to_final_grader")]
|
||||
bool? GraderNamesVisibleToFinalGrader = null,
|
||||
|
||||
[property: JsonPropertyName("anonymous_grading")]
|
||||
bool? AnonymousGrading = null
|
||||
);
|
||||
@@ -0,0 +1,38 @@
|
||||
namespace CanvasModel.Assignments;
|
||||
|
||||
public record AssignmentOverrideModel
|
||||
(
|
||||
|
||||
[property: JsonPropertyName("id")]
|
||||
ulong Id,
|
||||
|
||||
[property: JsonPropertyName("assignment_id")]
|
||||
ulong AssignmentId,
|
||||
|
||||
[property: JsonPropertyName("course_section_ids")]
|
||||
ulong CourseSectionId,
|
||||
|
||||
[property: JsonPropertyName("title")]
|
||||
string Title,
|
||||
|
||||
[property: JsonPropertyName("student_ids")]
|
||||
IEnumerable<ulong>? StudentIds = null,
|
||||
|
||||
[property: JsonPropertyName("group_id")]
|
||||
ulong? GroupId = null,
|
||||
|
||||
[property: JsonPropertyName("due_at")]
|
||||
DateTime? DueAt = null,
|
||||
|
||||
[property: JsonPropertyName("all_day")]
|
||||
bool? AllDay = null,
|
||||
|
||||
[property: JsonPropertyName("all_day_date")]
|
||||
DateTime? AllDayDate = null,
|
||||
|
||||
[property: JsonPropertyName("unlock_at")]
|
||||
DateTime? UnlockAt = null,
|
||||
|
||||
[property: JsonPropertyName("lock_at")]
|
||||
DateTime? LockAt = null
|
||||
);
|
||||
@@ -0,0 +1,13 @@
|
||||
namespace CanvasModel.Assignments;
|
||||
|
||||
public record ExternalToolTagAttributesModel
|
||||
(
|
||||
[property: JsonPropertyName("url")]
|
||||
string Url,
|
||||
|
||||
[property: JsonPropertyName("resource_link_id")]
|
||||
string ResourceLinkId,
|
||||
|
||||
[property: JsonPropertyName("new_tab")]
|
||||
bool? NewTab = null
|
||||
);
|
||||
19
Management/Models/CanvasModels/Assignments/LockInfoModel.cs
Normal file
19
Management/Models/CanvasModels/Assignments/LockInfoModel.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
namespace CanvasModel.Assignments;
|
||||
|
||||
public record LockInfoModel
|
||||
(
|
||||
[property: JsonPropertyName("asset_string")]
|
||||
string AssetString,
|
||||
|
||||
[property: JsonPropertyName("unlock_at")]
|
||||
DateTime? UnlockAt = null,
|
||||
|
||||
[property: JsonPropertyName("lock_at")]
|
||||
DateTime? LockAt = null,
|
||||
|
||||
[property: JsonPropertyName("context_module")]
|
||||
object? ContextModule = null,
|
||||
|
||||
[property: JsonPropertyName("manually_locked")]
|
||||
bool? ManuallyLocked = null
|
||||
);
|
||||
@@ -0,0 +1,10 @@
|
||||
namespace CanvasModel.Assignments;
|
||||
|
||||
public record NeedsGradingCountModel
|
||||
(
|
||||
[property: JsonPropertyName("section_id")]
|
||||
string SectionId,
|
||||
|
||||
[property: JsonPropertyName("needs_grading_count")]
|
||||
uint NeedsGradingCount
|
||||
);
|
||||
@@ -0,0 +1,30 @@
|
||||
namespace CanvasModel.Assignments;
|
||||
|
||||
public record RubricCriteriaModel
|
||||
(
|
||||
[property: JsonPropertyName("id")]
|
||||
string Id,
|
||||
|
||||
[property: JsonPropertyName("description")]
|
||||
string Description,
|
||||
|
||||
[property: JsonPropertyName("long_description")]
|
||||
string LongDescription,
|
||||
|
||||
[property: JsonPropertyName("points")]
|
||||
double? Points,
|
||||
[property: JsonPropertyName("learning_outcome_id")]
|
||||
string? LearningOutcomeId,
|
||||
|
||||
[property: JsonPropertyName("vendor_guid")]
|
||||
string? VendorGuid,
|
||||
|
||||
[property: JsonPropertyName("criterion_use_range")]
|
||||
bool? CriterionUseRange = null,
|
||||
|
||||
[property: JsonPropertyName("ratings")]
|
||||
IEnumerable<RubricRatingModel>? Ratings = null,
|
||||
|
||||
[property: JsonPropertyName("ignore_for_scoring")]
|
||||
bool? IgnoreForScoring = null
|
||||
);
|
||||
@@ -0,0 +1,16 @@
|
||||
namespace CanvasModel.Assignments;
|
||||
|
||||
public record RubricRatingModel
|
||||
(
|
||||
[property: JsonPropertyName("points")]
|
||||
double Points,
|
||||
|
||||
[property: JsonPropertyName("id")]
|
||||
string Id,
|
||||
|
||||
[property: JsonPropertyName("description")]
|
||||
string Description,
|
||||
|
||||
[property: JsonPropertyName("long_description")]
|
||||
string LongDescription
|
||||
);
|
||||
@@ -0,0 +1,28 @@
|
||||
namespace CanvasModel.Assignments;
|
||||
|
||||
public record TurnitinSettingsModel
|
||||
(
|
||||
[property: JsonPropertyName("originality_report_visibility")]
|
||||
string OriginalityReportVisibility,
|
||||
|
||||
[property: JsonPropertyName("s_paper_check")]
|
||||
bool SPaperCheck,
|
||||
|
||||
[property: JsonPropertyName("internet_check")]
|
||||
bool InternetCheck,
|
||||
|
||||
[property: JsonPropertyName("journal_check")]
|
||||
bool JournalCheck,
|
||||
|
||||
[property: JsonPropertyName("exclude_biblio")]
|
||||
bool ExcludeBiblio,
|
||||
|
||||
[property: JsonPropertyName("exclude_quoted")]
|
||||
bool ExcludeQuoted,
|
||||
|
||||
[property: JsonPropertyName("exclude_small_matches_type")]
|
||||
bool? ExcludeSmallMatchesType = null,
|
||||
|
||||
[property: JsonPropertyName("exclude_small_matches_value")]
|
||||
uint? ExcludeSmallMatchesValue = null
|
||||
);
|
||||
@@ -0,0 +1,5 @@
|
||||
namespace CanvasModel.Courses;
|
||||
public record CalendarLinkModel
|
||||
(
|
||||
[property: JsonPropertyName("ics")] string Ics
|
||||
);
|
||||
53
Management/Models/CanvasModels/Courses/CourseModel.cs
Normal file
53
Management/Models/CanvasModels/Courses/CourseModel.cs
Normal file
@@ -0,0 +1,53 @@
|
||||
using CanvasModel.Enrollments;
|
||||
|
||||
namespace CanvasModel.Courses;
|
||||
public record CourseModel
|
||||
(
|
||||
[property: JsonPropertyName("id")] ulong Id,
|
||||
[property: JsonPropertyName("sis_course_id")] string SisCourseId,
|
||||
[property: JsonPropertyName("uuid")] string Uuid,
|
||||
[property: JsonPropertyName("integration_id")] string IntegrationId,
|
||||
[property: JsonPropertyName("name")] string Name,
|
||||
[property: JsonPropertyName("course_code")] string CourseCode,
|
||||
[property: JsonPropertyName("workflow_state")] string WorkflowState,
|
||||
[property: JsonPropertyName("account_id")] ulong AccountId,
|
||||
[property: JsonPropertyName("root_account_id")] ulong RootAccountId,
|
||||
[property: JsonPropertyName("enrollment_term_id")] ulong EnrollmentTermId,
|
||||
[property: JsonPropertyName("created_at")] DateTime CreatedAt,
|
||||
[property: JsonPropertyName("locale")] string Locale,
|
||||
[property: JsonPropertyName("calendar")] CalendarLinkModel Calendar,
|
||||
[property: JsonPropertyName("default_view")] string DefaultView,
|
||||
[property: JsonPropertyName("syllabus_body")] string SyllabusBody,
|
||||
[property: JsonPropertyName("permissions")] Dictionary<string, bool> Permissions,
|
||||
[property: JsonPropertyName("storage_quota_mb")] ulong StorageQuotaMb,
|
||||
[property: JsonPropertyName("storage_quota_used_mb")] ulong StorageQuotaUsedMb,
|
||||
[property: JsonPropertyName("license")] string License,
|
||||
[property: JsonPropertyName("course_format")] string CourseFormat,
|
||||
[property: JsonPropertyName("time_zone")] string TimeZone,
|
||||
[property: JsonPropertyName("sis_import_id")] ulong? SisImportId = null,
|
||||
[property: JsonPropertyName("grading_standard_id")] ulong? GradingStandardId = null,
|
||||
[property: JsonPropertyName("start_at")] DateTime? StartAt = null,
|
||||
[property: JsonPropertyName("end_at")] DateTime? EndAt = null,
|
||||
[property: JsonPropertyName("enrollments")] IEnumerable<EnrollmentModel>? Enrollments = null,
|
||||
[property: JsonPropertyName("total_students")] ulong? TotalStudents = null,
|
||||
[property: JsonPropertyName("needs_grading_count")] uint? NeedsGradingCount = null,
|
||||
[property: JsonPropertyName("term")] TermModel? Term = null,
|
||||
[property: JsonPropertyName("course_progress")] CourseProgressModel? CourseProgress = null,
|
||||
[property: JsonPropertyName("apply_assignment_group_weights")] bool? ApplyAssignmentGroupWeights = null,
|
||||
[property: JsonPropertyName("is_public")] bool? Is= null,
|
||||
[property: JsonPropertyName("is_public_to_auth_users")] bool? IsPublicToAuthUsers = null,
|
||||
[property: JsonPropertyName("public_syllabus")] bool? PublicSyllabus = null,
|
||||
[property: JsonPropertyName("public_syllabus_to_auth")] bool? PublicSyllabusToAuth = null,
|
||||
[property: JsonPropertyName("public_description")] string? PublicDescription = null,
|
||||
[property: JsonPropertyName("hide_final_grades")] bool? HideFinalGrades = null,
|
||||
[property: JsonPropertyName("allow_student_assignment_edits")] bool? AllowStudentAssignmentEdits = null,
|
||||
[property: JsonPropertyName("allow_wiki_comments")] bool? AllowWikiComments = null,
|
||||
[property: JsonPropertyName("allow_student_forum_attachments")] bool? AllowStudentForumAttachments = null,
|
||||
[property: JsonPropertyName("open_enrollment")] bool? OpenEnrollment = null,
|
||||
[property: JsonPropertyName("self_enrollment")] bool? SelfEnrollment = null,
|
||||
[property: JsonPropertyName("restrict_enrollments_to_courses")] bool? RestrictEnrollmentsToCourseDates = null,
|
||||
[property: JsonPropertyName("access_restricted_by_date")] bool? AccessRestrictedByDate = null,
|
||||
[property: JsonPropertyName("blueprint")] bool? Blueprint = null,
|
||||
[property: JsonPropertyName("blueprint_restrictions")] Dictionary<string, bool>? BlueprintRestrictions = null,
|
||||
[property: JsonPropertyName("blueprint_restrictions_by_object_type")] Dictionary<string, Dictionary<string, bool>>? BlueprintRestrictionsByObjectType = null
|
||||
);
|
||||
@@ -0,0 +1,16 @@
|
||||
|
||||
namespace CanvasModel.Courses;
|
||||
public record CourseProgressModel
|
||||
(
|
||||
[property: JsonPropertyName("requirement_count")]
|
||||
uint? RequirementCount = null,
|
||||
|
||||
[property: JsonPropertyName("requirement_completed_count")]
|
||||
uint? RequirementCompletedCount = null,
|
||||
|
||||
[property: JsonPropertyName("next_requirement_url")]
|
||||
string? NextRequirementUrl = null,
|
||||
|
||||
[property: JsonPropertyName("completed_at")]
|
||||
DateTime? CompletedAt = null
|
||||
);
|
||||
@@ -0,0 +1,46 @@
|
||||
namespace CanvasModel.Courses;
|
||||
public record CourseSettingsModel
|
||||
(
|
||||
|
||||
[property: JsonPropertyName("allow_final_grade_override")]
|
||||
bool AllowFinalGradeOverride,
|
||||
|
||||
[property: JsonPropertyName("allow_student_discussion_topics")]
|
||||
bool AllowStudentDiscussionTopics,
|
||||
|
||||
[property: JsonPropertyName("allow_student_forum_attachments")]
|
||||
bool AllowStudentForumAttachments,
|
||||
|
||||
[property: JsonPropertyName("allow_student_discussion_editing")]
|
||||
bool AllowStudentDiscussionEditing,
|
||||
|
||||
[property: JsonPropertyName("grading_standard_enabled")]
|
||||
bool GradingStandardEnabled,
|
||||
|
||||
[property: JsonPropertyName("allow_student_organized_groups")]
|
||||
bool AllowStudentOrganizedGroups,
|
||||
|
||||
[property: JsonPropertyName("hide_final_groups")]
|
||||
bool HideFinalGrades,
|
||||
|
||||
[property: JsonPropertyName("hide_distributor_graphs")]
|
||||
bool HideDistributionGraphs,
|
||||
|
||||
[property: JsonPropertyName("lock_all_announcements")]
|
||||
bool LockAllAnnouncements,
|
||||
|
||||
[property: JsonPropertyName("restrict_student_past_view")]
|
||||
bool RestrictStudentPastView,
|
||||
|
||||
[property: JsonPropertyName("restrict_student_future_view")]
|
||||
bool RestrictStudentFutureView,
|
||||
|
||||
[property: JsonPropertyName("show_announcements_on_home_page")]
|
||||
bool ShowAnnouncementsOnHomePage,
|
||||
|
||||
[property: JsonPropertyName("home_page_announcements_limit")]
|
||||
long HomePageAnnouncementLimit,
|
||||
|
||||
[property: JsonPropertyName("grading_standard_id")]
|
||||
ulong? GradingStandardId = null
|
||||
);
|
||||
@@ -0,0 +1,6 @@
|
||||
namespace CanvasModel.Courses;
|
||||
public record ShortCourseModel
|
||||
(
|
||||
[property: JsonPropertyName("id")] ulong Id,
|
||||
[property: JsonPropertyName("name")] string Name
|
||||
);
|
||||
8
Management/Models/CanvasModels/Courses/TermModel.cs
Normal file
8
Management/Models/CanvasModels/Courses/TermModel.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
namespace CanvasModel.Courses;
|
||||
public record TermModel
|
||||
(
|
||||
[property: JsonPropertyName("id")] ulong Id,
|
||||
[property: JsonPropertyName("name")] string Name,
|
||||
[property: JsonPropertyName("start_at")] DateTime? StartAt = null,
|
||||
[property: JsonPropertyName("end_at")] DateTime? EndAt = null
|
||||
);
|
||||
@@ -0,0 +1,111 @@
|
||||
using CanvasModel.Users;
|
||||
|
||||
namespace CanvasModel.Discussions;
|
||||
|
||||
public record DiscussionTopicModel
|
||||
(
|
||||
[property: JsonPropertyName("id")]
|
||||
ulong Id,
|
||||
|
||||
[property: JsonPropertyName("title")]
|
||||
string Title,
|
||||
|
||||
[property: JsonPropertyName("message")]
|
||||
string Message,
|
||||
|
||||
[property: JsonPropertyName("html_url")]
|
||||
string HtmlUrl,
|
||||
|
||||
[property: JsonPropertyName("read_state")]
|
||||
string ReadState,
|
||||
|
||||
[property: JsonPropertyName("subscription_hold")]
|
||||
string SubscriptionHold,
|
||||
|
||||
[property: JsonPropertyName("assignment_id")]
|
||||
int AssignmentId,
|
||||
|
||||
[property: JsonPropertyName("lock_explanation")]
|
||||
string LockExplanation,
|
||||
|
||||
[property: JsonPropertyName("user_name")]
|
||||
string UserName,
|
||||
|
||||
[property: JsonPropertyName("topic_children")]
|
||||
IEnumerable<uint> TopicChildren,
|
||||
|
||||
[property: JsonPropertyName("podcast_url")]
|
||||
string PodcastUrl,
|
||||
|
||||
[property: JsonPropertyName("discussion_type")]
|
||||
string DiscussionType,
|
||||
|
||||
[property: JsonPropertyName("attachments")]
|
||||
IEnumerable<FileAttachmentModel> Attachments,
|
||||
|
||||
[property: JsonPropertyName("permissions")]
|
||||
Dictionary<string, bool> Permissions,
|
||||
|
||||
[property: JsonPropertyName("author")]
|
||||
UserDisplayModel Author,
|
||||
|
||||
[property: JsonPropertyName("unread_count")]
|
||||
uint? UnreadCount = null,
|
||||
|
||||
[property: JsonPropertyName("subscribed")]
|
||||
bool? Subscribed = null,
|
||||
|
||||
[property: JsonPropertyName("posted_at")]
|
||||
DateTime? PostedAt = null,
|
||||
|
||||
[property: JsonPropertyName("last_reply_at")]
|
||||
DateTime? LastReplyAt = null,
|
||||
|
||||
[property: JsonPropertyName("require_initial_post")]
|
||||
bool? RequireInitialPost = null,
|
||||
|
||||
[property: JsonPropertyName("user_can_see_posts")]
|
||||
bool? UserCanSeePosts = null,
|
||||
|
||||
[property: JsonPropertyName("discussion_subentry_count")]
|
||||
uint? DiscussionSubentryCount = null,
|
||||
|
||||
[property: JsonPropertyName("delayed_post_at")]
|
||||
DateTime? DelayedPostAt = null,
|
||||
|
||||
[property: JsonPropertyName("published")]
|
||||
bool? Published = null,
|
||||
|
||||
[property: JsonPropertyName("lock_at")]
|
||||
DateTime? LockAt = null,
|
||||
|
||||
[property: JsonPropertyName("locked")]
|
||||
bool? Locked = null,
|
||||
|
||||
[property: JsonPropertyName("pinned")]
|
||||
bool? Pinned = null,
|
||||
|
||||
[property: JsonPropertyName("locked_for_user")]
|
||||
bool? LockedForUser = null,
|
||||
|
||||
[property: JsonPropertyName("lock_info")]
|
||||
object? LockInfo = null,
|
||||
|
||||
[property: JsonPropertyName("group_topic_children")]
|
||||
object? GroupTopicChildren = null,
|
||||
|
||||
[property: JsonPropertyName("root_topic_id")]
|
||||
ulong? RootTopicId = null,
|
||||
|
||||
[property: JsonPropertyName("group_category_id")]
|
||||
ulong? GroupCategoryId = null,
|
||||
|
||||
[property: JsonPropertyName("allow_rating")]
|
||||
bool? AllowRating = null,
|
||||
|
||||
[property: JsonPropertyName("only_graders_can_rate")]
|
||||
bool? OnlyGradersCanRate = null,
|
||||
|
||||
[property: JsonPropertyName("sort_by_rating")]
|
||||
bool? SortByRating = null
|
||||
);
|
||||
@@ -0,0 +1,16 @@
|
||||
namespace CanvasModel.Discussions;
|
||||
|
||||
public record FileAttachmentModel
|
||||
(
|
||||
[property: JsonPropertyName("content_type")]
|
||||
string ContentType,
|
||||
|
||||
[property: JsonPropertyName("url")]
|
||||
string Url,
|
||||
|
||||
[property: JsonPropertyName("filename")]
|
||||
string Filename,
|
||||
|
||||
[property: JsonPropertyName("display_name")]
|
||||
string DisplayName
|
||||
);
|
||||
@@ -0,0 +1,40 @@
|
||||
namespace CanvasModel.Discussions;
|
||||
|
||||
public record TopicEntryModel
|
||||
(
|
||||
[property: JsonPropertyName("id")]
|
||||
ulong Id,
|
||||
|
||||
[property: JsonPropertyName("user_id")]
|
||||
ulong UserId,
|
||||
|
||||
[property: JsonPropertyName("user_name")]
|
||||
string UserName,
|
||||
|
||||
[property: JsonPropertyName("message")]
|
||||
string Message,
|
||||
|
||||
[property: JsonPropertyName("read_state")]
|
||||
string ReadState,
|
||||
|
||||
[property: JsonPropertyName("forced_read_state")]
|
||||
bool ForcedReadState,
|
||||
|
||||
[property: JsonPropertyName("created_at")]
|
||||
DateTime CreatedAt,
|
||||
|
||||
[property: JsonPropertyName("editor_id")]
|
||||
ulong? EditorId = null,
|
||||
|
||||
[property: JsonPropertyName("updated_at")]
|
||||
DateTime? UpdatedAt = null,
|
||||
|
||||
[property: JsonPropertyName("attachment")]
|
||||
FileAttachmentModel? Attachment = null,
|
||||
|
||||
[property: JsonPropertyName("recent_replies")]
|
||||
IEnumerable<TopicReplyModel>? RecentReplies = null,
|
||||
|
||||
[property: JsonPropertyName("has_more_replies")]
|
||||
bool? HasMoreReplies = null
|
||||
);
|
||||
@@ -0,0 +1,28 @@
|
||||
namespace CanvasModel.Discussions;
|
||||
|
||||
public record TopicReplyModel
|
||||
(
|
||||
[property: JsonPropertyName("id")]
|
||||
ulong Id,
|
||||
|
||||
[property: JsonPropertyName("user_id")]
|
||||
ulong UserId,
|
||||
|
||||
[property: JsonPropertyName("user_name")]
|
||||
string UserName,
|
||||
|
||||
[property: JsonPropertyName("message")]
|
||||
string Message,
|
||||
|
||||
[property: JsonPropertyName("read_state")]
|
||||
string ReadState,
|
||||
|
||||
[property: JsonPropertyName("created_at")]
|
||||
DateTime CreatedAt,
|
||||
|
||||
[property: JsonPropertyName("editor_id")]
|
||||
ulong? EditorId = null,
|
||||
|
||||
[property: JsonPropertyName("forced_read_state")]
|
||||
bool? ForcedReadState = null
|
||||
);
|
||||
@@ -0,0 +1,21 @@
|
||||
namespace CanvasModel.EnrollmentTerms;
|
||||
|
||||
public record EnrollmentTermModel
|
||||
(
|
||||
[property: JsonPropertyName("id")] ulong Id,
|
||||
[property: JsonPropertyName("name")] string Name,
|
||||
[property: JsonPropertyName("sis_term_id")] string? SisTermId = null,
|
||||
[property: JsonPropertyName("sis_import_id")] ulong? SisImportId = null,
|
||||
[property: JsonPropertyName("start_at")] DateTime? StartAt = null,
|
||||
[property: JsonPropertyName("end_at")] DateTime? EndAt = null,
|
||||
[property: JsonPropertyName("grading_period_group_id")] ulong? GradingPeriodGroupId = null,
|
||||
[property: JsonPropertyName("workflow_state")] string? WorkflowState = null,
|
||||
[property: JsonPropertyName("overrides")]
|
||||
Dictionary<string, EnrollmentTermDateOverrideModel>? Overrides = null
|
||||
);
|
||||
|
||||
public record EnrollmentTermDateOverrideModel
|
||||
(
|
||||
[property: JsonPropertyName("start_at")] DateTime? StartAt = null,
|
||||
[property: JsonPropertyName("end_at")] DateTime? EndAt = null
|
||||
);
|
||||
@@ -0,0 +1,7 @@
|
||||
namespace CanvasModel.EnrollmentTerms;
|
||||
|
||||
public record RedundantEnrollmentTermsResponse
|
||||
(
|
||||
[property: JsonPropertyName("enrollment_terms")]
|
||||
IEnumerable<EnrollmentTermModel> EnrollmentTerms
|
||||
);
|
||||
135
Management/Models/CanvasModels/Enrollments/EnrollmentModel.cs
Normal file
135
Management/Models/CanvasModels/Enrollments/EnrollmentModel.cs
Normal file
@@ -0,0 +1,135 @@
|
||||
using CanvasModel.Users;
|
||||
|
||||
namespace CanvasModel.Enrollments;
|
||||
public record EnrollmentModel
|
||||
(
|
||||
|
||||
[property: JsonPropertyName("id")]
|
||||
ulong Id,
|
||||
|
||||
[property: JsonPropertyName("course_id")]
|
||||
ulong CourseId,
|
||||
|
||||
[property: JsonPropertyName("enrollment_state")]
|
||||
string EnrollmentState,
|
||||
|
||||
[property: JsonPropertyName("type")]
|
||||
string Type,
|
||||
|
||||
[property: JsonPropertyName("user_id")]
|
||||
ulong UserId,
|
||||
|
||||
[property: JsonPropertyName("role")]
|
||||
string Role,
|
||||
|
||||
[property: JsonPropertyName("role_id")]
|
||||
ulong RoleId,
|
||||
|
||||
[property: JsonPropertyName("html_url")]
|
||||
string HtmlUrl,
|
||||
|
||||
[property: JsonPropertyName("grades")]
|
||||
GradeModel Grades,
|
||||
|
||||
[property: JsonPropertyName("user")]
|
||||
UserDisplayModel User,
|
||||
|
||||
[property: JsonPropertyName("override_grade")]
|
||||
string OverrideGrade,
|
||||
|
||||
[property: JsonPropertyName("sis_course_id")]
|
||||
string? SisCourseId = null,
|
||||
|
||||
[property: JsonPropertyName("course_integration_id")]
|
||||
string? CourseIntegrationId = null,
|
||||
|
||||
[property: JsonPropertyName("course_section_id")]
|
||||
ulong? CourseSectionId = null,
|
||||
|
||||
[property: JsonPropertyName("section_integration_id")]
|
||||
string? SectionIntegrationId = null,
|
||||
|
||||
[property: JsonPropertyName("sis_account_id")]
|
||||
string? SisAccountId = null,
|
||||
|
||||
[property: JsonPropertyName("sis_section_id")]
|
||||
string? SisSectionId = null,
|
||||
|
||||
[property: JsonPropertyName("sis_user_id")]
|
||||
string? SisUserId = null,
|
||||
|
||||
[property: JsonPropertyName("limit_privileges_to_course_section")]
|
||||
bool? LimitPrivilegesToCourseSection = null,
|
||||
|
||||
[property: JsonPropertyName("sis_import_id")]
|
||||
ulong? SisImportId = null,
|
||||
|
||||
[property: JsonPropertyName("root_account_id")]
|
||||
ulong? RootAccountId = null,
|
||||
|
||||
[property: JsonPropertyName("associated_user_id")]
|
||||
ulong? AssociatedUserId = null,
|
||||
|
||||
[property: JsonPropertyName("created_at")]
|
||||
DateTime? CreatedAt = null,
|
||||
|
||||
[property: JsonPropertyName("updated_at")]
|
||||
DateTime? UpdatedAt = null,
|
||||
|
||||
[property: JsonPropertyName("start_at")]
|
||||
DateTime? StartAt = null,
|
||||
|
||||
[property: JsonPropertyName("end_at")]
|
||||
DateTime? EndAt = null,
|
||||
|
||||
[property: JsonPropertyName("last_activity_at")]
|
||||
DateTime? LastActivityAt = null,
|
||||
|
||||
[property: JsonPropertyName("last_attended_at")]
|
||||
DateTime? LastAttendedAt = null,
|
||||
|
||||
[property: JsonPropertyName("total_activity_time")]
|
||||
ulong? TotalActivityTime = null,
|
||||
|
||||
[property: JsonPropertyName("override_score")]
|
||||
decimal? OverrideScore = null,
|
||||
|
||||
[property: JsonPropertyName("unposted_current_grade")]
|
||||
string? UnpostedCurrentGrade = null,
|
||||
|
||||
[property: JsonPropertyName("unposted_final_grade")]
|
||||
string? UnpostedFinalGrade = null,
|
||||
|
||||
[property: JsonPropertyName("unposted_current_score")]
|
||||
string? UnpostedCurrentScore = null,
|
||||
|
||||
[property: JsonPropertyName("unposted_final_score")]
|
||||
string? UnpostedFinalScore = null,
|
||||
|
||||
[property: JsonPropertyName("has_grading_periods")]
|
||||
bool? HasGradingPeriods = null,
|
||||
|
||||
[property: JsonPropertyName("totals_for_all_grading_periods_option")]
|
||||
bool? TotalsForAllGradingPeriodsOption = null,
|
||||
|
||||
[property: JsonPropertyName("current_grading_period_title")]
|
||||
string? CurrentGradingPeriodTitle = null,
|
||||
|
||||
[property: JsonPropertyName("current_grading_period_id")]
|
||||
ulong? CurrentGradingPeriodId = null,
|
||||
|
||||
[property: JsonPropertyName("current_period_override_grade")]
|
||||
string? CurrentPeriodOverrideGrade = null,
|
||||
|
||||
[property: JsonPropertyName("current_period_override_score")]
|
||||
decimal? CurrentPeriodOverrideScore = null,
|
||||
|
||||
[property: JsonPropertyName("current_period_unposted_final_score")]
|
||||
decimal? CurrentPeriodUnpostedFinalScore = null,
|
||||
|
||||
[property: JsonPropertyName("current_period_unposted_current_grade")]
|
||||
string? CurrentPeriodUnpostedCurrentGrade = null,
|
||||
|
||||
[property: JsonPropertyName("current_period_unposted_final_grade")]
|
||||
string? CurrentPeriodUnpostedFinalGrade = null
|
||||
);
|
||||
33
Management/Models/CanvasModels/Enrollments/GradeModel.cs
Normal file
33
Management/Models/CanvasModels/Enrollments/GradeModel.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
|
||||
|
||||
|
||||
namespace CanvasModel.Enrollments;
|
||||
public record GradeModel
|
||||
(
|
||||
[property: JsonPropertyName("html_url")]
|
||||
string? HtmlUrl = null,
|
||||
|
||||
[property: JsonPropertyName("current_grade")]
|
||||
string? CurrentGrade = null,
|
||||
|
||||
[property: JsonPropertyName("final_grade")]
|
||||
string? FinalGrade = null,
|
||||
|
||||
[property: JsonPropertyName("current_score")]
|
||||
string? CurrentScore = null,
|
||||
|
||||
[property: JsonPropertyName("final_score")]
|
||||
string? FinalScore = null,
|
||||
|
||||
[property: JsonPropertyName("unposted_current_grade")]
|
||||
string? UnpostedCurrentGrade = null,
|
||||
|
||||
[property: JsonPropertyName("unposted_final_grade")]
|
||||
string? UnpostedFinalGrade = null,
|
||||
|
||||
[property: JsonPropertyName("unposted_current_score")]
|
||||
string? UnpostedCurrentScore = null,
|
||||
|
||||
[property: JsonPropertyName("unposted_final_score")]
|
||||
string? UnpostedFinalScore = null
|
||||
);
|
||||
@@ -0,0 +1,19 @@
|
||||
namespace CanvasModel.Submissions;
|
||||
public record MediaCommentModel
|
||||
(
|
||||
|
||||
[property: JsonPropertyName("content-type")]
|
||||
string ContentType,
|
||||
|
||||
[property: JsonPropertyName("display_name")]
|
||||
string DisplayName,
|
||||
|
||||
[property: JsonPropertyName("media_id")]
|
||||
string MediaId,
|
||||
|
||||
[property: JsonPropertyName("media_type")]
|
||||
string MediaType,
|
||||
|
||||
[property: JsonPropertyName("url")]
|
||||
string Url
|
||||
);
|
||||
@@ -0,0 +1,29 @@
|
||||
using CanvasModel.Users;
|
||||
|
||||
namespace CanvasModel.Submissions;
|
||||
public record SubmissionCommentModel
|
||||
(
|
||||
[property: JsonPropertyName("id")]
|
||||
ulong Id,
|
||||
|
||||
[property: JsonPropertyName("author_id")]
|
||||
ulong AuthorId,
|
||||
|
||||
[property: JsonPropertyName("author_name")]
|
||||
string AuthorName,
|
||||
|
||||
[property: JsonPropertyName("author")]
|
||||
UserDisplayModel Author,
|
||||
|
||||
[property: JsonPropertyName("comment")]
|
||||
string Comment,
|
||||
|
||||
[property: JsonPropertyName("created_at")]
|
||||
DateTime CreatedAt,
|
||||
|
||||
[property: JsonPropertyName("edited_at")]
|
||||
DateTime? EditedAt = null,
|
||||
|
||||
[property: JsonPropertyName("media_comment")]
|
||||
MediaCommentModel? MediaComment = null
|
||||
);
|
||||
@@ -0,0 +1,91 @@
|
||||
using CanvasModel.Assignments;
|
||||
using CanvasModel.Courses;
|
||||
using CanvasModel.Users;
|
||||
|
||||
namespace CanvasModel.Submissions;
|
||||
public record SubmissionModel
|
||||
(
|
||||
[property: JsonPropertyName("assignment_id")]
|
||||
ulong AssignmentId,
|
||||
|
||||
[property: JsonPropertyName("grade")]
|
||||
string Grade,
|
||||
|
||||
[property: JsonPropertyName("html_url")]
|
||||
string HtmlUrl,
|
||||
|
||||
[property: JsonPropertyName("preview_url")]
|
||||
string PreviewUrl,
|
||||
|
||||
[property: JsonPropertyName("submission_type")]
|
||||
string SubmissionType,
|
||||
|
||||
[property: JsonPropertyName("user_id")]
|
||||
ulong UserId,
|
||||
|
||||
[property: JsonPropertyName("user")]
|
||||
UserModel User,
|
||||
|
||||
[property: JsonPropertyName("workflow_state")]
|
||||
string WorkflowState,
|
||||
|
||||
[property: JsonPropertyName("late_policy_status")]
|
||||
string LatePolicyStatus,
|
||||
|
||||
[property: JsonPropertyName("assignment")]
|
||||
AssignmentModel? Assignment = null,
|
||||
|
||||
[property: JsonPropertyName("course")]
|
||||
CourseModel? Course = null,
|
||||
|
||||
[property: JsonPropertyName("attempt")]
|
||||
uint? Attempt = null,
|
||||
|
||||
[property: JsonPropertyName("body")]
|
||||
string? Body = null,
|
||||
|
||||
[property: JsonPropertyName("grade_matches_current_submission")]
|
||||
bool? GradeMatchesCurrentSubmission = null,
|
||||
|
||||
[property: JsonPropertyName("score")]
|
||||
decimal? Score = null,
|
||||
|
||||
[property: JsonPropertyName("submission_comments")]
|
||||
IEnumerable<SubmissionCommentModel>? SubmissionComments = null,
|
||||
|
||||
[property: JsonPropertyName("submitted_at")]
|
||||
DateTime? SubmittedAt = null,
|
||||
|
||||
[property: JsonPropertyName("url")]
|
||||
string? Url = null,
|
||||
|
||||
[property: JsonPropertyName("grader_id")]
|
||||
long? GraderId = null,
|
||||
|
||||
[property: JsonPropertyName("graded_at")]
|
||||
DateTime? GradedAt = null,
|
||||
|
||||
[property: JsonPropertyName("late")]
|
||||
bool? Late = null,
|
||||
|
||||
[property: JsonPropertyName("assignment_visible")]
|
||||
bool? AssignmentVisible = null,
|
||||
|
||||
[property: JsonPropertyName("excused")]
|
||||
bool? Excused = null,
|
||||
|
||||
[property: JsonPropertyName("missing")]
|
||||
bool? Missing = null,
|
||||
|
||||
[property: JsonPropertyName("points_deducted")]
|
||||
double? PointsDeducted = null,
|
||||
|
||||
[property: JsonPropertyName("seconds_late")]
|
||||
double? SecondsLate = null,
|
||||
|
||||
[property: JsonPropertyName("extra_attempts")]
|
||||
uint? ExtraAttempts = null,
|
||||
|
||||
[property: JsonPropertyName("anonymous_id")]
|
||||
string? AnonymousId = null
|
||||
);
|
||||
@@ -0,0 +1,163 @@
|
||||
using CanvasModel.Assignments;
|
||||
using CanvasModel.Courses;
|
||||
using CanvasModel.Submissions;
|
||||
|
||||
namespace CanvasModel.Users;
|
||||
public record ActivityStreamObjectModel
|
||||
(
|
||||
[property: JsonPropertyName("created_at")]
|
||||
DateTime CreatedAt,
|
||||
|
||||
[property: JsonPropertyName("id")]
|
||||
ulong Id,
|
||||
|
||||
[property: JsonPropertyName("title")]
|
||||
string Title,
|
||||
|
||||
[property: JsonPropertyName("message")]
|
||||
string Message,
|
||||
|
||||
[property: JsonPropertyName("type")]
|
||||
string Type,
|
||||
|
||||
[property: JsonPropertyName("read_state")]
|
||||
bool ReadState,
|
||||
|
||||
[property: JsonPropertyName("context_type")]
|
||||
string ContextType,
|
||||
|
||||
[property: JsonPropertyName("html_url")]
|
||||
string HtmlUrl,
|
||||
|
||||
[property: JsonPropertyName("notification_category")]
|
||||
string NotificationCategory,
|
||||
|
||||
[property: JsonPropertyName("grade")]
|
||||
string Grade,
|
||||
|
||||
[property: JsonPropertyName("preview_url")]
|
||||
string PreviewUrl,
|
||||
|
||||
[property: JsonPropertyName("submission_type")]
|
||||
string SubmissionType,
|
||||
|
||||
[property: JsonPropertyName("late_policy_status")]
|
||||
string LatePolicyStatus,
|
||||
|
||||
[property: JsonPropertyName("workflow_state")]
|
||||
string WorkflowState,
|
||||
|
||||
[property: JsonPropertyName("updated_at")]
|
||||
DateTime? UpdatedAt = null,
|
||||
|
||||
[property: JsonPropertyName("course_id")]
|
||||
ulong? CourseId = null,
|
||||
|
||||
[property: JsonPropertyName("group_id")]
|
||||
ulong? GroupId = null,
|
||||
|
||||
[property: JsonPropertyName("total_root_discussion_entries")]
|
||||
uint? TotalRootDiscussionEntries = null,
|
||||
|
||||
[property: JsonPropertyName("require_initial_post")]
|
||||
bool? RequireInitialPost = null,
|
||||
|
||||
[property: JsonPropertyName("user_has_posted")]
|
||||
bool? UserHasPosted = null,
|
||||
|
||||
[property: JsonPropertyName("root_discussion_entries")]
|
||||
object? RootDiscussionEntries = null,
|
||||
|
||||
[property: JsonPropertyName("discussion_topic_id")]
|
||||
ulong? DiscussionTopicId = null,
|
||||
|
||||
[property: JsonPropertyName("announcement_id")]
|
||||
ulong? AnnouncementId = null,
|
||||
|
||||
[property: JsonPropertyName("conversation_id")]
|
||||
ulong? ConversationId = null,
|
||||
|
||||
[property: JsonPropertyName("private")]
|
||||
bool? Private = null,
|
||||
|
||||
[property: JsonPropertyName("participant_count")]
|
||||
uint? ParticipantCount = null,
|
||||
|
||||
[property: JsonPropertyName("message_id")]
|
||||
ulong? MessageId = null,
|
||||
|
||||
[property: JsonPropertyName("assignment_id")]
|
||||
ulong? AssignmentId = null,
|
||||
|
||||
[property: JsonPropertyName("assignment")]
|
||||
AssignmentModel? Assignment = null,
|
||||
|
||||
[property: JsonPropertyName("course")]
|
||||
CourseModel? Course = null,
|
||||
|
||||
[property: JsonPropertyName("attempt")]
|
||||
uint? Attempt = null,
|
||||
|
||||
[property: JsonPropertyName("body")]
|
||||
string? Body = null,
|
||||
|
||||
[property: JsonPropertyName("grade_matches_current_submission")]
|
||||
bool? GradeMatchesCurrentSubmission = null,
|
||||
|
||||
[property: JsonPropertyName("score")]
|
||||
decimal? Score = null,
|
||||
|
||||
[property: JsonPropertyName("submission_comments")]
|
||||
IEnumerable<SubmissionCommentModel>? SubmissionComments = null,
|
||||
|
||||
[property: JsonPropertyName("submitted_at")]
|
||||
DateTime? SubmittedAt = null,
|
||||
|
||||
[property: JsonPropertyName("url")]
|
||||
string? Url = null,
|
||||
|
||||
[property: JsonPropertyName("user_id")]
|
||||
ulong? UserId = null,
|
||||
|
||||
[property: JsonPropertyName("grader_id")]
|
||||
long? GraderId = null,
|
||||
|
||||
[property: JsonPropertyName("graded_at")]
|
||||
DateTime? GradedAt = null,
|
||||
|
||||
[property: JsonPropertyName("user")]
|
||||
UserModel? User = null,
|
||||
|
||||
[property: JsonPropertyName("late")]
|
||||
bool? Late = null,
|
||||
|
||||
[property: JsonPropertyName("assignment_visible")]
|
||||
bool? AssignmentVisible = null,
|
||||
|
||||
[property: JsonPropertyName("excused")]
|
||||
bool? Excused = null,
|
||||
|
||||
[property: JsonPropertyName("missing")]
|
||||
bool? Missing = null,
|
||||
|
||||
[property: JsonPropertyName("points_deducted")]
|
||||
double? PointsDeducted = null,
|
||||
|
||||
[property: JsonPropertyName("seconds_late")]
|
||||
double? SecondsLate = null,
|
||||
|
||||
[property: JsonPropertyName("extra_attempts")]
|
||||
uint? ExtraAttempts = null,
|
||||
|
||||
[property: JsonPropertyName("anonymous_id")]
|
||||
string? AnonymousId = null,
|
||||
|
||||
[property: JsonPropertyName("web_conference_id")]
|
||||
ulong? WebConferenceId = null,
|
||||
|
||||
[property: JsonPropertyName("collaboration_id")]
|
||||
ulong? CollaborationId = null,
|
||||
|
||||
[property: JsonPropertyName("assignment_request_id")]
|
||||
ulong? AssignmentRequestId = null
|
||||
);
|
||||
@@ -0,0 +1,15 @@
|
||||
|
||||
|
||||
|
||||
namespace CanvasModel.Users;
|
||||
public record ActivityStreamSummaryEntryModel
|
||||
(
|
||||
[property: JsonPropertyName("type")]
|
||||
string Type,
|
||||
|
||||
[property: JsonPropertyName("unread_count")]
|
||||
uint UnreadCount,
|
||||
|
||||
[property: JsonPropertyName("count")]
|
||||
uint Count
|
||||
);
|
||||
@@ -0,0 +1,10 @@
|
||||
namespace CanvasModel.Users;
|
||||
|
||||
public record AnonymousUserDisplayModel
|
||||
(
|
||||
[property: JsonPropertyName("anonymous_id")]
|
||||
string AnonymousId,
|
||||
|
||||
[property: JsonPropertyName("avatar_image_url")]
|
||||
string AvatarImageUrl
|
||||
);
|
||||
28
Management/Models/CanvasModels/Users/AvatarModel.cs
Normal file
28
Management/Models/CanvasModels/Users/AvatarModel.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
namespace CanvasModel.Users;
|
||||
|
||||
public record AvatarModel
|
||||
(
|
||||
[property: JsonPropertyName("type")]
|
||||
string Type,
|
||||
|
||||
[property: JsonPropertyName("url")]
|
||||
string Url,
|
||||
|
||||
[property: JsonPropertyName("token")]
|
||||
string Token,
|
||||
|
||||
[property: JsonPropertyName("display_name")]
|
||||
string DisplayName,
|
||||
|
||||
[property: JsonPropertyName("id")]
|
||||
ulong Id,
|
||||
|
||||
[property: JsonPropertyName("content_type")]
|
||||
string ContentType,
|
||||
|
||||
[property: JsonPropertyName("filename")]
|
||||
string Filename,
|
||||
|
||||
[property: JsonPropertyName("size")]
|
||||
ulong Size
|
||||
);
|
||||
13
Management/Models/CanvasModels/Users/CourseNicknameModel.cs
Normal file
13
Management/Models/CanvasModels/Users/CourseNicknameModel.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
namespace CanvasModel.Users;
|
||||
|
||||
public record CourseNicknameModel
|
||||
(
|
||||
[property: JsonPropertyName("course_id")]
|
||||
ulong CourseId,
|
||||
|
||||
[property: JsonPropertyName("name")]
|
||||
string Name,
|
||||
|
||||
[property: JsonPropertyName("nickname")]
|
||||
string Nickname
|
||||
);
|
||||
19
Management/Models/CanvasModels/Users/PageViewLinksModel.cs
Normal file
19
Management/Models/CanvasModels/Users/PageViewLinksModel.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
namespace CanvasModel.Users;
|
||||
|
||||
public record PageViewLinksModel
|
||||
(
|
||||
[property: JsonPropertyName("user")]
|
||||
ulong User,
|
||||
|
||||
[property: JsonPropertyName("context")]
|
||||
ulong? Context = null,
|
||||
|
||||
[property: JsonPropertyName("asset")]
|
||||
ulong? Asset = null,
|
||||
|
||||
[property: JsonPropertyName("real_user")]
|
||||
ulong? RealUser = null,
|
||||
|
||||
[property: JsonPropertyName("account")]
|
||||
ulong? Account = null
|
||||
);
|
||||
53
Management/Models/CanvasModels/Users/PageViewModel.cs
Normal file
53
Management/Models/CanvasModels/Users/PageViewModel.cs
Normal file
@@ -0,0 +1,53 @@
|
||||
namespace CanvasModel.Users;
|
||||
|
||||
public record PageViewModel
|
||||
(
|
||||
[property: JsonPropertyName("id")]
|
||||
string Id,
|
||||
|
||||
[property: JsonPropertyName("app_name")]
|
||||
string AppName,
|
||||
|
||||
[property: JsonPropertyName("url")]
|
||||
string Url,
|
||||
|
||||
[property: JsonPropertyName("context_type")]
|
||||
string ContextType,
|
||||
|
||||
[property: JsonPropertyName("asset_type")]
|
||||
string AssetType,
|
||||
|
||||
[property: JsonPropertyName("controller")]
|
||||
string Controller,
|
||||
|
||||
[property: JsonPropertyName("action")]
|
||||
string Action,
|
||||
|
||||
[property: JsonPropertyName("created_at")]
|
||||
DateTime CreatedAt,
|
||||
|
||||
[property: JsonPropertyName("links")]
|
||||
PageViewLinksModel Links,
|
||||
|
||||
[property: JsonPropertyName("user_agent")]
|
||||
string UserAgent,
|
||||
|
||||
[property: JsonPropertyName("http_method")]
|
||||
string HttpMethod,
|
||||
|
||||
[property: JsonPropertyName("remote_ip")]
|
||||
string RemoteIp,
|
||||
|
||||
[property: JsonPropertyName("interaction_seconds")]
|
||||
decimal? InteractionSeconds = null,
|
||||
|
||||
[property: JsonPropertyName("user_request")]
|
||||
bool? UserRequest = null,
|
||||
|
||||
[property: JsonPropertyName("render_time")]
|
||||
double? RenderTime = null,
|
||||
|
||||
|
||||
[property: JsonPropertyName("participated")]
|
||||
bool? Participated = null
|
||||
);
|
||||
46
Management/Models/CanvasModels/Users/ProfileModel.cs
Normal file
46
Management/Models/CanvasModels/Users/ProfileModel.cs
Normal file
@@ -0,0 +1,46 @@
|
||||
namespace CanvasModel.Users;
|
||||
|
||||
public record ProfileModel
|
||||
(
|
||||
[property: JsonPropertyName("id")]
|
||||
ulong Id,
|
||||
|
||||
[property: JsonPropertyName("name")]
|
||||
string Name,
|
||||
|
||||
[property: JsonPropertyName("short_name")]
|
||||
string ShortName,
|
||||
|
||||
[property: JsonPropertyName("sortable_name")]
|
||||
string SortableName,
|
||||
|
||||
[property: JsonPropertyName("title")]
|
||||
string Title,
|
||||
|
||||
[property: JsonPropertyName("bio")]
|
||||
string Bio,
|
||||
|
||||
[property: JsonPropertyName("primary_email")]
|
||||
string PrimaryEmail,
|
||||
|
||||
[property: JsonPropertyName("login_id")]
|
||||
string LoginId,
|
||||
|
||||
[property: JsonPropertyName("sis_user_id")]
|
||||
string SisUserId,
|
||||
|
||||
[property: JsonPropertyName("lti_user_id")]
|
||||
string LtiUserId,
|
||||
|
||||
[property: JsonPropertyName("avatar_url")]
|
||||
string AvatarUrl,
|
||||
|
||||
[property: JsonPropertyName("calendar")]
|
||||
object Calendar,
|
||||
|
||||
[property: JsonPropertyName("time_zone")]
|
||||
string TimeZone,
|
||||
|
||||
[property: JsonPropertyName("locale")]
|
||||
string Locale
|
||||
);
|
||||
17
Management/Models/CanvasModels/Users/ShortUserModel.cs
Normal file
17
Management/Models/CanvasModels/Users/ShortUserModel.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
namespace CanvasModel.Users;
|
||||
|
||||
public record ShortUserModel
|
||||
(
|
||||
|
||||
[property: JsonPropertyName("id")]
|
||||
ulong Id,
|
||||
|
||||
[property: JsonPropertyName("display_name")]
|
||||
string DisplayName,
|
||||
|
||||
[property: JsonPropertyName("avatar_image_url")]
|
||||
string AvatarImageUrl,
|
||||
|
||||
[property: JsonPropertyName("html_url")]
|
||||
string HtmlUrl
|
||||
);
|
||||
25
Management/Models/CanvasModels/Users/UserDisplayModel.cs
Normal file
25
Management/Models/CanvasModels/Users/UserDisplayModel.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
namespace CanvasModel.Users;
|
||||
|
||||
public record UserDisplayModel
|
||||
(
|
||||
[property: JsonPropertyName("avatar_image_url")]
|
||||
string AvatarImageUrl,
|
||||
|
||||
[property: JsonPropertyName("html_url")]
|
||||
string HtmlUrl,
|
||||
|
||||
[property: JsonPropertyName("anonymous_id")]
|
||||
string AnonymousId,
|
||||
|
||||
[property: JsonPropertyName("id")]
|
||||
ulong? Id = null,
|
||||
|
||||
[property: JsonPropertyName("short_name")]
|
||||
string? ShortName = null,
|
||||
|
||||
[property: JsonPropertyName("display_name")]
|
||||
string? DisplayName = null,
|
||||
|
||||
[property: JsonPropertyName("pronouns")]
|
||||
string? Pronouns = null
|
||||
);
|
||||
56
Management/Models/CanvasModels/Users/UserModel.cs
Normal file
56
Management/Models/CanvasModels/Users/UserModel.cs
Normal file
@@ -0,0 +1,56 @@
|
||||
using CanvasModel.Enrollments;
|
||||
|
||||
namespace CanvasModel.Users;
|
||||
public record UserModel
|
||||
(
|
||||
[property: JsonPropertyName("id")]
|
||||
ulong Id,
|
||||
|
||||
[property: JsonPropertyName("name")]
|
||||
string Name,
|
||||
|
||||
[property: JsonPropertyName("sortable_name")]
|
||||
string SortableName,
|
||||
|
||||
[property: JsonPropertyName("short_name")]
|
||||
string ShortName,
|
||||
|
||||
[property: JsonPropertyName("sis_user_id")]
|
||||
string SisUserId,
|
||||
|
||||
[property: JsonPropertyName("integration_id")]
|
||||
string IntegrationId,
|
||||
|
||||
[property: JsonPropertyName("login_id")]
|
||||
string LoginId,
|
||||
|
||||
[property: JsonPropertyName("avatar_url")]
|
||||
string AvatarUrl,
|
||||
|
||||
[property: JsonPropertyName("enrollments")]
|
||||
List<EnrollmentModel> Enrollments,
|
||||
|
||||
[property: JsonPropertyName("email")]
|
||||
string Email,
|
||||
|
||||
[property: JsonPropertyName("locale")]
|
||||
string Locale,
|
||||
|
||||
[property: JsonPropertyName("effective_locale")]
|
||||
string EffectiveLocale,
|
||||
|
||||
[property: JsonPropertyName("time_zone")]
|
||||
string TimeZone,
|
||||
|
||||
[property: JsonPropertyName("bio")]
|
||||
string Bio,
|
||||
|
||||
[property: JsonPropertyName("permissions")]
|
||||
Dictionary<string, bool> Permissions,
|
||||
|
||||
[property: JsonPropertyName("sis_import_id")]
|
||||
ulong? SisImportId = null,
|
||||
|
||||
[property: JsonPropertyName("last_login")]
|
||||
DateTime? LastLogin = null
|
||||
);
|
||||
Reference in New Issue
Block a user