diff --git a/lang/en_utf8/notes.php b/lang/en_utf8/notes.php index 3a2d301d680..2901e13d106 100755 --- a/lang/en_utf8/notes.php +++ b/lang/en_utf8/notes.php @@ -6,9 +6,10 @@ $string['sitenotes'] = 'Site notes'; $string['coursenotes'] = 'Course notes'; $string['personalnotes'] = 'Personal notes'; $string['created'] = 'created'; -$string['nonotes'] = 'There are no notes.'; +$string['nonotes'] = 'There are no notes of this type yet'; $string['notesnotvisible'] = 'You are not allowed to view the notes.'; $string['addnewnote'] = 'Add a new note'; +$string['addnewnoteselect'] = 'Select users to write notes about'; $string['groupaddnewnote'] = 'Add a new note for all'; $string['deleteconfirm'] = 'Delete this note?'; $string['content'] = 'Content'; @@ -21,4 +22,4 @@ $string['personal'] = 'personal'; $string['course'] = 'course'; $string['site'] = 'site'; $string['editnote'] = 'Edit note'; -?> \ No newline at end of file +?> diff --git a/notes/add.php b/notes/add.php index ab957301423..28d5647a640 100644 --- a/notes/add.php +++ b/notes/add.php @@ -69,6 +69,7 @@ /// output HTML $nav = array(); + $nav[] = array('name' => get_string('participants'), 'link' => $CFG->wwwroot . '/user/index.php?id=' . $course->id, 'type' => 'misc'); $nav[] = array('name' => fullname($user), 'link' => $CFG->wwwroot . '/user/view.php?id=' . $user->id. '&course=' . $course->id, 'type' => 'misc'); $nav[] = array('name' => get_string('notes', 'notes'), 'link' => $CFG->wwwroot . '/notes/index.php?course=' . $course->id . '&user=' . $user->id, 'type' => 'misc'); $nav[] = array('name' => $strnotes, 'link' => '', 'type' => 'activity'); diff --git a/notes/edit.php b/notes/edit.php index 1687beac1e7..ba2238a0317 100644 --- a/notes/edit.php +++ b/notes/edit.php @@ -72,6 +72,7 @@ /// output HTML $nav = array(); + $nav[] = array('name' => get_string('participants'), 'link' => $CFG->wwwroot . '/user/index.php?id=' . $course->id, 'type' => 'misc'); $nav[] = array('name' => fullname($user), 'link' => $CFG->wwwroot . '/user/view.php?id=' . $user->id. '&course=' . $course->id, 'type' => 'misc'); $nav[] = array('name' => get_string('notes', 'notes'), 'link' => $CFG->wwwroot . '/notes/index.php?course=' . $course->id . '&user=' . $user->id, 'type' => 'misc'); $nav[] = array('name' => $strnotes, 'link' => '', 'type' => 'activity'); diff --git a/notes/index.php b/notes/index.php index b78749a2125..d20f4a72e84 100644 --- a/notes/index.php +++ b/notes/index.php @@ -51,7 +51,10 @@ $strnotes = get_string('notes', 'notes'); $nav = array(); - $nav[] = array('name' => fullname($user), 'link' => $CFG->wwwroot . '/user/view.php?id=' . $user->id. '&course=' . $course->id, 'type' => 'misc'); + $nav[] = array('name' => get_string('participants'), 'link' => $CFG->wwwroot . '/user/index.php?id=' . $course->id, 'type' => 'misc'); + if ($userid) { + $nav[] = array('name' => fullname($user), 'link' => $CFG->wwwroot . '/user/view.php?id=' . $user->id. '&course=' . $course->id, 'type' => 'misc'); + } $nav[] = array('name' => $strnotes, 'link' => '', 'type' => 'misc'); print_header($course->shortname . ': ' . $strnotes, $course->fullname, build_navigation($nav)); @@ -72,7 +75,7 @@ $addid = has_capability('moodle/notes:manage', $context) ? $courseid : 0; $view = has_capability('moodle/notes:view', $context); note_print_notes('' . $strsitenotes, $addid, $view, 0, $userid, NOTES_STATE_SITE, 0); - note_print_notes('' . $strcoursenotes, $addid, $view, $courseid, $userid, NOTES_STATE_PUBLIC, 0); + note_print_notes('' . $strcoursenotes. ' ('.$course->fullname.')', $addid, $view, $courseid, $userid, NOTES_STATE_PUBLIC, 0); note_print_notes('' . $strpersonalnotes, $addid, $view, $courseid, $userid, NOTES_STATE_DRAFT, $USER->id); } else { // Normal course diff --git a/notes/lib.php b/notes/lib.php index a5fc6bc6ee8..4a93842746d 100644 --- a/notes/lib.php +++ b/notes/lib.php @@ -235,7 +235,11 @@ function note_print_notes($header, $addcourseid = 0, $viewnotes = true, $coursei echo '
'; } if ($addcourseid) { - echo '

' . get_string('addnewnote', 'notes') . '

'; + if ($userid) { + echo '

' . get_string('addnewnote', 'notes') . '

'; + } else { + echo '

' . get_string('addnewnoteselect', 'notes') . '

'; + } } if ($viewnotes) { $notes =& note_list($courseid, $userid, $state, $author);