Skip to content

Commit

Permalink
MDL-34190 Course: Role with student archtype should be selected as de…
Browse files Browse the repository at this point in the history
…fault in user list
  • Loading branch information
Rajesh Taneja committed Jan 18, 2013
1 parent ca48fe5 commit b2da647
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions course/reset_form.php
Expand Up @@ -107,6 +107,11 @@ function load_defaults() {

$defaults = array ('reset_events'=>1, 'reset_logs'=>1, 'reset_roles_local'=>1, 'reset_gradebook_grades'=>1, 'reset_notes'=>1);

// Set student as default in unenrol user list, if role with student archetype exist.
if ($studentrole = get_archetype_roles('student')) {
$defaults['unenrol_users'] = array_keys($studentrole);
}

if ($allmods = $DB->get_records('modules') ) {
foreach ($allmods as $mod) {
$modname = $mod->name;
Expand Down

0 comments on commit b2da647

Please sign in to comment.