Merge branch 'MDL-74266-master' of https://github.com/mihailges/moodle

This commit is contained in:
Jun Pataleta 2022-03-28 22:27:41 +08:00
commit 328bba2743
2 changed files with 3 additions and 2 deletions

View File

@ -778,7 +778,7 @@ class secondary extends view {
$existingkeys = $completenode->get_children_key_list();
$leftover = array_diff($existingkeys, $populatedkeys);
foreach ($leftover as $key) {
if (!in_array($key, $flattenednodes) && $leftovernode = $completenode->get($key)) {
if (!in_array($key, $flattenednodes, true) && $leftovernode = $completenode->get($key)) {
// Check for nodes with children and potentially no action to direct to.
if ($leftovernode->has_children()) {
$leftovernode = $this->get_first_action_for_node($leftovernode);

View File

@ -1338,7 +1338,8 @@ function chat_extend_settings_navigation(settings_navigation $settings, navigati
if ($chat->studentlogs || has_capability('mod/chat:readlog', $settings->get_page()->cm->context)) {
if ($DB->get_records_select('chat_messages', "chatid = ? $groupselect", array($chat->id))) {
$chatnode->add(get_string('pastsessions', 'chat'),
new moodle_url('/mod/chat/report.php', array('id' => $settings->get_page()->cm->id)));
new moodle_url('/mod/chat/report.php', array('id' => $settings->get_page()->cm->id)),
navigation_node::TYPE_SETTING, null, 'pastsessions');
}
}
}