Skip to content

Commit

Permalink
Display author of private/personal comments correctly on overview tab
Browse files Browse the repository at this point in the history
  • Loading branch information
Friederike-cil committed Apr 19, 2021
1 parent 2ac814d commit 435fa05
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions locallib.php
Original file line number Diff line number Diff line change
Expand Up @@ -1548,7 +1548,7 @@ function pdfannotator_print_reports($reports, $thiscourse, $url, $currentpage, $
function pdfannotator_questionstable_add_row($thiscourse, $table, $question, $urlparams, $showdropdown) {

global $CFG, $PAGE;
if ($question->visibility != 'public') {
if ($question->visibility == 'anonymous') {
$author = get_string('anonymous', 'pdfannotator');
} else {
$author = "<a href=" . $CFG->wwwroot . "/user/view.php?id=$question->userid&course=$thiscourse>" . pdfannotator_get_username($question->userid) . "</a>";
Expand Down Expand Up @@ -1609,7 +1609,7 @@ function pdfannotator_answerstable_add_row($thiscourse, $table, $answer, $cmid,
$answerid = 'answer_' . $answer->answerid;
$answerlink = "<a id=$answerid data-question=$answer->questionid href=$answer->link class='more'>$answer->answer</a>";

if ($answer->visibility != 'public') {
if ($answer->visibility == 'anonymous') {
$answeredby = get_string('anonymous', 'pdfannotator');
} else {
$answeredby = "<a href=" . $CFG->wwwroot . "/user/view.php?id=$answer->userid&course=$thiscourse>" . pdfannotator_get_username($answer->userid) . "</a>";
Expand Down

0 comments on commit 435fa05

Please sign in to comment.