MDL-79912 backup: Create Course reuse index page

The backup/view.php page has been created to display the list of
course reuse actions available for users.
That way, the "Course reuse" option in the secondary navigation
will display this page instead of redirecting to the first action
available.

Apart from that, the headers for all the Course reuse actions have
been homogenised and the tertiary navigation selector has been included,
to replace headers and make it easier navigate between actions.
This commit is contained in:
Sara Arjona
2023-11-22 18:11:43 +01:00
parent b58d1fd4e2
commit 424c9cb1bd
17 changed files with 269 additions and 86 deletions
@@ -425,18 +425,6 @@ class secondary extends view {
}
}
// Move some nodes into a 'course reuse' node.
$overflownode = $this->get_course_overflow_nodes($rootnode);
if (!is_null($overflownode)) {
$actionnode = $this->get_first_action_for_node($overflownode);
if ($actionnode) {
// All additional nodes will be available under the 'Course reuse' page.
$text = get_string('coursereuse');
$rootnode->add($text, $actionnode->action, navigation_node::TYPE_COURSE, null, 'coursereuse',
new \pix_icon('t/edit', $text));
}
}
// Add the respective first node, provided there are other nodes included.
if (!empty($nodekeys = $rootnode->children->get_key_list())) {
$rootnode->add_node(