Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

INGInious/plugin-highlight

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

INGInious-highlight-plugin

A plugin that allows highlighting lines in "code" problems

Installation

Install the plugin via pip:

pip install git+https://github.com/UCL-INGI/INGInious-highlight-plugin.git

Then add the plugin in your configuration.yaml

plugins:
- plugin_module: inginious_highlight

Usage

Inside your run file, in python:

from inginious import feedback
feedback.set_custom_value("highlight", 56)

# Colors the line 3 of subproblem "subproblem_id" with the default color
feedback.set_custom_value("highlight", {"subproblem_id": 3})
# Colors the lines 2 and 4 of subproblem "subproblem_id" with the default color
feedback.set_custom_value("highlight", {"subproblem_id": [2, 4]})
# Colors the lines 1,2,3 of subproblem "subproblem_id1" with a pale red,
# and lines 5 of subproblem "subproblem_id2" with a darker green
feedback.set_custom_value("highlight", {
    "subproblem_id1": [{"lines": [1, 2, 3], "color": "red"}, {"lines": [4], "color": "darkred"}],
    "subproblem_id2": {"lines": [5], "color": "darkgreen"},
})

Inside your run file, in bash:

# Colors the line 3 of subproblem "subproblem_id" with the default color
feedback-custom --json highlight '{"subproblem_id": 3}'
# Colors the line 2 and 4 of subproblem "subproblem_id" with the default color
feedback-custom --json highlight '{"subproblem_id": [2, 4]}'
# Colors the lines 1,2,3 of subproblem "subproblem_id1" with a pale red,
# and lines 5 of subproblem "subproblem_id2" with a darker green
feedback-custom --json highlight '{"subproblem_id1": [{"lines": [1, 2, 3], "color": "red"}, {"lines": [4], "color": "darkred"}], "subproblem_id2": {"lines": [5], "color": "darkgreen"}}'

Supported colors

default, yellow, orange, red, green, blue, darkred, darkgreen, darkblue

About

A plugin that allows highlighting lines in "code" problems

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Morty Proxy This is a proxified and sanitized view of the page, visit original site.