Skip to content
Permalink
Browse files

Add new configuration option "user_import_settings" see BT#15081

To set default parameters in the main/admin/user_import.php page
  • Loading branch information...
jmontoyaa committed Nov 29, 2018
1 parent ea41401 commit 3292b3c108af05b1c4fcea748f81067870da1f9b
Showing with 16 additions and 0 deletions.
  1. +9 −0 main/admin/user_import.php
  2. +7 −0 main/install/configuration.dist.php
@@ -1,5 +1,6 @@
<?php
/* For licensing terms, see /license.txt */
/**
* This tool allows platform admins to add users by uploading a CSV or XML file.
*
@@ -548,6 +549,14 @@ function parse_xml_data($file)
$defaults['formSent'] = 1;
$defaults['sendMail'] = 0;
$defaults['file_type'] = 'csv';
$extraSettings = api_get_configuration_value('user_import_settings');
if (!empty($extraSettings) && isset($extraSettings['options']) &&
isset($extraSettings['options']['send_mail_default_option'])
) {
$defaults['sendMail'] = $extraSettings['options']['send_mail_default_option'];
}
$form->setDefaults($defaults);
$form->display();
@@ -1032,6 +1032,13 @@
]
];*/
// This option sets default parameters in the main/admin/user_import.php
/*$_configuration['user_import_settings'] = [
'options' => [
'send_mail_default_option' => '1',
]
];*/
// Disable all new exercise attempts in all the platform
// $_configuration['exercises_disable_new_attempts'] = false;

0 comments on commit 3292b3c

Please sign in to comment.
You can’t perform that action at this time.