Skip to content

Commit

Permalink
MDL-27304 wiki: link to user's course profile
Browse files Browse the repository at this point in the history
  • Loading branch information
mackensen committed Mar 8, 2012
1 parent e356fb6 commit b1f60fe
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions mod/wiki/pagelib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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'));
}

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit b1f60fe

Please sign in to comment.