mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 05:58:34 +01:00
enrol MDL-22867 Fixed a couple of bugs and made some slight display changes.
* Set the default per page limit to 100 instead of 20 * Set the default enrolment role to enrol_manual:roleid config * Added course name to page title * Fixed centering bug of cohort dialogue * Fixed double display bug
This commit is contained in:
parent
ee9a49628d
commit
23cee7a4cf
@ -221,9 +221,9 @@ class course_enrolment_table extends html_table implements renderable {
|
||||
|
||||
/**
|
||||
* The default number of items per page.
|
||||
* Default: 20
|
||||
* Default: 100
|
||||
*/
|
||||
const DEFAULTPERPAGE = 20;
|
||||
const DEFAULTPERPAGE = 100;
|
||||
|
||||
/**
|
||||
* The default sort, options are course_enrolment_table::$sortablefields
|
||||
@ -642,7 +642,8 @@ class course_enrolment_table extends html_table implements renderable {
|
||||
'courseid'=>$course->id,
|
||||
'ajaxurl'=>'/enrol/ajax.php',
|
||||
'url'=>$url->out(false),
|
||||
'optionsStartDate'=>$startdateoptions));
|
||||
'optionsStartDate'=>$startdateoptions,
|
||||
'defaultRole'=>get_config('enrol_manual', 'roleid')));
|
||||
$page->requires->yui_module(array('moodle-enrol-enrolmentmanager', 'moodle-enrol-enrolmentmanager-skin'), 'M.enrol.enrolmentmanager.init', $arguments);
|
||||
}
|
||||
return $control;
|
||||
|
@ -210,10 +210,10 @@ foreach ($users as $userid=>&$user) {
|
||||
}
|
||||
$table->set_users($users);
|
||||
|
||||
$PAGE->set_title(get_string('enrolledusers', 'enrol'));
|
||||
$PAGE->set_title($PAGE->course->fullname.': '.get_string('enrolledusers', 'enrol'));
|
||||
$PAGE->set_heading($PAGE->course->fullname);
|
||||
|
||||
echo $OUTPUT->header();
|
||||
echo $OUTPUT->heading(get_string('enrolledusers', 'enrol'));
|
||||
echo $renderer->render($table);
|
||||
echo $OUTPUT->footer();
|
||||
echo $OUTPUT->footer();
|
@ -462,8 +462,7 @@ YUI.add('moodle-enrol-enrolmentmanager', function(Y) {
|
||||
validator : Y.Lang.isObject
|
||||
},
|
||||
defaultRole : {
|
||||
value : 0,
|
||||
validator : Y.Lang.isNumber
|
||||
value : 0
|
||||
},
|
||||
defaultStartDate : {
|
||||
value : 2,
|
||||
|
@ -50,9 +50,11 @@ YUI.add('moodle-enrol-quickcohortenrolment', function(Y) {
|
||||
});
|
||||
panel.get('boundingBox').addClass(CSS.PANEL);
|
||||
panel.render(Y.one(document.body));
|
||||
this.on('show', panel.show, panel);
|
||||
this.on('show', function(){
|
||||
this.set('centered', true);
|
||||
this.show();
|
||||
}, panel);
|
||||
this.on('hide', function() {
|
||||
this.set('bodyContent', Y.Node.create('<div class="loading"></div>').append(Y.Node.create('<img alt="loading" />').setAttribute('src', M.cfg.loadingicon)));
|
||||
this.hide();
|
||||
}, panel);
|
||||
this.on('assignablerolesloaded', this.updateContent, this, panel);
|
||||
@ -96,7 +98,7 @@ YUI.add('moodle-enrol-quickcohortenrolment', function(Y) {
|
||||
cohorts[i].on('enrolusers', this.enrolCohort, this, cohorts[i], panel.get('contentBox'), true);
|
||||
content.append(cohorts[i].toHTML(supportmanual).addClass((count%2)?'even':'odd'));
|
||||
}
|
||||
panel.get('contentBox').one('.'+CSS.PANELCOHORTS).append(content);
|
||||
panel.get('contentBox').one('.'+CSS.PANELCOHORTS).setContent(content);
|
||||
break;
|
||||
case 'assignablerolesloaded':
|
||||
roles = this.get(ASSIGNABLEROLES);
|
||||
|
Loading…
x
Reference in New Issue
Block a user