Skip to content

Commit

Permalink
MDL-7571 - shuffles 'mode' before displaying, merged from 18STABLE
Browse files Browse the repository at this point in the history
  • Loading branch information
arborrow committed Jul 4, 2008
1 parent 41f7e89 commit 1e5575a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions grade/lib.php
Expand Up @@ -1594,6 +1594,7 @@ function grade_get_stats($category='all') {
// returns a comma seperated list of the most common values in $items, $items is expected to be a comma sperated list of numbers
function grade_mode($items) {
$all_scores = explode(',',$items);
shuffle($all_scores); //MDL-7571 - shuffle scores
foreach($all_scores as $value) {
if (isset($frequency[$value])) {
$frequency[$value]++;
Expand Down

0 comments on commit 1e5575a

Please sign in to comment.