Skip to content
Angel González edited this page Feb 1, 2023 · 6 revisions

UNCode Plugins

This section describes each plugin we have developed to increase the features on UNCode with respect INGInious. In case the plugin is not listed here, please check the INGInious plugins reference, which explains the other plugins that are available in the INGInious base code. To add a new plugin, see: How to create plugins.

Analytics

Plugin created to keep track of several tools and plugins in UNCode, to understand which tools or plugins are being used the most or the less, for instance, Python tutor or Notebook submissions. This plugin is only available for superadmins and the can access it in the right top menu, in the option analytics. In this page, they can see several plots about the usage of the currently being tracked tools, as well as filtering the plots.

To track a determined tool or service inside UNCode, when for instance, the submit button is used, it should send a request and this service is now recorded. For that, this plugin adds two new collections in Mongo, services and analytics to track new services and track the visits for each service. See the database structure to understand more about the used collections, and to learn how to track new services, see: How to create analytics.

To enable the plugin, add to your configuration file:

plugins:
  - plugin_module: inginious.frontend.plugins.analytics
    use_minified: false # true as default

Set the option use_minified to false in case you do not want to use the minified static files for this plugin. In case this option is not set, by default is true.

Code preview

This plugin adds a new configuration tab to the task settings, this tab allows instructors to select a code template for each language, thus, students see a initial template that they can use to start solving the task, for the different allowed languages.

To enable the plugin, add to your configuration file:

plugins:
  - plugin_module: inginious.frontend.plugins.code_preview
    use_minified: false # true as default

Set the option use_minified to false in case you do not want to use the minified static files for this plugin. In case this option is not set, by default is true.

Grader generator

This adds a tab to the task configuration page, this tab helps the instructor to automatically create the configuration files to grade the submissions. This is supported for Multilang, Datascience, HDL and Notebook submissions, for each type of task, there is a specific user interface as it is different for each type. Go to How to create a task, for a deeper understanding on how to use this grade generator.

To enable the plugin, add to your configuration file:

plugins:
  - plugin_module: inginious.frontend.plugins.grader_generator
    use_minified: False # true as default

Set the option use_minified to false in case you do not want to use the minified static files for this plugin. In case this option is not set, by default is true.

LTI Registration

This plugin allows students to create a new UNCode account when accessing a task from a LTI course into a Learning Management System. When a student enter a new task, they must bind their UNCode account to the LMS through a page that displays the data provided to bind their account. If student doesn't have a UNCode account, a new option is displayed in the "Bind your account" menu, to create a new account with the username and email that student has in their account in the LMS.

To enable the plugin, add to your configuration file:

plugins:
  - plugin_module: inginious.frontend.plugins.lti_register
    use_minified: false # true as default

Set the option use_minified to false in case you do not want to use the minified static files for this plugin. In case this option is not set, by default is true.

Multilang

The goal of this plugin is to add new type of subproblems to UNCode, to allow the correct task configuration and allow students to upload code. This adds the type of subproblems to allow students to upload their code there, or upload file projects, such as .zip files with multiple scripts, and notebook submissions. This plugin also use Custom input, that adds a field in the task view to allow students test their code with their own tests and check whether their code is right or not.

Additionally, the Linter and Python tutor are integrated here, thus, the linter shows some hints to students about how to improve their code, and the Python tutor modal is added to embed this service. See the documentation about Python tutor and Linter to view how they work and how these services are consumed by UNCode.

To enable the plugin, add to your configuration file:

plugins:
  - plugin_module: inginious.frontend.plugins.multilang
    linter_url: "http://localhost:4567" # Set the linter URL
    python_tutor_url: "http://localhost:8003" # Set the Python tutor URL
    use_wavedrom: true
    use_minified: false # true as default

This plugin has several parameters in configuration file:

  • linter_url is the URL where the linter service is listening for requests, if the parameter is not set, by default is a empty value. The example above, the service is in locahost in the port 4567, but you (probably) will change this.
  • python_tutor_url is the URL where the python tutor service is listening for requests, if the parameter is not set, by default is a empty value. In the example above, the service is in locahost in the port 8003, but you (probably) will change this.
  • Set to true to use_wavedrom, this is a option for HDL tasks to show some additional feedback to students, in case is false, the JavaScript related scripts are not loaded.
  • Set the option use_minified to false in case you do not want to use the minified static files for this plugin. In case this option is not set, by default is true.

Plagiarism

Plugin adds a new option in the course administration menu. This allows course administrators to run plagiarism checks over the different tasks in different languages, also, the user can upload a template file in case the students used a base code to solve the task. The comparison is done using the software JPlag. The supported languages are C, C++, Java and Python. Also HDL, Verilog and Jupyter Notebook plagiarism checks are allowed, although, the comparison is done as text rather than code.

This plugin adds a new collection to the Data Base called plagiarism_checks, where all the checks are store with the results.

To enable the plugin, add to your configuration file:

plugins:
  - plugin_module: inginious.frontend.plugins.plagiarism
    use_minified: false # true as default

Set the option use_minified to false in case you do not want to use the minified static files for this plugin. In case this option is not set, by default is true.

Problem bank

Problem bank allows course administrators to copy tasks that are public for that to their course. Also, instructors can add their course to allow other users to copy their tasks. The user interface was developed using ReactJS.

A collection in Data Base is added: problem_banks, where the courses that are public to copy tasks from are set here.

In order to use the plugin is necessary compile it. Run the Setup Script to setup the plugin

To enable the plugin, add to your configuration file:

plugins:
  - plugin_module: inginious.frontend.plugins.problem_bank
    use_minified: false # true as default

Set the option use_minified to false in case you do not want to use the minified static files for this plugin. In case this option is not set, by default is true.

Register students

Plugin adds a button in the students page in course administration menu. With this, instructors can load a .csv file with the students' name, last name, username and email to enroll in the course several students. In case a student is not registered yet on UNCode, it is registered and an email is sent with some initial information and their credentials. Additionally, it can be selected the language of the email (i.e. Spanish).

To enable the plugin, add to your configuration file:

plugins:
  - plugin_module: inginious.frontend.plugins.register_students
    use_minified: false # true as default

Set the option use_minified to false in case you do not want to use the minified static files for this plugin. In case this option is not set, by default is true.

Google authentication

This plugin enables users to sign in with their Google accounts, if an user does not have an account on the platform, it is created based on their email's username. In order to use the plugin, the following steps are required: Steps more detailed and more information here: Using OAuth 2.0 for Web Server Applications

  1. A google cloud account is needed, related with a project, then, it is necessary to enable the API's in the project.
  2. Create authorization credentials. Add the respective redirect URI used in the webapp.
  3. Add the client_id and the client_secret in the configuration file
plugins:
  - plugin_module: inginious.frontend.plugins.auth.google_auth
    id: "google_auth"
    client_id: "<your_google_secret_id>"
    client_secret: "<your_google_secret_key>"
    debug: True # False as default, this allow the plugin work in a development enviroment

Statistics

Show plots about the course and add a page to students to see plots about their performance along several courses. The students' statistics allow the students to understand more their performance in several courses, with the different feedbacks and grades obtained for all the tasks they have tried. In the course, a option in the course administration menu is added, there, administrators can see some plots about the course, check the feedback and grades for each task and see the different submissions for task.

To enable the plugin, add to your configuration file:

plugins:
  - plugin_module: inginious.frontend.plugins.statistics
    use_minified: false # true as default

Set the option use_minified to false in case you do not want to use the minified static files for this plugin. In case this option is not set, by default is true.

Task cache

Plugin to store some information related to the each task in DB. This is good to avoid a query to the file system to retrieve tasks information from several tasks. This adds a collection to the Data Base called tasks_cache. This collection is currently used by the Problem Bank plugin to search tasks and its information.

To enable the plugin, add to your configuration file:

plugins:
  - plugin_module: inginious.frontend.plugins.task_cache

Task editorial

This plugin adds a new tab to task administration, which allows to set a tutorial and a possible solution to the task. This plugin also adds a new task menu section at the right side called Editorial, where the students will be able to see the tutorial content, and the solution language and code when the task deadline ends.

To enable the plugin, add to your configuration file:

plugins:
  - plugin_module: inginious.frontend.plugins.task_editorial
    use_minified: False # true as default

Set the option use_minified to false in case you do not want to use the minified static files for this plugin. In case this option is not set, by default is true.

Task hints

The task hints plugin adds an additional tab for task settings. This tab allows instructors to create hints for the task, which students can unlock to help them to reach the solution. Also instructors can set them a penalty which will be applied to the final grade on the submission if students decided to see the content of a hint.

To enable the plugin, add to your configuration file:

plugins:
  - plugin_module: inginious.frontend.plugins.task_hints
    use_minified: False # true as default

Set the option use_minified to false in case you do not want to use the minified static files for this plugin. In case this option is not set, by default is true.

UN template

As UNCode is maintained and used at the National University of Colombia, it is mandatory to use some templates, such as the header and footer that all web applications at the university use. This plugin is in charge of only adding this template. You can remove deactivate this in case you do not want this is shown on your deployment.

To enable the plugin, add to your configuration file:

plugins:
  - plugin_module: inginious.frontend.plugins.UN_template
    use_minified: false # true as default

Set the option use_minified to false in case you do not want to use the minified static files for this plugin. In case this option is not set, by default is true.

UNCode

This is a plugin which makes several changes over INGInious, these changes are only related to frontend modifications and additions, such as the UNCode logo and some helper modals for instructors and students. You can deactivate this plugin in case you do not want these additions.

To enable the plugin, add to your configuration file:

plugins:
  - plugin_module: inginious.frontend.plugins.UNCode
    used_grading_environments: ["multiple_languages", "HDL", "Data Science", "Notebook"] # Add others you think you'll need
    used_subproblem_types: ["code_multiple_languages", "code_file_multiple_languages", "notebook_file"] # Add others you think you'll need
    use_minified: false # true as default

There some parameters to setup this plugin:

  • used_grading_environments to select which grading environments are used, this is due to some other grading environments that are not used on UNCode, thus, the ones not listed here, are not shown. Also, in case this option is not set, all grading environments are shown.
  • used_subproblem_types is similar to the previous option, although, this is only related to subproblems that you want to show and allow the task creation.
  • Set the option use_minified to false in case you do not want to use the minified static files for this plugin. In case this option is not set, by default is true.

Manual Scoring

This is a plugin that adds a manual scoring option for the courses' administrators. The administrator can select a task, then a student and then a submission and evaluate it based in an interactive rubric and comments. The result is stored on rubric_score inside of custom, and the comments are stored on comment inside of custom too.

To enable the plugin, add to your configuration file:

plugins:
  - plugin_module: inginious.frontend.plugins.manual_scoring
    use_minified: false # true as default

Set the option use_minified to false in case you do not want to use the minified static files for this plugin. In case this option is not set, by default is true.

Contact Page

This is a plugin that adds a contact page where the users can leave their comments, report a problem or request the creation of a new course. The message arrives to one or two Slack channel, depending on the configuration.

The plugin works with Slack API, for that, it is necessary create a new Slack application, select the workspace target and enable Slack webhook, then you can get the URL of the channels. For more information you can see the next tutorial.

To enable the plugin, add to your configuration file:

plugins:
  - plugin_module: inginious.frontend.plugins.contact_page
    slack_url_contact_channel: https://hooks.slack.com/services/ #Example URL
    slack_url_course_creation_channel: https://hooks.slack.com/services/ #Example URL

There some parameters to setup this plugin:

  • The parameter slack_url_contact_channel is mandatory. It is a URL of a Slack channel where the messages are received. If the secondary URL is enabled, this Channel only received comments and problem reports, else all messages arrive here.
  • Set the option slack_url_course_creation_channel like a secondary URL where messages with subject "create new course" arrive. Use it if you want separate the messages by the two kinds of subject.
  • Set the option use_minified to false in case you do not want to use the minified static files for this plugin. In case this option is not set, by default is true.

Course creation

This is a plugin that adds a utility to create courses following a pattern for the name, and standardizing the way the are named and identified. Additionally, it is possible to copy all the tasks from a course, that way they are kinda cloned.
To enable the plugin, add to your configuration file:

plugins:
  - plugin_module: inginious.frontend.plugins.course_creation
    use_minified: false # true as default

Set the option use_minified to false in case you do not want to use the minified static files for this plugin. In case this option is not set, by default is true.

User management

This is a superadmin plugin. It adds a new page where the superadmin can search a student account and modify its basic data such as username, name and email.

To enable the plugin, add to your configuration file:

plugins:
  - plugin_module: inginious.frontend.plugins.user_management
    use_minified: false # true as default

Set the option use_minified to false in case you do not want to use the minified static files for this plugin. In case this option is not set, by default is true.

Add new collection information

The plugin works with a json file that summarizes the structure of the collection to find the username. By default, if there is not information about a collection, it will try with a field named username.

This is the normal structure of a item in the file:

"example": [
    {
      "path": "field0.field1.field2.field3",
      "index_array": [1,3]
    },
    {
      "path": "field5.field6.field7",
      "index_array": []
    }
  ]

The file is formed by arrays of objects that contain the information about the collection. Each object in the array represents a field that contains the username. In this case, the array name example is the name of the collection. The structure of the collection indicates that there are three fields where username appears, therefore, there are three objects.

Objects have two values: path and index_array. path indicates the route to get the username field in a mongo document. It does not need to be called username. index_array is an array where the fields of the path that are arrays in the collection are indicated.

For example, first object indicates the username is stored in a field named field3, and field1 and field3 are arrays. The second object says that the username is in field7 and neither field is an array.

A mongo document as the example would be like this:

{
  "other_field": "val",
  "field0": {
    "field1": [
      {
        "field2": {
          "field3": ["user1", "user2"],
          "other_field": "val",
        },
        "other_field": "val",
      },
      {
        "field2": {
          "field3": ["user3", "user1"],
          "other_field": "val",
        },
        "other_field": "val",
      }
    ]
  },
  "field5": {
    "field6": {
      "field7": "user1",
      "other_field": "val",
    },
    "other_field": "val",
  }
}

Notebooks grader

This plugin adds necessary endpoints to do notebooks submissions stuff, that allows to other services like Google Colab to do grading process and report the grading result to UNcode

To enable the plugin, add to your configuration file:

plugins:
  - plugin_module: inginious.frontend.plugins.notebooks_grader
    public_key_n: public key n value 
    public_key_e: public key e value 

Note: For get public key values, please contact project administration team, because these values are used in the notebook grading submission process.

When this plugin is correctly installed , you can access to the following endpoints (check documentation):

  1. api/notebook_grader
  2. api/notebook_grader/submit
  3. api/user_roles
Clone this wiki locally