inginious.frontend.pages package

Frontend pages (controllers)

Submodules

inginious.frontend.pages.aggregation module

Index page

class inginious.frontend.pages.aggregation.AggregationPage[source]

Bases: inginious.frontend.pages.utils.INGIniousAuthPage

Aggregation page

GET_AUTH(courseid)[source]

GET request

inginious.frontend.pages.course module

Course page

class inginious.frontend.pages.course.CoursePage[source]

Bases: inginious.frontend.pages.utils.INGIniousPage

Course page

GET(courseid)[source]

GET request

POST(courseid)[source]

POST request

get_course(courseid)[source]

Return the course

show_page(course)[source]

Prepares and shows the course page

inginious.frontend.pages.index module

Index page

class inginious.frontend.pages.index.IndexPage[source]

Bases: inginious.frontend.pages.utils.INGIniousStaticPage

Index page

GET()[source]

Display main course list page

POST()[source]

Display main course list page

inginious.frontend.pages.maintenance module

Maintenance page

class inginious.frontend.pages.maintenance.MaintenancePage[source]

Bases: inginious.frontend.pages.utils.INGIniousPage

Maintenance page

GET()[source]

GET request

POST()[source]

POST request

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)

GET(courseid, taskid, isLTI)[source]

GET request

POST(courseid, taskid, isLTI)[source]

POST a new submission

set_selected_submission(course, task, submissionid)[source]

Set submission whose id is submissionid to selected grading submission for the given course/task. Returns a boolean indicating whether the operation was successful or not.

submission_to_json(task, data, debug, reloading=False, replace=False, tags=None)[source]

Converts a submission to json (keeps only needed fields)

class inginious.frontend.pages.tasks.TaskPage[source]

Bases: inginious.frontend.pages.utils.INGIniousPage

GET(courseid, taskid)[source]
POST(courseid, taskid)[source]
class inginious.frontend.pages.tasks.TaskPageStaticDownload[source]

Bases: inginious.frontend.pages.utils.INGIniousPage

Allow to download files stored in the task folder

GET(courseid, taskid, path)[source]

GET request

is_lti_page()[source]

True if the current page allows LTI sessions. False else.

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.

GET_AUTH(*args, **kwargs)[source]
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.

POST_AUTH(*args, **kwargs)[source]
class inginious.frontend.pages.utils.INGIniousPage[source]

Bases: object

A base for all the pages of the INGInious webapp. Contains references to the PluginManager, the CourseFactory, and the SubmissionManager

app

Returns the web application singleton

backup_dir

Backup directory

containers

Available containers

course_factory

Returns the course factory singleton

database

Returns the database singleton

default_allowed_file_extensions

List of allowed file extensions

default_max_file_size

Default maximum file size for upload

gridfs

Returns the GridFS singleton

is_lti_page

True if the current page allows LTI sessions. False else.

logger

Logger

lti_outcome_manager

Returns the LTIOutcomeManager singleton

plugin_manager

Returns the plugin manager singleton

submission_manager

Returns the submission manager singleton

task_factory

Returns the task factory singleton

template_helper

Returns the Template Helper singleton

user_manager

Returns the user manager singleton

webdav_host

True if webdav is available

Returns the link to the web terminal

class inginious.frontend.pages.utils.INGIniousStaticPage[source]

Bases: inginious.frontend.pages.utils.INGIniousPage

GET(page)[source]
POST(page)[source]
cache = {}
show_page(page)[source]
class inginious.frontend.pages.utils.LogOutPage[source]

Bases: inginious.frontend.pages.utils.INGIniousAuthPage

GET_AUTH(*args, **kwargs)[source]
POST_AUTH(*args, **kwargs)[source]
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.

GET_AUTH(*args, **kwargs)[source]
POST_AUTH(*args, **kwargs)[source]