inginious.frontend.pages.course_admin package¶
Course administration
Submodules¶
inginious.frontend.pages.course_admin.audience_edit module¶
Pages that allow editing of tasks
- class inginious.frontend.pages.course_admin.audience_edit.CourseEditAudience[source]¶
Bases:
INGIniousAdminPageEdit a task
- get_user_lists(course, audienceid='')[source]¶
Get the available student and tutor lists for audience edition
- methods: t.ClassVar[t.Collection[str] | None] = {'GET', 'POST'}¶
The methods this view is registered for. Uses the same default (
["GET", "HEAD", "OPTIONS"]) asrouteandadd_url_ruleby default.
inginious.frontend.pages.course_admin.danger_zone module¶
- class inginious.frontend.pages.course_admin.danger_zone.CourseDangerZonePage[source]¶
Bases:
INGIniousAdminPageCourse administration page: list of audiences
- dump_course(course)[source]¶
Creates a new course (Archive course), gives it a course id resulting of the concatenation of the original id and the archiving date. This archive course is marked as archived and given an archive date in its YAML descriptor. The original course keeps their course id and all related submissions, user_tasks, audiences, courses and groups are updated to point to the archive course.
- methods: t.ClassVar[t.Collection[str] | None] = {'GET', 'POST'}¶
The methods this view is registered for. Uses the same default (
["GET", "HEAD", "OPTIONS"]) asrouteandadd_url_ruleby default.
inginious.frontend.pages.course_admin.settings module¶
- class inginious.frontend.pages.course_admin.settings.CourseSettingsPage[source]¶
Bases:
INGIniousAdminPageCouse settings
- methods: t.ClassVar[t.Collection[str] | None] = {'GET', 'POST'}¶
The methods this view is registered for. Uses the same default (
["GET", "HEAD", "OPTIONS"]) asrouteandadd_url_ruleby default.
inginious.frontend.pages.course_admin.student_list module¶
- class inginious.frontend.pages.course_admin.student_list.CourseStudentListPage[source]¶
Bases:
INGIniousAdminPageCourse administration page: list of registered students
- methods: t.ClassVar[t.Collection[str] | None] = {'GET', 'POST'}¶
The methods this view is registered for. Uses the same default (
["GET", "HEAD", "OPTIONS"]) asrouteandadd_url_ruleby default.
inginious.frontend.pages.course_admin.submission module¶
- class inginious.frontend.pages.course_admin.submission.SubmissionPage[source]¶
Bases:
INGIniousAdminPageList information about a task done by a student
- methods: t.ClassVar[t.Collection[str] | None] = {'GET', 'POST'}¶
The methods this view is registered for. Uses the same default (
["GET", "HEAD", "OPTIONS"]) asrouteandadd_url_ruleby default.
inginious.frontend.pages.course_admin.task_edit module¶
Pages that allow editing of tasks
- class inginious.frontend.pages.course_admin.task_edit.CourseEditTask[source]¶
Bases:
INGIniousAdminPageEdit a task
- methods: t.ClassVar[t.Collection[str] | None] = {'GET', 'POST'}¶
The methods this view is registered for. Uses the same default (
["GET", "HEAD", "OPTIONS"]) asrouteandadd_url_ruleby default.
inginious.frontend.pages.course_admin.task_edit_file module¶
Allow to create/edit/delete/move/download files associated to tasks
- class inginious.frontend.pages.course_admin.task_edit_file.CourseTaskFileUpload[source]¶
Bases:
CourseTaskFiles- methods: t.ClassVar[t.Collection[str] | None] = {'GET', 'POST'}¶
The methods this view is registered for. Uses the same default (
["GET", "HEAD", "OPTIONS"]) asrouteandadd_url_ruleby default.
- class inginious.frontend.pages.course_admin.task_edit_file.CourseTaskFiles[source]¶
Bases:
INGIniousAdminPageEdit a task
- classmethod get_task_filelist(task_fs)[source]¶
Returns a flattened version of all the files inside the task directory, excluding the files task.* and hidden files. It returns a list of tuples, of the type (Integer Level, Boolean IsDirectory, String Name, String CompleteName)
- methods: t.ClassVar[t.Collection[str] | None] = {'GET', 'POST'}¶
The methods this view is registered for. Uses the same default (
["GET", "HEAD", "OPTIONS"]) asrouteandadd_url_ruleby default.
inginious.frontend.pages.course_admin.task_list module¶
- class inginious.frontend.pages.course_admin.task_list.CourseTaskListPage[source]¶
Bases:
INGIniousAdminPageList informations about all tasks
- methods: t.ClassVar[t.Collection[str] | None] = {'GET', 'POST'}¶
The methods this view is registered for. Uses the same default (
["GET", "HEAD", "OPTIONS"]) asrouteandadd_url_ruleby default.
inginious.frontend.pages.course_admin.utils module¶
Utilities for administration pages
- class inginious.frontend.pages.course_admin.utils.CourseRedirectPage[source]¶
Bases:
INGIniousAdminPageRedirect admins to /settings and tutors to /task
- methods: t.ClassVar[t.Collection[str] | None] = {'GET', 'POST'}¶
The methods this view is registered for. Uses the same default (
["GET", "HEAD", "OPTIONS"]) asrouteandadd_url_ruleby default.
- class inginious.frontend.pages.course_admin.utils.INGIniousAdminPage[source]¶
Bases:
INGIniousAuthPageAn improved version of INGIniousAuthPage that checks rights for the administration
- get_course_and_check_rights(courseid, taskid=None, allow_all_staff=True)[source]¶
Returns the course with id
courseidand the task with idtaskid, and verify the rights of the user. Raise app.forbidden() when there is no such course of if the users has not enough rights. :type courseid: :param courseid: the course on which to check rights :type taskid: :param taskid: If not None, returns also the task with idtaskid:type allow_all_staff: :param allow_all_staff: allow admins AND tutors to see the page. If false, all only admins. :returns (Course, Task)
- methods: t.ClassVar[t.Collection[str] | None] = {'GET', 'POST'}¶
The methods this view is registered for. Uses the same default (
["GET", "HEAD", "OPTIONS"]) asrouteandadd_url_ruleby default.
- class inginious.frontend.pages.course_admin.utils.INGIniousSubmissionsAdminPage[source]¶
Bases:
INGIniousAdminPageAn INGIniousAdminPage containing some common methods for querying submissions
- get_submissions_filter(course, only_tasks=None, only_tasks_with_categories=None, only_users=None, only_audiences=None, with_tags=None, grade_between=None, submit_time_between=None, keep_only_evaluation_submissions=False, keep_only_crashes=False)[source]¶
All the parameters (excluding course, sort_by and keep_only_evaluation_submissions) can be None. If that is the case, they are ignored.
- Parameters:
course – the course
only_tasks – a list of task ids. Only submissions on these tasks will be loaded.
only_tasks_with_categories – keep only tasks that have a least one category in common with this list
only_users – a list of usernames. Only submissions from these users will be loaded.
only_audiences – a list of audience ids. Only submissions from users in these will be loaded
with_tags – a list of tags in the form [(tagid, present)], where present is a boolean indicating whether the tag MUST be present or MUST NOT be present. If you don’t mind if a tag is present or not, just do not put it in the list.
grade_between – a tuple of two floating point number or None ([0.0, None], [None, 0.0] or [None, None]) that indicates bounds on the grade of the retrieved submissions
submit_time_between – a tuple of two dates or None ([datetime, None], [None, datetime] or [None, None]) that indicates bounds on the submission time of the submission. Format: “%Y-%m-%d %H:%M:%S”
keep_only_evaluation_submissions – True to keep only submissions that are counting for the evaluation
keep_only_crashes – True to keep only submissions that timed out or crashed
sort_by – a tuple (sort_column, ascending) where sort_column is in [“submitted_on”, “username”, “grade”, “taskid”] and ascending is either True or False.
limit – an integer representing the maximum number of submission to list.
- Returns:
the filter for the mongoDB search.
- methods: t.ClassVar[t.Collection[str] | None] = {'GET', 'POST'}¶
The methods this view is registered for. Uses the same default (
["GET", "HEAD", "OPTIONS"]) asrouteandadd_url_ruleby default.