MDL-32088 user: Correct the Moodle docs link

This patch links the moodle docs link to user profile Moodle doc when
the user sees the user profile for a particular course. The page is set
to course view type to load course specific blocks. So, we use
set_docs_path to change the Moodle docs link instead of changing the
pagetype.
This commit is contained in:
Vishal Raheja
2014-12-30 13:47:53 +00:00
committed by Dan Poltawski
parent 56624fa968
commit 7d0a054ae7
+4
View File
@@ -74,6 +74,10 @@ $PAGE->set_pagetype('course-view-' . $course->format); // To get the blocks exa
$PAGE->add_body_class('path-user'); // So we can style it independently.
$PAGE->set_other_editing_capability('moodle/course:manageactivities');
// Set the Moodle docs path explicitly because the default behaviour
// of inhereting the pagetype will lead to an incorrect docs location.
$PAGE->set_docs_path('user/profile');
$isparent = false;
if (!$currentuser and !$user->deleted