Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 1441
Línea 23... Línea 23...
23
 * @license     http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
23
 * @license     http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
24
 */
24
 */
Línea 25... Línea 25...
25
 
25
 
Línea 26... Línea 26...
26
defined('MOODLE_INTERNAL') || die();
26
defined('MOODLE_INTERNAL') || die();
27
 
27
 
28
$enabled = new admin_setting_configcheckbox('factor_capability/enabled',
28
if ($ADMIN->fulltree) {
29
    new lang_string('settings:enablefactor', 'tool_mfa'),
-
 
30
    new lang_string('settings:enablefactor_help', 'tool_mfa'), 0);
29
    $settings->add(new admin_setting_heading('factor_capability/description', '',
31
$enabled->set_updatedcallback(function () {
-
 
32
    \tool_mfa\manager::do_factor_action('capability', get_config('factor_capability', 'enabled') ? 'enable' : 'disable');
-
 
Línea 33... Línea 30...
33
});
30
        new lang_string('settings:description', 'factor_capability')));
34
$settings->add($enabled);
31
    $settings->add(new admin_setting_heading('factor_capability/settings', new lang_string('settings', 'moodle'), ''));
35
 
32
 
-
 
33
    $enabled = new admin_setting_configcheckbox('factor_capability/enabled',
-
 
34
        new lang_string('settings:enablefactor', 'tool_mfa'),
-
 
35
        new lang_string('settings:enablefactor_help', 'tool_mfa'), 0);
-
 
36
    $enabled->set_updatedcallback(function () {
Línea -... Línea 37...
-
 
37
        \tool_mfa\manager::do_factor_action('capability', get_config('factor_capability', 'enabled') ? 'enable' : 'disable');
-
 
38
    });
-
 
39
    $settings->add($enabled);
-
 
40
 
36
$settings->add(new admin_setting_configtext('factor_capability/weight',
41
    $settings->add(new admin_setting_configtext('factor_capability/weight',
37
    new lang_string('settings:weight', 'tool_mfa'),
42
        new lang_string('settings:weight', 'tool_mfa'),
38
    new lang_string('settings:weight_help', 'tool_mfa'), 100, PARAM_INT));
43
        new lang_string('settings:weight_help', 'tool_mfa'), 100, PARAM_INT));
39
 
44
 
-
 
45
    // Admin passes bool logic is inverted due to negative capability check.