Skip to content

Commit

Permalink
Merge branch 'MDL-27748' of git://github.com/timhunt/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
danpoltawski committed May 20, 2013
2 parents 7ae324c + 0a5aa9c commit d6aec96
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions question/engine/bank.php
Original file line number Diff line number Diff line change
Expand Up @@ -380,14 +380,15 @@ protected static function ensure_fraction_options_initialised() {

// The the positive grades in descending order.
foreach ($rawfractions as $fraction) {
$percentage = (100 * $fraction) . '%';
$percentage = format_float(100 * $fraction, 5, true, true) . '%';
self::$fractionoptions["$fraction"] = $percentage;
self::$fractionoptionsfull["$fraction"] = $percentage;
}

// The the negative grades in descending order.
foreach (array_reverse($rawfractions) as $fraction) {
self::$fractionoptionsfull['' . (-$fraction)] = (-100 * $fraction) . '%';
self::$fractionoptionsfull['' . (-$fraction)] =
format_float(-100 * $fraction, 5, true, true) . '%';
}

self::$fractionoptionsfull['-1.0'] = '-100%';
Expand Down

0 comments on commit d6aec96

Please sign in to comment.