Skip to content
Browse files

MDL-27304 wiki: link to user's course profile

  • Loading branch information...
1 parent e356fb6 commit b1f60fe2f78551d129270e963d1e625156451fb7 @mackensen mackensen committed Mar 8, 2012
Showing with 6 additions and 5 deletions.
  1. +6 −5 mod/wiki/pagelib.php
View
11 mod/wiki/pagelib.php
@@ -1247,7 +1247,7 @@ private function print_history_content() {
$time = userdate($row->timecreated, get_string('strftimetime', 'langconfig'));
$versionid = wiki_get_version($row->id);
$versionlink = new moodle_url('/mod/wiki/viewversion.php', array('pageid' => $pageid, 'versionid' => $versionid->id));
- $userlink = new moodle_url('/user/view.php', array('id' => $username->id));
+ $userlink = new moodle_url('/user/view.php', array('id' => $username->id, 'course' => $PAGE->cm->course));
$contents[] = array('', html_writer::link($versionlink->out(false), $row->version), $picture . html_writer::link($userlink->out(false), fullname($username)), $time, $OUTPUT->container($date, 'wiki_histdate'));
$table = new html_table();
@@ -1275,7 +1275,7 @@ private function print_history_content() {
} else {
$viewlink = $version->version;
}
- $userlink = new moodle_url('/user/view.php', array('id' => $version->userid));
+ $userlink = new moodle_url('/user/view.php', array('id' => $version->userid, 'course' => $PAGE->cm->course));
$contents[] = array($this->choose_from_radio(array($version->version => null), 'compare', 'M.mod_wiki.history()', $checked - 1, true) . $this->choose_from_radio(array($version->version => null), 'comparewith', 'M.mod_wiki.history()', $checked, true), $viewlink, $picture . html_writer::link($userlink->out(false), fullname($user)), $time, $OUTPUT->container($date, 'wiki_histdate'));
}
@@ -2532,9 +2532,10 @@ protected function add_page_delete_options($pages, $swid, &$table) {
* Prints lists of versions which can be deleted
*
* @global object $OUTPUT
+ * @global object $PAGE
*/
private function print_delete_version() {
- global $OUTPUT;
+ global $OUTPUT, $PAGE;
$pageid = $this->page->id;
// versioncount is the latest version
@@ -2564,7 +2565,7 @@ private function print_delete_version() {
$time = userdate($row->timecreated, get_string('strftimetime', 'langconfig'));
$versionid = wiki_get_version($row->id);
$versionlink = new moodle_url('/mod/wiki/viewversion.php', array('pageid' => $pageid, 'versionid' => $versionid->id));
- $userlink = new moodle_url('/user/view.php', array('id' => $username->id));
+ $userlink = new moodle_url('/user/view.php', array('id' => $username->id, 'course' => $PAGE->cm->course));
$picturelink = $picture . html_writer::link($userlink->out(false), fullname($username));
$historydate = $OUTPUT->container($date, 'wiki_histdate');
$contents[] = array('', html_writer::link($versionlink->out(false), $row->version), $picturelink, $time, $historydate);
@@ -2601,7 +2602,7 @@ private function print_delete_version() {
$viewlink = $version->version;
}
- $userlink = new moodle_url('/user/view.php', array('id' => $version->userid));
+ $userlink = new moodle_url('/user/view.php', array('id' => $version->userid, 'course' => $PAGE->cm->course));
$picturelink = $picture . html_writer::link($userlink->out(false), fullname($user));
$historydate = $OUTPUT->container($date, 'wiki_histdate');
$radiofromelement = $this->choose_from_radio(array($version->version => null), 'fromversion', 'M.mod_wiki.deleteversion()', $versioncount, true);

0 comments on commit b1f60fe

Please sign in to comment.
Something went wrong with that request. Please try again.