inginious.frontend.pages package¶
Frontend pages (controllers)
Subpackages¶
- inginious.frontend.pages.api package
- inginious.frontend.pages.course_admin package
- Submodules
- inginious.frontend.pages.course_admin.audience_edit module
- inginious.frontend.pages.course_admin.danger_zone module
CourseDangerZonePage
CourseDangerZonePage.GET_AUTH()
CourseDangerZonePage.POST_AUTH()
CourseDangerZonePage.delete_course()
CourseDangerZonePage.dump_course()
CourseDangerZonePage.get_backup_list()
CourseDangerZonePage.methods
CourseDangerZonePage.page()
CourseDangerZonePage.restore_course()
CourseDangerZonePage.wipe_course()
- inginious.frontend.pages.course_admin.settings module
- inginious.frontend.pages.course_admin.student_list module
CourseStudentListPage
CourseStudentListPage.GET_AUTH()
CourseStudentListPage.POST_AUTH()
CourseStudentListPage.get_audiences_params()
CourseStudentListPage.get_requested_field_user_info()
CourseStudentListPage.get_student_list_params()
CourseStudentListPage.get_user_lists()
CourseStudentListPage.methods
CourseStudentListPage.page()
CourseStudentListPage.post_audiences()
CourseStudentListPage.post_groups()
CourseStudentListPage.post_student_list()
CourseStudentListPage.submission_url_generator_audience()
CourseStudentListPage.submission_url_generator_user()
CourseStudentListPage.update_audience()
CourseStudentListPage.update_group()
- inginious.frontend.pages.course_admin.submission module
- 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
- inginious.frontend.pages.course_admin.utils module
Submodules¶
inginious.frontend.pages.group module¶
Index page
- class inginious.frontend.pages.group.GroupPage[source]¶
Bases:
INGIniousAuthPage
Group page
- 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 module¶
Course page
- class inginious.frontend.pages.course.CoursePage[source]¶
Bases:
INGIniousAuthPage
Course page
- 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.
Displays the course_unavailable page or the course registration page
inginious.frontend.pages.index module¶
Index page
- class inginious.frontend.pages.index.IndexPage[source]¶
Bases:
INGIniousStaticPage
Index page
- 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.maintenance module¶
Maintenance page
inginious.frontend.pages.tasks module¶
Task page
- class inginious.frontend.pages.tasks.BaseTaskPage(calling_page)[source]¶
Bases:
object
Display a task (and allow to reload old submission/file uploaded during a submission)
- class inginious.frontend.pages.tasks.TaskPage[source]¶
Bases:
INGIniousAuthPage
- 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.tasks.TaskPageStaticDownload[source]¶
Bases:
INGIniousPage
Allow to download files stored in the task folder
- 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.utils module¶
Some utils for all the pages
- class inginious.frontend.pages.utils.INGIniousAdministratorPage[source]¶
Bases:
INGIniousAuthPage
Augmented version of INGIniousAuthPage that checks if user is administrator (superadmin).
- GET(*args, **kwargs)[source]¶
Checks if user is superadmin and calls GET_AUTH or performs logout. Otherwise, returns the login template.
- POST(*args, **kwargs)[source]¶
Checks if user is superadmin and calls POST_AUTH. Otherwise, returns the forbidden template.
- 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.utils.INGIniousAuthPage[source]¶
Bases:
INGIniousPage
Augmented version of INGIniousPage that checks if user is authenticated.
- GET(*args, **kwargs)[source]¶
Checks if user is authenticated and calls GET_AUTH or performs logout. Otherwise, returns the login template.
- POST(*args, **kwargs)[source]¶
Checks if user is authenticated and calls POST_AUTH or performs login and calls GET_AUTH. Otherwise, returns the login template.
- 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.utils.INGIniousPage[source]¶
Bases:
MethodView
A base for all the pages of the INGInious webapp. Contains references to the PluginManager, the CourseFactory, and the SubmissionManager
- property app¶
Returns the web application singleton
- property backup_dir: str¶
Backup directory
- property course_factory: TaskFactory¶
Returns the task factory singleton
- property database: Database¶
Returns the database singleton
- property default_allowed_file_extensions: List[str]¶
List of allowed file extensions
- property default_max_file_size: int¶
Default maximum file size for upload
- property environment_types: Dict[str, FrontendEnvType]¶
Available environment types
- property environments: Dict[str, List[str]]¶
Available environments
- property gridfs: GridFS¶
Returns the GridFS singleton
- property is_lti_page¶
True if the current page allows LTI sessions. False else.
- property logger: Logger¶
Logger
- property lti_outcome_manager: LTIOutcomeManager¶
Returns the LTIOutcomeManager singleton
- 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.
- property plugin_manager: PluginManager¶
Returns the plugin manager singleton
- property submission_manager: WebAppSubmissionManager¶
Returns the submission manager singleton
- property task_factory: TaskFactory¶
Returns the task factory singleton
- property taskset_factory: TasksetFactory¶
Returns the course factory singleton
- property template_helper: TemplateHelper¶
Returns the Template Helper singleton
- property user_manager: UserManager¶
Returns the user manager singleton
- property webdav_host: str¶
True if webdav is available
- property webterm_link: str¶
Returns the link to the web terminal
- class inginious.frontend.pages.utils.INGIniousStaticPage[source]¶
Bases:
INGIniousPage
- cache = {}¶
- 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.utils.LogOutPage[source]¶
Bases:
INGIniousAuthPage
- 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.utils.SignInPage[source]¶
Bases:
INGIniousAuthPage
- GET()[source]¶
Checks if user is authenticated and calls GET_AUTH or performs logout. Otherwise, returns the login template.
- 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.utils.generate_user_selection_box(user_manager, render_func, current_users, name, id, placeholder=None, single=False)[source]¶
Returns the HTML for a user selection box. The user using the box must have admin/tutors rights on the course with id course_id.
The box will return, when submitted using a form, a list of usernames separated by commas, under the given name.
NB: this function is available in the templates directly as “$user_selection_box(current_users, name, id)”. You must ignore the first argument (template_helper) in the templates.
- Parameters:
user_manager (
UserManager
) – UserManager instancerender_func – template generator
current_users (
List
[str
]) – a list of usernames currently selectedcourse_id – the course id
name (
str
) – HTML name given to the boxid (
str
) – HTML id given to the boxsingle – False for multiple user selection, True for single user selection
- Returns:
HTML code for the box