Skip to content

Commit

Permalink
MDL-47033 general: Fix incorrect use of 'course' layout
Browse files Browse the repository at this point in the history
It should use 'incourse' layout in most cases

Signed-off-by: Yuliya Bozhko <[email protected]>
  • Loading branch information
Yuliya Bozhko committed Sep 4, 2014
1 parent 457f818 commit 369484b
Show file tree
Hide file tree
Showing 17 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion badges/edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
}
require_login($badge->courseid);
$navurl = new moodle_url('/badges/index.php', array('type' => $badge->type, 'id' => $badge->courseid));
$PAGE->set_pagelayout('course');
$PAGE->set_pagelayout('incourse');
navigation_node::override_active_url($navurl);
} else {
$PAGE->set_pagelayout('admin');
Expand Down
2 changes: 1 addition & 1 deletion badges/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
$coursecontext = context_course::instance($course->id);
$title = get_string('coursebadges', 'badges');
$PAGE->set_context($coursecontext);
$PAGE->set_pagelayout('course');
$PAGE->set_pagelayout('incourse');
$PAGE->set_heading(format_string($course->fullname, true, array('context' => $coursecontext)) . ': ' . $hdr);
navigation_node::override_active_url(
new moodle_url('/badges/index.php', array('type' => BADGE_TYPE_COURSE, 'id' => $course->id))
Expand Down
2 changes: 1 addition & 1 deletion badges/newbadge.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
require_login($course);
$coursecontext = context_course::instance($course->id);
$PAGE->set_context($coursecontext);
$PAGE->set_pagelayout('course');
$PAGE->set_pagelayout('incourse');
$PAGE->set_url('/badges/newbadge.php', array('type' => $type, 'id' => $course->id));
$heading = format_string($course->fullname, true, array('context' => $coursecontext)) . ": " . $title;
$PAGE->set_heading($heading);
Expand Down
2 changes: 1 addition & 1 deletion badges/view.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
$coursename = format_string($course->fullname, true, array('context' => context_course::instance($course->id)));
$title = $coursename . ': ' . get_string('coursebadges', 'badges');
$PAGE->set_context(context_course::instance($course->id));
$PAGE->set_pagelayout('course');
$PAGE->set_pagelayout('incourse');
$PAGE->set_heading($title);
}

Expand Down
2 changes: 1 addition & 1 deletion blocks/community/communitycourse.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
$PAGE->set_course($parentcourse);
$PAGE->set_url('/blocks/community/communitycourse.php');
$PAGE->set_heading($SITE->fullname);
$PAGE->set_pagelayout('course');
$PAGE->set_pagelayout('incourse');
$PAGE->set_title(get_string('searchcourse', 'block_community'));
$PAGE->navbar->add(get_string('searchcourse', 'block_community'));

Expand Down
2 changes: 1 addition & 1 deletion course/info.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
}

$PAGE->set_course($course);
$PAGE->set_pagelayout('course');
$PAGE->set_pagelayout('incourse');
$PAGE->set_url('/course/info.php', array('id' => $course->id));
$PAGE->set_title(get_string("summaryof", "", $course->fullname));
$PAGE->set_heading(get_string('courseinfo'));
Expand Down
2 changes: 1 addition & 1 deletion course/publish/backup.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@

//page settings
$PAGE->set_url('/course/publish/backup.php');
$PAGE->set_pagelayout('course');
$PAGE->set_pagelayout('incourse');
$PAGE->set_title(get_string('course') . ': ' . $course->fullname);
$PAGE->set_heading($course->fullname);

Expand Down
2 changes: 1 addition & 1 deletion course/publish/hubselector.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
require_login($course);

$PAGE->set_url('/course/publish/hubselector.php', array('id' => $course->id));
$PAGE->set_pagelayout('course');
$PAGE->set_pagelayout('incourse');
$PAGE->set_title(get_string('course') . ': ' . $course->fullname);
$PAGE->set_heading($course->fullname);

Expand Down
2 changes: 1 addition & 1 deletion course/publish/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
$shortname = format_string($course->shortname, true, array('context' => $context));

$PAGE->set_url('/course/publish/index.php', array('id' => $course->id));
$PAGE->set_pagelayout('course');
$PAGE->set_pagelayout('incourse');
$PAGE->set_title(get_string('course') . ': ' . $course->fullname);
$PAGE->set_heading($course->fullname);

Expand Down
2 changes: 1 addition & 1 deletion course/publish/metadata.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@

//page settings
$PAGE->set_url('/course/publish/metadata.php', array('id' => $course->id));
$PAGE->set_pagelayout('course');
$PAGE->set_pagelayout('incourse');
$PAGE->set_title(get_string('course') . ': ' . $course->fullname);
$PAGE->set_heading($course->fullname);

Expand Down
2 changes: 1 addition & 1 deletion course/resources.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
$id = required_param('id', PARAM_INT); // course id

$course = $DB->get_record('course', array('id'=>$id), '*', MUST_EXIST);
$PAGE->set_pagelayout('course');
$PAGE->set_pagelayout('incourse');
require_course_login($course, true);

// get list of all resource-like modules
Expand Down
2 changes: 1 addition & 1 deletion enrol/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
}

$PAGE->set_course($course);
$PAGE->set_pagelayout('course');
$PAGE->set_pagelayout('incourse');
$PAGE->set_url('/enrol/index.php', array('id'=>$course->id));

// do not allow enrols when in login-as session
Expand Down
2 changes: 1 addition & 1 deletion files/coursefilesedit.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
$PAGE->set_context($context);
$PAGE->set_title($heading);
$PAGE->set_heading($heading);
$PAGE->set_pagelayout('course');
$PAGE->set_pagelayout('incourse');

$data = new stdClass();
$options = array('subdirs'=>1, 'maxfiles'=>-1, 'accepted_types'=>'*', 'return_types'=>FILE_INTERNAL);
Expand Down
2 changes: 1 addition & 1 deletion files/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@

$PAGE->set_title("$course->shortname: $strfiles");
$PAGE->set_heading($course->fullname);
$PAGE->set_pagelayout('course');
$PAGE->set_pagelayout('incourse');

$output = $PAGE->get_renderer('core', 'files');

Expand Down
2 changes: 1 addition & 1 deletion message/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@
require_capability('moodle/course:viewparticipants', context_course::instance($courseid));
$PAGE->set_pagelayout('incourse');
} else {
$PAGE->set_pagelayout('course');
$PAGE->set_pagelayout('standard');
$PAGE->set_context(context_user::instance($user1->id));
}
if (!empty($user1->id) && $user1->id != $USER->id) {
Expand Down
2 changes: 1 addition & 1 deletion mod/glossary/showentry.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
print_error('invalidelementid');
}

$PAGE->set_pagelayout('course');
$PAGE->set_pagelayout('incourse');

if ($entries) {
foreach ($entries as $key => $entry) {
Expand Down
2 changes: 1 addition & 1 deletion notes/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
}
}

$PAGE->set_pagelayout('course');
$PAGE->set_pagelayout('incourse');
$PAGE->set_title($course->shortname . ': ' . $strnotes);
$PAGE->set_heading($course->fullname);

Expand Down

0 comments on commit 369484b

Please sign in to comment.