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:
inginious.frontend.pages.course_admin.utils.INGIniousAdminPage
Edit a task
- get_user_lists(course, audienceid='')[source]¶
Get the available student and tutor lists for audience edition
- methods: ClassVar[Optional[Collection[str]]] = {'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:
inginious.frontend.pages.course_admin.utils.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: ClassVar[Optional[Collection[str]]] = {'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:
inginious.frontend.pages.course_admin.utils.INGIniousAdminPage
Couse settings
- methods: ClassVar[Optional[Collection[str]]] = {'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:
inginious.frontend.pages.course_admin.utils.INGIniousAdminPage
Course administration page: list of registered students
- methods: ClassVar[Optional[Collection[str]]] = {'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:
inginious.frontend.pages.course_admin.utils.INGIniousAdminPage
List information about a task done by a student
- methods: ClassVar[Optional[Collection[str]]] = {'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¶
Pages that allow editing of tasks
- class inginious.frontend.pages.course_admin.task_edit.CourseEditTask[source]¶
Bases:
inginious.frontend.pages.course_admin.utils.INGIniousAdminPage
Edit a task
- methods: ClassVar[Optional[Collection[str]]] = {'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_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:
inginious.frontend.pages.course_admin.task_edit_file.CourseTaskFiles
- methods: ClassVar[Optional[Collection[str]]] = {'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.task_edit_file.CourseTaskFiles[source]¶
Bases:
inginious.frontend.pages.course_admin.utils.INGIniousAdminPage
Edit a task
- classmethod get_task_filelist(task_factory, courseid, taskid)[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: ClassVar[Optional[Collection[str]]] = {'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_list module¶
- class inginious.frontend.pages.course_admin.task_list.CourseTaskListPage[source]¶
Bases:
inginious.frontend.pages.course_admin.utils.INGIniousAdminPage
List informations about all tasks
- methods: ClassVar[Optional[Collection[str]]] = {'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:
inginious.frontend.pages.course_admin.utils.INGIniousAdminPage
Redirect admins to /settings and tutors to /task
- methods: ClassVar[Optional[Collection[str]]] = {'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:
inginious.frontend.pages.utils.INGIniousAuthPage
An 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
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. :param courseid: the course on which to check rights :param taskid: If not None, returns also the task with idtaskid
:param allow_all_staff: allow admins AND tutors to see the page. If false, all only admins. :returns (Course, Task)
- methods: ClassVar[Optional[Collection[str]]] = {'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:
inginious.frontend.pages.course_admin.utils.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: ClassVar[Optional[Collection[str]]] = {'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