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:
INGIniousAdminPage
Edit 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"]
) asroute
andadd_url_rule
by default.
inginious.frontend.pages.course_admin.danger_zone module¶
- class inginious.frontend.pages.course_admin.danger_zone.CourseDangerZonePage[source]¶
Bases:
INGIniousAdminPage
Course administration page: list of audiences
- dump_course(courseid)[source]¶
Create a zip file containing all information about a given course in database and then remove it from db
- methods: t.ClassVar[t.Collection[str] | None] = {'GET', 'POST'}¶
The methods this view is registered for. Uses the same default (
["GET", "HEAD", "OPTIONS"]
) asroute
andadd_url_rule
by default.
inginious.frontend.pages.course_admin.settings module¶
- class inginious.frontend.pages.course_admin.settings.CourseSettingsPage[source]¶
Bases:
INGIniousAdminPage
Couse settings
- methods: t.ClassVar[t.Collection[str] | None] = {'GET', 'POST'}¶
The methods this view is registered for. Uses the same default (
["GET", "HEAD", "OPTIONS"]
) asroute
andadd_url_rule
by default.
inginious.frontend.pages.course_admin.student_list module¶
- class inginious.frontend.pages.course_admin.student_list.CourseStudentListPage[source]¶
Bases:
INGIniousAdminPage
Course 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"]
) asroute
andadd_url_rule
by default.
- page(course, active_tab='tab_students', msg=None, error=None)[source]¶
Get all data and display the page
inginious.frontend.pages.course_admin.submission module¶
- class inginious.frontend.pages.course_admin.submission.SubmissionPage[source]¶
Bases:
INGIniousAdminPage
List 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"]
) asroute
andadd_url_rule
by default.
inginious.frontend.pages.course_admin.task_edit module¶
inginious.frontend.pages.course_admin.task_edit_file module¶
inginious.frontend.pages.course_admin.task_list module¶
- class inginious.frontend.pages.course_admin.task_list.CourseTaskListPage[source]¶
Bases:
INGIniousAdminPage
List 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"]
) asroute
andadd_url_rule
by default.
inginious.frontend.pages.course_admin.utils module¶
Utilities for administration pages
- class inginious.frontend.pages.course_admin.utils.CourseRedirectPage[source]¶
Bases:
INGIniousAdminPage
Redirect 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"]
) asroute
andadd_url_rule
by default.
- class inginious.frontend.pages.course_admin.utils.INGIniousAdminPage[source]¶
Bases:
INGIniousAuthPage
An improved version of INGIniousAuthPage that checks rights for the administration
- get_course_and_check_rights(courseid, taskid=None)[source]¶
Returns the course with id
courseid
and 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
: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"]
) asroute
andadd_url_rule
by default.
- class inginious.frontend.pages.course_admin.utils.INGIniousSubmissionsAdminPage[source]¶
Bases:
INGIniousAdminPage
An 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"]
) asroute
andadd_url_rule
by default.
- class inginious.frontend.pages.course_admin.utils.UnicodeWriter(f, dialect=<class 'csv.excel'>, encoding='utf-8', **kwds)[source]¶
Bases:
object
A CSV writer which will write rows to CSV file “f”, which is encoded in the given encoding.
Returns the HTML of the menu used in the administration.
`current`
is the current page of section