Skip to content

Commit

Permalink
registration MDL-25322 fix average participant and module display (on…
Browse files Browse the repository at this point in the history
…ly two digital)
  • Loading branch information
mouneyrac committed Nov 19, 2010
1 parent dc084e4 commit ceac2af
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions admin/registration/forms.php
Original file line number Diff line number Diff line change
Expand Up @@ -368,8 +368,8 @@ public function definition() {
$questioncount = $DB->count_records('question');
$resourcecount = $DB->count_records('resource');
require_once($CFG->dirroot . "/course/lib.php");
$participantnumberaverage = average_number_of_participants();
$modulenumberaverage = average_number_of_courses_modules();
$participantnumberaverage = number_format(average_number_of_participants(), 2);
$modulenumberaverage = number_format(average_number_of_courses_modules(), 2);

if (HUB_MOODLEORGHUBURL != $huburl) {
$mform->addElement('checkbox', 'courses', get_string('sendfollowinginfo', 'hub'),
Expand Down Expand Up @@ -398,13 +398,11 @@ public function definition() {
$mform->setDefault('resources', true);

$mform->addElement('checkbox', 'participantnumberaverage', '',
" " . get_string('participantnumberaverage', 'hub',
number_format($participantnumberaverage, 2)));
" " . get_string('participantnumberaverage', 'hub', $participantnumberaverage));
$mform->setDefault('participantnumberaverage', true);

$mform->addElement('checkbox', 'modulenumberaverage', '',
" " . get_string('modulenumberaverage', 'hub',
number_format($modulenumberaverage, 2)));
" " . get_string('modulenumberaverage', 'hub', $modulenumberaverage));
$mform->setDefault('modulenumberaverage', true);
} else {
$mform->addElement('static', 'courseslabel', get_string('sendfollowinginfo', 'hub'),
Expand Down

0 comments on commit ceac2af

Please sign in to comment.