diff --git a/app/assets/javascripts/learning_conditions.js.coffee b/app/assets/javascripts/learning_conditions.js.coffee index eb194c47..aa31f471 100644 --- a/app/assets/javascripts/learning_conditions.js.coffee +++ b/app/assets/javascripts/learning_conditions.js.coffee @@ -13,5 +13,5 @@ $ () -> feedbackPenaltyValue.val "100" feedbackPenalty.show() else - feedbackPenaltyValue.val "0" + feedbackPenaltyValue.val null feedbackPenalty.hide() diff --git a/app/models/feedback_condition.rb b/app/models/feedback_condition.rb index a517099d..484b0642 100644 --- a/app/models/feedback_condition.rb +++ b/app/models/feedback_condition.rb @@ -316,7 +316,7 @@ def schedule_feedback_availability_notification(student_exercise, event) def adjust_credit(student_exercise, event) if StudentExercise::Event::COMPLETE == event - student_exercise.update_feedback_credit_multiplier!(is_feedback_required_for_credit ? feedback_viewing_penalty/100.0 : 1) + student_exercise.update_feedback_credit_multiplier!(is_feedback_required_for_credit ? (100 - feedback_viewing_penalty)/100.0 : 1) end if StudentExercise::Event::FEEDBACK_VIEWED == event diff --git a/app/views/feedback_conditions/_form_fields.html.erb b/app/views/feedback_conditions/_form_fields.html.erb index 599bf66d..739fe8a1 100644 --- a/app/views/feedback_conditions/_form_fields.html.erb +++ b/app/views/feedback_conditions/_form_fields.html.erb @@ -29,8 +29,8 @@ <% end %> > <%= link_to_help 'feedback_viewing_penalty', text="Penalty", - {:title => 'Penalty'} %> if a student does not view feedback (0-100%): - <%= form.number_field :feedback_viewing_penalty, in:0..100, step:1, size:3 %> + {:title => 'Penalty'} %> if a student does not view feedback (1-100%): + <%= form.number_field :feedback_viewing_penalty, in:1..100, step:1, size:3 %>
<%= form.check_box :can_automatically_show_feedback %>