Commit 501e83d0 by Jason Bau

pin LTI scores to 2 decimal places

parent 198f23ed
......@@ -92,7 +92,7 @@ Feature: LMS.LTI component
And I see in the gradebook table that "HW" is "80"
And I see in the gradebook table that "Total" is "8"
And I visit the LTI component
Then I see LTI component progress with text "(8.0 / 10.0 points)"
Then I see LTI component progress with text "(8.00 / 10.00 points)"
Then I see LTI component feedback with text "This is awesome."
#10
......@@ -103,11 +103,11 @@ Feature: LMS.LTI component
| False | 10 | True | True |
And I submit answer to LTI 2 question
And I visit the LTI component
Then I see LTI component progress with text "(8.0 / 10.0 points)"
Then I see LTI component progress with text "(8.00 / 10.00 points)"
Then I see LTI component feedback with text "This is awesome."
And the LTI provider deletes my grade and feedback
And I visit the LTI component (have to reload)
Then I see LTI component progress with text "(10.0 points possible)"
Then I see LTI component progress with text "(10.00 points possible)"
Then in the LTI component I do not see feedback
And I click on the "Progress" tab
Then I see text "Problem Scores: 0/10"
......
......@@ -10,10 +10,10 @@
<div class="problem-progress">
% if module_score is not None:
## Translators: "points" is the student's achieved score on this LTI unit, and "total_points" is the maximum number of points achievable.
(${_("{points} / {total_points} points").format(points=module_score, total_points=weight)})
(${_("{points} / {total_points} points").format(points="{:0.2f}".format(module_score), total_points="{:0.2f}".format(weight))})
% else:
## Translators: "total_points" is the maximum number of points achievable on this LTI unit
(${_("{total_points} points possible").format(total_points=weight)})
(${_("{total_points} points possible").format(total_points="{:0.2f}".format(weight))})
% endif
</div>
% endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment