Can't edit moodle's password policy

Can't edit moodle's password policy

by Salome Tkhilaishvili -
Number of replies: 2

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

why this  logic is placed in this code (Is  it because password policy should't been edited or because of extra secuirity?)

If i make $adminediting  always true my admin account would be able to change settings?

$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');

}



Average of ratings: -
In reply to Salome Tkhilaishvili

Re: Can't edit moodle's password policy

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

If this code was stopping you from editing, the fields would be greyed out.  You would not be able to edit fields at all.  I suspect you have a cache issue going on.  Try clearing caches and then see if the new settings hold.

In reply to Emma Richardson

Re: Can't edit moodle's password policy

by Salome Tkhilaishvili -

Hi Emma Richardson,

Thank you for your reply,but i have cleaned all history and cash data but i am not able to edit pasword policy,

What should i make?