简体   繁体   English

无法编辑Moodle密码政策

[英]Can't edit moodle password policy

I want to edit moodle's password policy (I have admin account) but when i try to edit new values and after that push button "Save changes" it don't saves edited value and insted shows me old default values i have moodle 3.5 and in it's opensource code in (admin->category.php) i have found code like this: I am not experienced developer but from this code i found that admin user isn't allowed to edit settings at all 我想编辑moodle的密码策略(我有admin帐户),但是当我尝试编辑新值时,在单击“保存更改”按钮后,它不保存修改后的值,而是显示我的默认默认值,我使用moodle 3.5它是(admin-> category.php)中的开源代码,我发现了这样的代码:我不是经验丰富的开发人员,但是从这段代码中,我发现根本不允许管理员用户编辑设置

  1. why this logic is placed in this code (Is it because password policy should't been edited or because of extra secuirity?) 为什么在此代码中放置此逻辑(是因为不应编辑密码策略还是由于额外的安全性?)
  2. If i make $adminediting always true my admin account would be able to change settings? 如果我使$ adminediting始终为true,则我的管理员帐户将能够更改设置?

    $adminediting = optional_param('adminedit', -1, PARAM_BOOL); $ adminediting = optional_param('adminedit',-1,PARAM_BOOL);

     if ($PAGE->user_allowed_editing() && $adminediting != -1) { $USER->editing = $adminediting; } if ($PAGE->user_allowed_editing()) { $url = clone($PAGE->url); if ($PAGE->user_is_editing()) { $caption = get_string('blockseditoff'); $url->param('adminedit', 'off'); } else { $caption = get_string('blocksediton'); $url->param('adminedit', 'on'); } $buttons = $OUTPUT->single_button($url, $caption, 'get'); } 

Admin editing is something related to 'turning editing mode on' for your LMS to make any changes. 管理员编辑是与“打开编辑模式”有关的内容,LMS可以进行任何更改。 Admin authorized to do any modifications in LMS. 管理员有权在LMS中进行任何修改。

Check in database config table for your setting. 在数据库配置表中签入您的设置。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM