From f70a6d3245dbf249a2eba3ff136532de65db50f4 Mon Sep 17 00:00:00 2001 From: Vishal Raheja Date: Tue, 30 Apr 2013 22:36:13 +0200 Subject: [PATCH] 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. --- user/view.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/user/view.php b/user/view.php index 0a0b6b7215f..ffa92578d2f 100644 --- a/user/view.php +++ b/user/view.php @@ -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