mirror of
https://github.com/moodle/moodle.git
synced 2025-08-03 16:13:28 +02:00
MOre cleanups for notes interface
This commit is contained in:
parent
ebbf8c16c6
commit
9f26cce6da
5 changed files with 15 additions and 5 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue