Commit f1b86a8f authored by Camille Tardy's avatar Camille Tardy
Browse files

fix page titile when error in edit course form


Signed-off-by: Camille Tardy's avatarCamille Tardy <camille.tardy@unige.ch>
parent c0658964
...@@ -188,6 +188,7 @@ class core_renderer extends \theme_boost\output\core_renderer { ...@@ -188,6 +188,7 @@ class core_renderer extends \theme_boost\output\core_renderer {
break; break;
case 'admin': case 'admin':
if ($this->page->pagetype == "user-preferences" if ($this->page->pagetype == "user-preferences"
OR $this->page->pagetype == "user-edit" OR $this->page->pagetype == "user-edit"
OR $this->page->pagetype == "user-editadvanced" OR $this->page->pagetype == "user-editadvanced"
...@@ -212,9 +213,11 @@ class core_renderer extends \theme_boost\output\core_renderer { ...@@ -212,9 +213,11 @@ class core_renderer extends \theme_boost\output\core_renderer {
$heading = get_string('preferences', 'moodle'); $heading = get_string('preferences', 'moodle');
} elseif ($this->page->pagetype == "message-output-popup-notifications") { } elseif ($this->page->pagetype == "message-output-popup-notifications") {
$heading = get_string('notifications', 'moodle'); $heading = get_string('notifications', 'moodle');
} elseif ($this->page->pagetype == "course-edit" AND isset($_GET["category"])) { } elseif (($this->page->pagetype == "course-edit" AND isset($_GET["category"])) OR ($this->page->pagetype == "course-edit" AND !isset($_REQUEST["id"])) ) {
// if category is set or if Request does not return a course id then its a new course creation
$heading = get_string('addnewcourse', 'moodle'); $heading = get_string('addnewcourse', 'moodle');
} elseif ($this->page->pagetype == "course-edit" AND isset($_GET["id"])) { } elseif ($this->page->pagetype == "course-edit" AND isset($_GET["id"])) {
// if id is set then its an edition and not a creation
$heading = get_string('editcoursesettings', 'moodle'); $heading = get_string('editcoursesettings', 'moodle');
} }
break; break;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment