MantisBT - ATutor
View Issue Details
0002829ATutorTests/Surveyspublic2006-11-14 06:022007-02-05 08:03
user2 
user2 
normalminoralways
closedfixed 
 
1.5.4 
SVN
0002829: format score
need a way to nicely format a partial score for ordering.

"2.50" should result in "2.5"
"2.00" should result in "2"
No tags attached.
Issue History
2006-11-14 06:02user2New Issue
2006-11-14 06:02user2Affects version => SVN
2006-11-14 06:21user2Note Added: 0002239
2006-11-14 06:23user2Note Added: 0002240
2006-11-14 06:23user2Note Added: 0002241
2007-02-01 06:39user2Statusnew => resolved
2007-02-01 06:39user2Fixed in Version => 1.5.4
2007-02-01 06:39user2Resolutionopen => fixed
2007-02-01 06:39user2Assigned To => user2
2007-02-01 06:39user2Note Added: 0002321
2007-02-05 08:03user2Statusresolved => closed

Notes
(0002239)
user2   
2006-11-14 06:21   
something like:
if ( (float) (int) $score == $score) {
    $score = (int) $score; // a whole number with decimals, eg. "2.00"
} else {
    $score = trim($score, '0'); // remove trailing zeros, if any
}
(0002240)
user2   
2006-11-14 06:23   
needed when saving a score manually on /tools/tests/view_results.php
(0002241)
user2   
2006-11-14 06:23   
the score field on that page ( ^^ ) should accept 4 characters, not 3.
(0002321)
user2   
2007-02-01 06:39   
revision #6706