Skip to content
This repository was archived by the owner on Sep 30, 2020. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions inginious/frontend/common/static/js/task.js
Original file line number Diff line number Diff line change
Expand Up @@ -1006,7 +1006,10 @@ function convertInginiousLanguageToCodemirror(inginiousLanguage) {
"c11": "c",
"python2": "python",
"python3": "python",
"ruby": "ruby"
"ruby": "ruby",
"GNU C++": "cpp",
"GNU C++11" : "cpp",
"GNU C++14" : "cpp"
};

return languages[inginiousLanguage];
Expand Down Expand Up @@ -1133,7 +1136,13 @@ var lintServerUrl = "http://localhost:4567/";
function lintCode(language, problemId, callback){
if(language == "plain")
language = getLanguageForProblemId(problemId);
var editor = getEditorForProblemId(problemId);

language = convertInginiousLanguageToCodemirror(language)


var editor = getEditorForProblemId(problemId);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't use both spaces and tabs



var code = editor.getValue();
var apiUrl = lintServerUrl + language;
callback = callback || getCallbackForLanguage(language, editor);
Expand Down
34 changes: 34 additions & 0 deletions inginious/frontend/webapp/plugins/rubric_scoring/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# -*- coding: utf-8 -*-
#
# This file is part of INGInious. See the LICENSE and the COPYRIGHTS files for
# more information about the licensing of this file.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this comment shouldn't be here


""" A demo plugin that adds a page """
from . import pages


def init(plugin_manager, _, _2, _3):
""" Init the plugin """

plugin_manager.add_page(r'/admin/([a-z0-9A-Z\-_]+)/rubric_scoring', pages.CourseTaskListPage)
plugin_manager.add_page(r'/admin/([a-z0-9A-Z\-_]+)/rubric_scoring/task/([a-z0-9A-Z\-_]+)', pages.TaskListSubmissionPage)
plugin_manager.add_page(r'/admin/([a-z0-9A-Z\-_]+)/rubric_scoring/task/([a-z0-9A-Z\-_]+)/submission/([a-z0-9A-Z\-_]+)',
pages.SubmissionRubricPage)



plugin_manager.add_page(r'/admin/([a-z0-9A-Z\-_]+)/rubric_scoring_temp', pages.CourseTaskListPageTemp)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this a temporal route? this should be removed.

plugin_manager.add_page(r'/admin/([a-z0-9A-Z\-_]+)/rubric_scoring_temp/task/([a-z0-9A-Z\-_]+)',
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should also be removed as it is "temporal"

pages.TaskListSubmissionPageTemp)
plugin_manager.add_page(
r'/admin/([a-z0-9A-Z\-_]+)/rubric_scoring_temp/task/([a-z0-9A-Z\-_]+)/submission/([a-z0-9A-Z\-_]+)',
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as before, remove temporal routes and files

pages.SubmissionRubricPageTemp)



plugin_manager.add_hook('course_admin_menu', pages.rubric_course_admin_menu_hook)
plugin_manager.add_hook('course_admin_menu', pages.rubric_course_admin_menu_hook_temp)




Loading