mirror of
https://github.com/moodle/moodle.git
synced 2025-04-14 04:52:36 +02:00
MOre cleanups for notes interface
This commit is contained in:
parent
ebbf8c16c6
commit
9f26cce6da
@ -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';
|
||||
?>
|
||||
?>
|
||||
|
@ -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');
|
||||
|
@ -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');
|
||||
|
@ -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('<a name="sitenotes"></a>' . $strsitenotes, $addid, $view, 0, $userid, NOTES_STATE_SITE, 0);
|
||||
note_print_notes('<a name="coursenotes"></a>' . $strcoursenotes, $addid, $view, $courseid, $userid, NOTES_STATE_PUBLIC, 0);
|
||||
note_print_notes('<a name="coursenotes"></a>' . $strcoursenotes. ' ('.$course->fullname.')', $addid, $view, $courseid, $userid, NOTES_STATE_PUBLIC, 0);
|
||||
note_print_notes('<a name="personalnotes"></a>' . $strpersonalnotes, $addid, $view, $courseid, $userid, NOTES_STATE_DRAFT, $USER->id);
|
||||
|
||||
} else { // Normal course
|
||||
|
@ -235,7 +235,11 @@ function note_print_notes($header, $addcourseid = 0, $viewnotes = true, $coursei
|
||||
echo '<div class="notesgroup">';
|
||||
}
|
||||
if ($addcourseid) {
|
||||
echo '<p><a href="'. $CFG->wwwroot .'/notes/add.php?course=' . $addcourseid . '&user=' . $userid . '&state=' . $state . '">' . get_string('addnewnote', 'notes') . '</a></p>';
|
||||
if ($userid) {
|
||||
echo '<p><a href="'. $CFG->wwwroot .'/notes/add.php?course=' . $addcourseid . '&user=' . $userid . '&state=' . $state . '">' . get_string('addnewnote', 'notes') . '</a></p>';
|
||||
} else {
|
||||
echo '<p><a href="'. $CFG->wwwroot .'/user/index.php?id=' . $addcourseid. '">' . get_string('addnewnoteselect', 'notes') . '</a></p>';
|
||||
}
|
||||
}
|
||||
if ($viewnotes) {
|
||||
$notes =& note_list($courseid, $userid, $state, $author);
|
||||
|
Loading…
x
Reference in New Issue
Block a user