Merge remote-tracking branch 'origin/master' into testruns

This commit is contained in:
Maximilian Grundke
2016-03-10 16:53:56 +01:00
3 changed files with 16 additions and 12 deletions

View File

@ -310,14 +310,14 @@ $(function() {
//console.log("Text is the same: " + same); //console.log("Text is the same: " + same);
// if the text is not copied from within the editor (from any file), send an event to lanalytics // if the text is not copied from within the editor (from any file), send an event to lanalytics
//if(!same){ if(!same){
// publishCodeOceanEvent("codeocean_editor_paste", { publishCodeOceanEvent("codeocean_editor_paste", {
// text: pasteObject.text, text: pasteObject.text,
// exercise: $('#editor').data('exercise-id'), exercise: $('#editor').data('exercise-id'),
// file_id: "1" file_id: "1"
//
// }); });
//} }
}; };
var handleScoringResponse = function(response) { var handleScoringResponse = function(response) {

View File

@ -154,7 +154,10 @@ $(function() {
} else if ($('.edit_exercise, .new_exercise').isPresent()) { } else if ($('.edit_exercise, .new_exercise').isPresent()) {
execution_environments = $('form').data('execution-environments'); execution_environments = $('form').data('execution-environments');
file_types = $('form').data('file-types'); file_types = $('form').data('file-types');
new MarkdownEditor('#exercise_instructions'); // new MarkdownEditor('#exercise_instructions');
new MarkdownEditor('#exercise_description');
// todo: add an ace editor for each file
enableInlineFileCreation(); enableInlineFileCreation();
inferFileAttributes(); inferFileAttributes();
observeFileRoleChanges(); observeFileRoleChanges();

View File

@ -8,15 +8,16 @@
= f.text_field(:title, class: 'form-control', required: true) = f.text_field(:title, class: 'form-control', required: true)
.form-group .form-group
= f.label(:description) = f.label(:description)
= f.text_area(:description, class: 'form-control') = f.hidden_field(:description)
.form-control.markdown
.form-group .form-group
= f.label(:execution_environment_id) = f.label(:execution_environment_id)
= f.collection_select(:execution_environment_id, @execution_environments, :id, :name, {}, class: 'form-control') = f.collection_select(:execution_environment_id, @execution_environments, :id, :name, {}, class: 'form-control')
.form-group /.form-group
= f.label(:instructions) = f.label(:instructions)
= f.hidden_field(:instructions) = f.hidden_field(:instructions)
.form-control.markdown .form-control.markdown
.form-group /.form-group
= f.label(:team_id) = f.label(:team_id)
= f.collection_select(:team_id, @teams, :id, :name, {include_blank: true}, class: 'form-control') = f.collection_select(:team_id, @teams, :id, :name, {include_blank: true}, class: 'form-control')
.checkbox .checkbox