Commit 1240191f by Jason Bau

Merge pull request #57 from Stanford-Online/jbau/lti-precision-master

pin LTI scores to 2 decimal places
parents 198f23ed 501e83d0
...@@ -92,7 +92,7 @@ Feature: LMS.LTI component ...@@ -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 "HW" is "80"
And I see in the gradebook table that "Total" is "8" And I see in the gradebook table that "Total" is "8"
And I visit the LTI component 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." Then I see LTI component feedback with text "This is awesome."
#10 #10
...@@ -103,11 +103,11 @@ Feature: LMS.LTI component ...@@ -103,11 +103,11 @@ Feature: LMS.LTI component
| False | 10 | True | True | | False | 10 | True | True |
And I submit answer to LTI 2 question And I submit answer to LTI 2 question
And I visit the LTI component 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." Then I see LTI component feedback with text "This is awesome."
And the LTI provider deletes my grade and feedback And the LTI provider deletes my grade and feedback
And I visit the LTI component (have to reload) 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 Then in the LTI component I do not see feedback
And I click on the "Progress" tab And I click on the "Progress" tab
Then I see text "Problem Scores: 0/10" Then I see text "Problem Scores: 0/10"
......
...@@ -10,10 +10,10 @@ ...@@ -10,10 +10,10 @@
<div class="problem-progress"> <div class="problem-progress">
% if module_score is not None: % 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. ## 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: % else:
## Translators: "total_points" is the maximum number of points achievable on this LTI unit ## 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 % endif
</div> </div>
% endif % 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