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
- inginious.frontend.pages.course_admin.settings module
- inginious.frontend.pages.course_admin.student_list module
- 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
inginious.frontend.pages.course module¶
Course page
-
class
inginious.frontend.pages.course.
CoursePage
[source]¶ Bases:
inginious.frontend.pages.utils.INGIniousAuthPage
Course page
-
methods
: Optional[List[str]] = {'GET', 'POST'}¶ A list of methods this view can handle.
-
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:
inginious.frontend.pages.utils.INGIniousStaticPage
Index page
-
methods
: Optional[List[str]] = {'GET', 'POST'}¶ A list of methods this view can handle.
-
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:
inginious.frontend.pages.utils.INGIniousAuthPage
-
methods
: Optional[List[str]] = {'GET', 'POST'}¶ A list of methods this view can handle.
-
-
class
inginious.frontend.pages.tasks.
TaskPageStaticDownload
[source]¶ Bases:
inginious.frontend.pages.utils.INGIniousPage
Allow to download files stored in the task folder
-
methods
: Optional[List[str]] = {'GET', 'POST'}¶ A list of methods this view can handle.
-
inginious.frontend.pages.utils module¶
Some utils for all the pages
-
class
inginious.frontend.pages.utils.
INGIniousAuthPage
[source]¶ Bases:
inginious.frontend.pages.utils.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
: Optional[List[str]] = {'GET', 'POST'}¶ A list of methods this view can handle.
-
-
class
inginious.frontend.pages.utils.
INGIniousPage
[source]¶ Bases:
flask.views.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
¶ Backup directory
-
property
client
¶ Returns the INGInious client
-
property
course_factory
¶ Returns the course factory singleton
-
property
database
¶ Returns the database singleton
-
property
default_allowed_file_extensions
¶ List of allowed file extensions
-
property
default_max_file_size
¶ Default maximum file size for upload
-
property
environment_types
¶ Available environment types
-
property
environments
¶ Available environments
-
property
gridfs
¶ Returns the GridFS singleton
-
property
is_lti_page
¶ True if the current page allows LTI sessions. False else.
-
property
logger
¶ Logger
-
property
lti_outcome_manager
¶ Returns the LTIOutcomeManager singleton
-
methods
: Optional[List[str]] = {'GET', 'POST'}¶ A list of methods this view can handle.
-
property
plugin_manager
¶ Returns the plugin manager singleton
-
property
submission_manager
¶ Returns the submission manager singleton
-
property
task_factory
¶ Returns the task factory singleton
-
property
template_helper
¶ Returns the Template Helper singleton
-
property
user_manager
¶ Returns the user manager singleton
-
property
webdav_host
¶ True if webdav is available
-
property
webterm_link
¶ Returns the link to the web terminal
-
property
-
class
inginious.frontend.pages.utils.
INGIniousStaticPage
[source]¶ Bases:
inginious.frontend.pages.utils.INGIniousPage
-
cache
= {}¶
-
methods
: Optional[List[str]] = {'GET', 'POST'}¶ A list of methods this view can handle.
-
-
class
inginious.frontend.pages.utils.
LogOutPage
[source]¶ Bases:
inginious.frontend.pages.utils.INGIniousAuthPage
-
methods
: Optional[List[str]] = {'GET', 'POST'}¶ A list of methods this view can handle.
-
-
class
inginious.frontend.pages.utils.
SignInPage
[source]¶ Bases:
inginious.frontend.pages.utils.INGIniousAuthPage
-
GET
()[source]¶ Checks if user is authenticated and calls GET_AUTH or performs logout. Otherwise, returns the login template.
-
methods
: Optional[List[str]] = {'GET', 'POST'}¶ A list of methods this view can handle.
-
-
inginious.frontend.pages.utils.
generate_user_selection_box
(user_manager: inginious.frontend.user_manager.UserManager, render_func, current_users: List[str], course_id: str, name: str, id: str, placeholder: Optional[str] = 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, course_id, name, id)”. You must ignore the first argument (template_helper) in the templates.
- Parameters
user_manager – UserManager instance
render_func – template generator
current_users – a list of usernames currently selected
course_id – the course id
name – HTML name given to the box
id – HTML id given to the box
single – False for multiple user selection, True for single user selection
- Returns
HTML code for the box
-
inginious.frontend.pages.utils.
register_utils
(database, user_manager, template_helper: inginious.frontend.template_helper.TemplateHelper)[source]¶ Registers utils in the template helper