Skip to content

Commit

Permalink
add "any" steps to get speed-reader working for now
Browse files Browse the repository at this point in the history
fixes CNVS-23347

default browser validation was calling out
fractional points, which is different from
previous behavior.  Adding "step='any'" to
these input fields prevents the validation
from occuring

Change-Id: I6a05dc6741949239a2691421ece552c23f6b0c21
Reviewed-on: https://gerrit.instructure.com/63641
Reviewed-by: Jason Madsen <[email protected]>
Product-Review: Ethan Vizitei <[email protected]>
Tested-by: Ethan Vizitei <[email protected]>
QA-Review: Derek Hansen <[email protected]>
  • Loading branch information
evizitei committed Sep 19, 2015
1 parent a05b73a commit b39b635
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/views/quizzes/quizzes/_display_question.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
<% if user_answer %>
<div class="user_points" <%= hidden(true) if (assessing || assessment_results) && question_type && question_type.entry_type == "none" %>>
<% if editable %>
<input type="number" class="question_input"
<input type="number" step="any" class="question_input"
name="question_score_<%= hash_get(question, :id) %>" placeholder="--"
value="<%= point_value_for_input(user_answer, question).is_a?(Float) &&
!point_value_for_input(user_answer, question).nan? &&
Expand Down
2 changes: 1 addition & 1 deletion app/views/quizzes/quizzes/_quiz_submission.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
<div class="update_scores_fudge">
<label for="fudge_points_entry"><%= before_label(:fudge_points, "Fudge Points") %></label>
<input type="hidden" name="fudge_points" value="<%= @submission.fudge_points || 0 %>">
<input id="fudge_points_entry" type="number" name="fudge_points" value="<%= (!@submission.fudge_points || @submission.fudge_points == 0 ? '' : @submission.fudge_points) %>" placeholder="--" autocomplete='off' />
<input id="fudge_points_entry" type="number" step="any" name="fudge_points" value="<%= (!@submission.fudge_points || @submission.fudge_points == 0 ? '' : @submission.fudge_points) %>" placeholder="--" autocomplete='off' />
<%
fudge_text = begin
if @submission.quiz_points_possible == @quiz.points_possible || !@submission.quiz_points_possible || !@quiz.points_possible
Expand Down

0 comments on commit b39b635

Please sign in to comment.