removed comment on exercise in the RFC view. redirect 10% of user instead of redirecting to the RFC view to the feedback view. redirect all users how submitted to the feedback view if score is less than 100%

This commit is contained in:
Thomas Hille
2017-04-12 11:47:39 +02:00
parent 3cf123c61e
commit 60e587b690
7 changed files with 36 additions and 41 deletions

View File

@@ -20,7 +20,6 @@
<u><%= t('activerecord.attributes.request_for_comments.question')%>:</u> <%= t('request_for_comments.no_question') %>
<% end %>
</h5>
<button class="btn btn-warning" id="comment-exercise-button"><%= t('request_for_comments.comment_exercise') %></button>
<% if (policy(@request_for_comment).mark_as_solved? and not @request_for_comment.solved?) %>
<button class="btn btn-primary" id="mark-as-solved-button"><%= t('request_for_comments.mark_as_solved') %></button>
@@ -62,7 +61,6 @@ also, all settings from the rails model needed for the editor configuration in t
<% end %>
<%= render('shared/modal', id: 'comment-modal', title: t('exercises.implement.comment.dialogtitle'), template: 'exercises/_comment_dialogcontent') %>
<%= render('shared/modal', id: 'comment-exercise-modal', title: t('exercises.implement.comment.addCommentExercise'), template: 'exercises/_comment_exercise_dialogcontent') %>
<script type="text/javascript">
@@ -84,29 +82,6 @@ also, all settings from the rails model needed for the editor configuration in t
});
});
// comment exercise
commentOnExerciseButton.on('click', function(){
$('#comment-exercise-modal').modal('show');
})
addCommentExerciseButton.on('click', function(event){
var comment = $('#commentOnExercise').val();
var url = $('#exercise_caption').data('comment-exercise-url');
var jqrequest = $.ajax({
dataType: 'json',
method: 'POST',
url: url,
data: {
exercise_id: $('#exercise_caption').data('exercise-id'),
feedback_text: comment
},
dataType: 'json'
});
$('#comment-exercise-modal').modal('hide');
});
// set file paths for ace
var ACE_FILES_PATH = '/assets/ace/';
_.each(['modePath', 'themePath', 'workerPath'], function(attribute) {