inginious.frontend.plugins package

Plugins for the webapp of INGInious



inginious.frontend.plugins.demo module

A demo plugin that adds a page

class inginious.frontend.plugins.demo.DemoPage[source]

Bases: INGIniousPage

A simple demo page showing how to add a new page


GET request

methods: t.ClassVar[t.Collection[str] | None] = {'GET', 'POST'}

The methods this view is registered for. Uses the same default (["GET", "HEAD", "OPTIONS"]) as route and add_url_rule by default.

inginious.frontend.plugins.demo.init(plugin_manager, _, _2, _3)[source]

Init the plugin

inginious.frontend.plugins.contests module

An algorithm contest plugin for INGInious. Based on the same principles than contests like ACM-ICPC.

class inginious.frontend.plugins.contests.Contest(task_list_func, dispenser_data, database, course_id)[source]

Bases: TableOfContents


Checks the dispenser data as formatted by the form from render_edit function

get_accessibilities(taskids, usernames)[source]

Get the accessible time of this task


Returns the settings of the contest for this course

classmethod get_id()[source]

Returns the task dispenser id

classmethod get_name(language)[source]

Returns the localized task dispenser name

class inginious.frontend.plugins.contests.ContestAdmin[source]

Bases: INGIniousAdminPage

Contest settings for a course


GET request: simply display the form


POST request: update the settings

methods: t.ClassVar[t.Collection[str] | None] = {'GET', 'POST'}

The methods this view is registered for. Uses the same default (["GET", "HEAD", "OPTIONS"]) as route and add_url_rule by default.

save_contest_data(course, contest_data)[source]

Saves updated contest data for the course

class inginious.frontend.plugins.contests.ContestScoreboard[source]

Bases: INGIniousAuthPage

Displays the scoreboard of the contest

methods: t.ClassVar[t.Collection[str] | None] = {'GET', 'POST'}

The methods this view is registered for. Uses the same default (["GET", "HEAD", "OPTIONS"]) as route and add_url_rule by default.


Add a menu for the contest settings in the administration


Additional HTML headers

inginious.frontend.plugins.contests.course_menu(course, template_helper)[source]

Displays some informations about the contest on the course page

inginious.frontend.plugins.contests.init(plugin_manager, taskset_factory, client, config)[source]

Init the contest plugin. Available configuration:

    "plugin_module": "inginious.frontend.plugins.contests"

inginious.frontend.plugins.git_repo module

A plugin that allows to save submissions to a Git repository

class inginious.frontend.plugins.git_repo.SubmissionGitSaver(plugin_manager, config)[source]

Bases: Thread

Thread class that saves results from submission in the git repo. It must be a thread as a git commit can take some time and because we extract archives returned by the Client. But it must also be launched only one time as our git operations are not really process/tread-safe ;-)

add(submission, archive, _)[source]

Add a new submission to the repo (add the to queue, will be saved async)


Method representing the thread’s activity.

You may override this method in a subclass. The standard run() method invokes the callable object passed to the object’s constructor as the target argument, if any, with sequential and keyword arguments taken from the args and kwargs arguments, respectively.

save(submission, result, grade, problems, tests, custom, archive)[source]

saves a new submission in the repo (done async)

inginious.frontend.plugins.git_repo.init(plugin_manager, _, _2, config)[source]

Init the plugin

Available configuration:

    - plugin_module: inginious.frontend.plugins.git_repo
      repo_directory: "./repo_submissions"

inginious.frontend.plugins.simple_grader module

Allow the webapp to act as a simple POST grader

inginious.frontend.plugins.simple_grader.init(plugin_manager, taskset_factory, client, config)[source]

Init the external grader plugin. This simple grader allows only anonymous requests, and submissions are not stored in database.

Available configuration:

    - plugin_module: inginious.frontend.plugins.simple_grader
      courseid : "external"
      page_pattern: "/external"
      return_fields: "^(result|text|problems)$"

The grader will only return fields that are in the job return dict if their key match return_fields.

Different types of request are available : see documentation