blocks/quiz_results: MDL-21284 - dont strip leading zeros from idnumbers
authorDan Poltawski <dan.poltawski@lancaster.ac.uk>
Wed, 24 Feb 2010 08:52:06 +0000 (08:52 +0000)
committerDan Poltawski <dan.poltawski@lancaster.ac.uk>
Wed, 24 Feb 2010 08:52:06 +0000 (08:52 +0000)
Or make assumptions its an integer as many external systems are not and to
be of copy and paste use to teachers it should match

forward ported from MOODLE_19_STABLE

blocks/quiz_results/block_quiz_results.php

index d3e1b76..f086790 100644 (file)
@@ -358,7 +358,7 @@ class block_quiz_results extends block_base {
                 foreach($best as $userid => $gradeid) {
                     switch($nameformat) {
                         case B_QUIZRESULTS_NAME_FORMAT_ID:
-                            $thisname = get_string('user').' '.intval($users[$userid]->idnumber);
+                            $thisname = get_string('user').' '.$users[$userid]->idnumber;
                         break;
                         case B_QUIZRESULTS_NAME_FORMAT_ANON:
                             $thisname = get_string('user');
@@ -399,7 +399,7 @@ class block_quiz_results extends block_base {
                 foreach($worst as $userid => $gradeid) {
                     switch($nameformat) {
                         case B_QUIZRESULTS_NAME_FORMAT_ID:
-                            $thisname = get_string('user').' '.intval($users[$userid]->idnumber);
+                            $thisname = get_string('user').' '.$users[$userid]->idnumber;
                         break;
                         case B_QUIZRESULTS_NAME_FORMAT_ANON:
                             $thisname = get_string('user');