Permalink
Browse files

fixing bugs at comments page

  • Loading branch information...
1 parent ba138d4 commit 03d1fce9c1a826e73091ddbb920e7b9a3678baf4 Jordi Piguillem committed Jul 15, 2010
Showing with 2 additions and 3 deletions.
  1. +2 −3 mod/wiki/pagelib.php
View
5 mod/wiki/pagelib.php
@@ -627,8 +627,7 @@ function print_content() {
}
foreach ($comments as $num) {
-
- $user = wiki_get_user_info($num->userid);
+ $user = get_complete_user_data('username', $num->username);
$fullname = fullname($user, has_capability('moodle/site:viewfullnames', get_context_instance(CONTEXT_COURSE, $course->id)));
$by = new stdclass();
@@ -663,7 +662,7 @@ function print_content() {
$row2->cells[] = $cell4;
- if ((has_capability('mod/wiki:managecomment', $context)) and ($USER->id == $num->userid)) {
+ if ((has_capability('mod/wiki:managecomment', $context)) and ($USER->id == $user->id)) {
$urledit = new moodle_url('/mod/wiki/editcomments.php', array('commentid' => $num->id, 'pageid' => $page->id, 'action' => 'edit'));
$urldelet = new moodle_url('/mod/wiki/instancecomments.php', array('commentid' => $num->id, 'pageid' => $page->id, 'action' => 'delete'));

0 comments on commit 03d1fce

Please sign in to comment.