* Displays all the grades on screen as a feedback mechanism
*/
function display_grades($feedback=false) {
- echo get_string("firstname").",".
- get_string("lastname").",".
- get_string("idnumber").",".
- get_string("institution").",".
- get_string("department").",".
- get_string("email");
+ echo '<table>';
+ echo '<tr>';
+ echo '<th>'.get_string("firstname")."</th>".
+ '<th>'.get_string("lastname")."</th>".
+ '<th>'.get_string("idnumber")."</th>".
+ '<th>'.get_string("institution")."</th>".
+ '<th>'.get_string("department")."</th>".
+ '<th>'.get_string("email")."</th>";
foreach ($this->columns as $column) {
$column = strip_tags($column);
- echo ",$column";
+ echo "<th>$column</th>";
/// add a column_feedback column
if ($feedback) {
- echo ",{$column}_feedback";
+ echo "<th>{$column}_feedback</th>";
}
}
- echo ",".get_string("total")."<br/>";
-
+ echo '<th>'.get_string("total")."</th>";
+ echo '</tr>';
/// Print all the lines of data.
- foreach ($this->grades as $studentid => $studentgrades) {
+
+
+ foreach ($this->grades as $studentid => $studentgrades) {
+
+ echo '<tr>';
$student = $this->students[$studentid];
if (empty($this->totals[$student->id])) {
$this->totals[$student->id] = '';
}
- echo "$student->firstname,$student->lastname,$student->idnumber,$student->institution,$student->department,$student->email";
+
+
+ echo "<td>$student->firstname</td><td>$student->lastname</td><td>$student->idnumber</td><td>$student->institution</td><td>$student->department</td><td>$student->email</td>";
foreach ($studentgrades as $grade) {
$grade = strip_tags($grade);
- echo ",$grade";
+ echo "<td>$grade</td>";
if ($feedback) {
- echo ",".array_shift($this->comments[$student->id]);
+ echo '<td>'.array_shift($this->comments[$student->id]).'</td>';
}
}
- echo ",".$this->totals[$student->id];
- echo "<br/>";
- }
+ echo '<td>'.$this->totals[$student->id].'</td>';
+ echo "</tr>";
+ }
+ echo '</table>';
}
}
}
// print the grades on screen for feedbacks
- print_header(get_string('grade'),get_string('grade'),get_string('grade'));
+ $course = get_record('course', 'id', $id);
+ $action = 'exporttxt';
+ print_header($course->shortname.': '.get_string('grades'), $course->fullname, grade_nav($course, $action));
+
$export = new grade_export($id, $data->itemids);
$export->display_grades($feedback);
redirect('export.php?id='.$id.'&itemids='.$itemidsurl);
exit;
}
-
+$course = get_record('course', 'id', $id);
+$action = 'exportods';
+print_header($course->shortname.': '.get_string('grades'), $course->fullname, grade_nav($course, $action));
print_gradeitem_selections($id);
+print_footer();
?>
\ No newline at end of file
$itemidsurl = implode(",",$data->itemids);
}
- // print the grades on screen for feedbacks
- print_header(get_string('grade'),get_string('grade'),get_string('grade'));
+ $course = get_record('course', 'id', $id);
+ $action = 'exporttxt';
+ print_header($course->shortname.': '.get_string('grades'), $course->fullname, grade_nav($course, $action));
+
$export = new grade_export($id, $data->itemids);
$export->display_grades($feedback);
}
echo '<br/>';
echo 'tab<input type="radio" name="separator" value="tab"/>';
- echo 'comma<input type="radio" name="separator" value="comma"/>';
+ echo 'comma<input type="radio" name="separator" value="comma" checked="checked"/>';
echo '<input type="hidden" name="id" value="'.$id.'"/>';
echo '<input type="hidden" name="sesskey" value="'.sesskey().'"/>';
echo '<br/>';
}
// print the grades on screen for feedbacks
- print_header(get_string('grade'),get_string('grade'),get_string('grade'));
+ $course = get_record('course', 'id', $id);
+ $action = 'exporttxt';
+ print_header($course->shortname.': '.get_string('grades'), $course->fullname, grade_nav($course, $action));
+
$export = new grade_export($id, $data->itemids);
$export->display_grades($feedback);
redirect('export.php?id='.$id.'&itemids='.$itemidsurl);
exit;
}
-
+$course = get_record('course', 'id', $id);
+$action = 'exportxls';
+print_header($course->shortname.': '.get_string('grades'), $course->fullname, grade_nav($course, $action));
print_gradeitem_selections($id);
+print_footer();
?>
\ No newline at end of file
}
// print the grades on screen for feedbacks
- print_header(get_string('grade'),get_string('grade'),get_string('grade'));
+ $course = get_record('course', 'id', $id);
+ $action = 'exporttxt';
+ print_header($course->shortname.': '.get_string('grades'), $course->fullname, grade_nav($course, $action));
+
$export = new grade_export($id, $data->itemids);
$export->display_grades($feedback);
redirect('export.php?id='.$id.'&itemids='.$itemidsurl);
exit;
}
-
+$course = get_record('course', 'id', $id);
+$action = 'exportxml';
+print_header($course->shortname.': '.get_string('grades'), $course->fullname, grade_nav($course, $action));
print_gradeitem_selections($id);
+print_footer();
?>
\ No newline at end of file
require_once('../grade_import_form.php');
-print_header("test","test","test");
+
+require_once($CFG->dirroot.'/grade/lib.php');
+$course = get_record('course', 'id', $id);
+$action = 'importcsv';
+print_header($course->shortname.': '.get_string('grades'), $course->fullname, grade_nav($course, $action));
$mform = new grade_import_form();
case 'excepts':
$strcurpage = get_string('gradeexceptions', 'grades');
break;
+ case 'exporttxt':
+ case 'exportxml':
+ case 'exportods':
+ case 'exportxls':
+ case 'importcsv':
+ case 'importxml':
+ $strcurpage = get_string($action);
+ break;
default:
unset($strcurpage);
break;