Skip to content

Commit

Permalink
MDL-10286 Finished the view feedback page. Also added links for each …
Browse files Browse the repository at this point in the history
…user name on the grader report page (linking to their profiles).
  • Loading branch information
nicolasconnault committed Jul 5, 2007
1 parent 657e52d commit c3e193e
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
15 changes: 13 additions & 2 deletions grade/report/grader/edit_feedback.php
Expand Up @@ -45,7 +45,7 @@
redirect($returnurl);
}

// Get name of student and gradeitem name
// Get extra data related to this feedback
$query = "SELECT a.id AS userid, a.firstname, a.lastname,
b.id AS itemid, b.itemname, b.grademin, b.grademax, b.iteminstance, b.itemmodule, b.scaleid,
c.finalgrade
Expand Down Expand Up @@ -85,17 +85,24 @@

$navigation = build_navigation($nav);

/*********** BEGIN OUTPUT *************/

print_header_simple($strgrades . ': ' . $strgraderreport . ': ' . $heading,
': ' . $heading , $navigation, '', '', true, '', navmenu($course));

print_heading($heading);

print_simple_box_start("center");

// Student name and link
echo "<p><strong>$strstudent:</strong> <a href=\"" . $CFG->wwwroot . '/user/view.php?id='
. $extra_info->userid . '">' . fullname($extra_info) . "</a></p>";

// Grade item name and link
echo "<p><strong>$strgradeitem:</strong> <a href=\"" . $CFG->wwwroot . '/mod/' . $extra_info->itemmodule
. '/view.php?id=' . $extra_info->course_module->id . "&amp;courseid=$courseid\">$extra_info->itemname</a></p>";

// Final grade and link to scale if applicable
if (!empty($extra_info->finalgrade)) {
$openlink = '';
$closelink = '';
Expand All @@ -107,10 +114,14 @@
}
echo "<p><strong>$strgrade:</strong> " . $extra_info->finalgrade . "$openlink $stronascaleof $closelink</p>";
}
echo $feedback;

// Form if in edit or add modes
if ($action != 'view') {
$mform->display();
} else { // Feedback string and Back button if in View mode
echo $feedback;
echo "<button onclick=\"window.location='" . $CFG->wwwroot . "/grade/report.php?report=grader&amp;id=$courseid';\">"
. get_string('back') . '</button>';
}

print_simple_box_end();
Expand Down
5 changes: 4 additions & 1 deletion grade/report/grader/index.php
Expand Up @@ -368,7 +368,10 @@
$studentshtml = '';

foreach ($users as $userid => $user) {
$studentshtml .= '<tr><th class="user">' . $user->firstname . ' ' . $user->lastname . '</th>';
// Student name and link

$studentshtml .= '<tr><th class="user"><a href="' . $CFG->wwwroot . '/user/view.php?id='
. $user->id . '">' . fullname($user) . '</a></th>';
foreach ($items as $item) {

$studentshtml .= '<td>';
Expand Down
1 change: 1 addition & 0 deletions lang/en_utf8/moodle.php
Expand Up @@ -131,6 +131,7 @@
$string['availability'] = 'Availability';
$string['availablecourses'] = 'Available Courses';
$string['backtoparticipants'] = 'Back to participants list';
$string['back'] = 'Back';
$string['backup'] = 'Backup';
$string['backupactivehelp'] = 'Choose whether or not to do automated backups.';
$string['backupcancelled'] = 'Backup Cancelled';
Expand Down

0 comments on commit c3e193e

Please sign in to comment.