Options are selected by default see #6739

1.9.x
Julio Montoya 11 years ago
parent 7b6ba4e019
commit 563d83adbb
  1. 9
      main/admin/course_user_import.php

@ -181,6 +181,9 @@ $form->addElement('file', 'import_file', get_lang('ImportFileLocation'));
$form->addElement('checkbox', 'subscribe', get_lang('Action'), get_lang('SubscribeUserIfNotAllreadySubscribed'));
$form->addElement('checkbox', 'unsubscribe', '', get_lang('UnsubscribeUserIfSubscriptionIsNotInFile'));
$form->addElement('style_submit_button', 'submit', get_lang('Import'), 'class="save"');
$form->setDefaults(array('subscribe' => '1', 'unsubscribe' => 1));
if ($form->validate()) {
$users_courses = parse_csv_data($_FILES['import_file']['tmp_name']);
$errors = validate_data($users_courses);
@ -202,11 +205,7 @@ if ($form->validate()) {
}
Security::clear_token();
$tok = Security::get_token();
header(
'Location: user_list.php?action=show_message&message='.urlencode(
get_lang('FileImported')
).'&warn='.urlencode($warn).'&sec_token='.$tok
);
header('Location: user_list.php?action=show_message&message='.urlencode(get_lang('FileImported')).'&warn='.urlencode($warn).'&sec_token='.$tok);
exit();
}
}

Loading…
Cancel
Save