MDL-18083 MDL-18004 Implementing new tab navigation in gradebook.

This commit is contained in:
nicolasconnault
2009-04-22 08:20:20 +00:00
parent 90260a3a2a
commit 68f82f804c
27 changed files with 112 additions and 209 deletions
+1 -6
View File
@@ -133,12 +133,7 @@ if ($admin) {
admin_externalpage_print_header();
} else {
$navigation = grade_build_nav(__FILE__, $pagename, $COURSE->id);
/// Print header
print_header_simple($strgrades.': '.$pagename, ': '.$strgrades, $navigation, '', '', true, '', navmenu($COURSE));
$currenttab = 'lettersedit';
require('tabs.php');
print_grade_page_head($COURSE->id, 'letter', 'edit', get_string('editgradeletters', 'grades'));
}
$mform->display();
+1 -9
View File
@@ -45,15 +45,7 @@ $gpr = new grade_plugin_return(array('type'=>'edit', 'plugin'=>'letter', 'course
$strgrades = get_string('grades');
$pagename = get_string('letters', 'grades');
$navigation = grade_build_nav(__FILE__, $pagename, $courseid);
/// Print header
print_header_simple($strgrades.': '.$pagename, ': '.$strgrades, $navigation, '', '', true, '', navmenu($course));
/// Print the plugin selector at the top
print_grade_plugin_selector($courseid, 'edit', 'letter');
$currenttab = 'lettersview';
require('tabs.php');
print_grade_page_head($courseid, 'letter', 'view', get_string('gradeletters', 'grades'));
$letters = grade_get_letters($context);
+1 -19
View File
@@ -132,26 +132,8 @@ if ($data = data_submitted()) {
redirect('course.php?id='.$courseid); // we must redirect to get fresh data
}
$strgrades = get_string('grades');
$pagename = get_string('outcomescourse', 'grades');
$navlinks = array(array('name'=>$strgrades,
'link'=>$CFG->wwwroot.'/grade/index.php?id='.$courseid,
'type'=>'misc'),
array('name'=>$pagename,
'link'=>'',
'type'=>'misc')
);
$navigation = build_navigation($navlinks);
$navigation = grade_build_nav(__FILE__, $pagename, $courseid);
/// Print header
print_header_simple($strgrades.': '.$pagename, ': '.$strgrades, $navigation, '', '', true, '', navmenu($course));
/// Print the plugin selector at the top
print_grade_plugin_selector($courseid, 'edit', 'outcome');
$currenttab = 'courseoutcomes';
require('tabs.php');
print_grade_page_head($COURSE->id, 'outcome', 'course');
check_theme_arrows();
require('course_form.html');
+5 -7
View File
@@ -32,9 +32,12 @@ $courseid = optional_param('courseid', 0, PARAM_INT);
$id = optional_param('id', 0, PARAM_INT);
$systemcontext = get_context_instance(CONTEXT_SYSTEM);
$heading = null;
// a bit complex access control :-O
if ($id) {
$heading = get_string('editoutcome', 'grades');
/// editing existing outcome
if (!$outcome_rec = get_record('grade_outcomes', 'id', $id)) {
error('Incorrect outcome id');
@@ -61,6 +64,7 @@ if ($id) {
}
} else if ($courseid){
$heading = get_string('addoutcome', 'grades');
/// adding new outcome from course
if (!$course = get_record('course', 'id', $courseid)) {
print_error('nocourseid');
@@ -119,14 +123,8 @@ if ($mform->is_cancelled()) {
redirect($returnurl);
}
$strgrades = get_string('grades');
$strgraderreport = get_string('graderreport', 'grades');
$stroutcomeedit = get_string('outcome', 'grades');
if ($courseid) {
$navigation = grade_build_nav(__FILE__, $stroutcomeedit, array('courseid' => $courseid));
print_header_simple($strgrades.': '.$strgraderreport, ': '.$stroutcomeedit, $navigation, '', '', true, '', navmenu($course));
print_grade_page_head($courseid, 'outcome', 'edit', $heading);
} else {
require_once $CFG->libdir.'/adminlib.php';
admin_externalpage_setup('outcomes');
+3 -8
View File
@@ -79,16 +79,11 @@ $systemcontext = get_context_instance(CONTEXT_SYSTEM);
$caneditsystemscales = has_capability('moodle/course:managescales', $systemcontext);
if ($courseid) {
/// Print header
print_header_simple($strgrades.': '.$pagename, ': '.$strgrades, $navigation, '', '', true, '', navmenu($course));
/// Print the plugin selector at the top
print_grade_plugin_selector($courseid, 'edit', 'outcome');
print_grade_page_head($courseid, 'outcome', 'import', get_string('importoutcomes', 'grades'));
$caneditcoursescales = has_capability('moodle/course:managescales', $context);
$currenttab = 'outcomes';
require('tabs.php');
} else {
admin_externalpage_print_header();
$caneditcoursescales = $caneditsystemscales;
@@ -208,7 +203,7 @@ if ($handle = fopen($imported_file['userfile']['tmp_name'], 'r')) {
print_box(get_string('importskippedoutcome', 'grades', $csv_data[$imported_headers['outcome_shortname']]));
continue;
}
break;
// new outcome will be added, search for compatible existing scale...
$scale = get_records_select('scale', 'name ="'. $csv_data[$imported_headers['scale_name']] .'" and scale ="'. $csv_data[$imported_headers['scale_items']] .'" and (courseid = '. $courseid .' or courseid = 0)');
+7 -9
View File
@@ -125,16 +125,9 @@ $systemcontext = get_context_instance(CONTEXT_SYSTEM);
$caneditsystemscales = has_capability('moodle/course:managescales', $systemcontext);
if ($courseid) {
/// Print header
print_header_simple($strgrades.': '.$pagename, ': '.$strgrades, $navigation, '', '', true, '', navmenu($course));
/// Print the plugin selector at the top
print_grade_plugin_selector($courseid, 'edit', 'outcome');
$caneditcoursescales = has_capability('moodle/course:managescales', $context);
$currenttab = 'outcomes';
require('tabs.php');
} else {
admin_externalpage_print_header();
$caneditcoursescales = $caneditsystemscales;
@@ -142,10 +135,10 @@ if ($courseid) {
$outcomes_tables = array();
$heading = get_string('outcomes', 'grades');
if ($courseid and $outcomes = grade_outcome::fetch_all_local($courseid)) {
$return = print_heading($strcustomoutcomes, '', 2, 'main', true);
$return = print_heading($strcustomoutcomes, '', 3, 'main', true);
$data = array();
foreach($outcomes as $outcome) {
$line = array();
@@ -253,6 +246,11 @@ if ($outcomes = grade_outcome::fetch_all_global()) {
$outcomes_tables[] = $return;
}
if ($courseid) {
/// Print header
print_grade_page_head($courseid, 'outcome', 'edit', $heading);
}
foreach($outcomes_tables as $table) {
print($table);
}
+6 -8
View File
@@ -32,9 +32,12 @@ $courseid = optional_param('courseid', 0, PARAM_INT);
$id = optional_param('id', 0, PARAM_INT);
$systemcontext = get_context_instance(CONTEXT_SYSTEM);
$heading = '';
// a bit complex access control :-O
if ($id) {
$heading = get_string('editscale', 'grades');
/// editing existing scale
if (!$scale_rec = get_record('scale', 'id', $id)) {
error('Incorrect scale id');
@@ -61,6 +64,7 @@ if ($id) {
}
} else if ($courseid){
$heading = get_string('addscale', 'grades');
/// adding new scale from course
if (!$course = get_record('course', 'id', $courseid)) {
print_error('nocourseid');
@@ -112,21 +116,15 @@ if ($mform->is_cancelled()) {
}
$scale->update();
}
redirect($returnurl);
}
$strgrades = get_string('grades');
$strgraderreport = get_string('graderreport', 'grades');
$strscaleedit = get_string('scale');
if ($courseid) {
$navigation = grade_build_nav(__FILE__, $strscaleedit, $courseid);
print_header_simple($strgrades.': '.$strgraderreport, ': '.$strscaleedit, $navigation, '', '', true, '', navmenu($course));
print_grade_page_head($course->id, 'scale', 'edit', $heading);
} else {
require_once $CFG->libdir.'/adminlib.php';
admin_externalpage_setup('outcomes');
admin_externalpage_setup('scales');
admin_externalpage_print_header();
}
+23 -22
View File
@@ -47,12 +47,6 @@ if ($courseid) {
/// return tracking object
$gpr = new grade_plugin_return(array('type'=>'edit', 'plugin'=>'scale', 'courseid'=>$courseid));
$strgrades = get_string('grades');
$pagename = get_string('scales');
$navigation = grade_build_nav(__FILE__, $pagename, array('courseid' => $courseid));
$strscale = get_string('scale');
$strstandardscale = get_string('scalesstandard');
$strcustomscales = get_string('scalescustom');
@@ -88,18 +82,17 @@ switch ($action) {
break;
}
if ($courseid) {
/// Print header
print_header_simple($strgrades.': '.$pagename, ': '.$strgrades, $navigation, '', '', true, '', navmenu($course));
/// Print the plugin selector at the top
print_grade_plugin_selector($courseid, 'edit', 'scale');
} else {
if (!$courseid) {
admin_externalpage_print_header();
}
$table = null;
$table2 = null;
$heading = '';
if ($courseid and $scales = grade_scale::fetch_all_local($courseid)) {
print_heading($strcustomscales);
$heading = $strcustomscales;
$data = array();
foreach($scales as $scale) {
$line = array();
@@ -123,11 +116,11 @@ if ($courseid and $scales = grade_scale::fetch_all_local($courseid)) {
$table->align = array('left', 'center', 'center');
$table->width = '90%';
$table->data = $data;
print_table($table);
}
if ($scales = grade_scale::fetch_all_global()) {
print_heading($strstandardscale);
$heading = $strstandardscale;
$data = array();
foreach($scales as $scale) {
$line = array();
@@ -148,14 +141,22 @@ if ($scales = grade_scale::fetch_all_global()) {
$line[] = $buttons;
$data[] = $line;
}
$table->head = array($strscale, $strused, $stredit);
$table->size = array('70%', '20%', '10%');
$table->align = array('left', 'center', 'center');
$table->width = '90%';
$table->data = $data;
print_table($table);
$table2->head = array($strscale, $strused, $stredit);
$table2->size = array('70%', '20%', '10%');
$table2->align = array('left', 'center', 'center');
$table2->width = '90%';
$table2->data = $data;
}
if ($courseid) {
print_grade_page_head($courseid, 'scale', null, get_string('coursescales', 'grades'));
}
print_heading($strcustomscales, '', 3, 'main');
print_table($table);
print_heading($strstandardscale, '', 3, 'main');
print_table($table2);
echo '<div class="buttons">';
print_single_button('edit.php', array('courseid'=>$courseid), $srtcreatenewscale);
echo '</div>';
+5 -4
View File
@@ -74,10 +74,11 @@ if ($mform->is_cancelled()) {
redirect($returnurl);
}
/// Print header
print_header_simple($strgrades.': '.$pagename, ': '.$strgrades, $navigation, '', '', true, '', navmenu($course));
/// Print the plugin selector at the top
print_grade_plugin_selector($courseid, 'edit', 'settings');
print_grade_page_head($courseid, 'settings', 'coursesettings', get_string('coursesettings', 'grades'));
print_box_start('generalbox boxaligncenter boxwidthnormal centerpara');
echo get_string('coursesettingsexplanation', 'grades');
print_box_end();
$mform->display();
+4 -8
View File
@@ -50,6 +50,8 @@ if ($mform->is_cancelled() || empty($CFG->enableoutcomes)) {
redirect($returnurl);
}
$heading = get_string('outcomeitemsedit', 'grades');
if ($grade_item = grade_item::fetch(array('id'=>$id, 'courseid'=>$courseid))) {
// redirect if outcomeid present
if (empty($grade_item->outcomeid)) {
@@ -69,6 +71,7 @@ if ($grade_item = grade_item::fetch(array('id'=>$id, 'courseid'=>$courseid))) {
}
} else {
$heading = get_string('newoutcomeitem', 'grades');
$grade_item = new grade_item(array('courseid'=>$courseid, 'itemtype'=>'manual'), false);
$item = $grade_item->get_record_data();
$item->cmid = 0;
@@ -205,14 +208,7 @@ if ($data = $mform->get_data(false)) {
redirect($returnurl);
}
$strgrades = get_string('grades');
$strgraderreport = get_string('graderreport', 'grades');
$stroutcomesedit = get_string('outcomeitemsedit', 'grades');
$stroutcome = get_string('outcomeitem', 'grades');
$navigation = grade_build_nav(__FILE__, $stroutcome, array('courseid' => $courseid));
print_header_simple($strgrades . ': ' . $strgraderreport, ': ' . $stroutcomesedit, $navigation, '', '', true, '', navmenu($course));
print_grade_page_head($courseid, 'edittree', null, $heading);
if (!grade_outcome::fetch_all_available($COURSE->id)) {
notice_yesno(get_string('nooutcomes', 'grades'), $CFG->wwwroot.'/grade/edit/outcome/course.php?id='.$courseid, $returnurl);
+1 -5
View File
@@ -37,11 +37,7 @@ $context = get_context_instance(CONTEXT_COURSE, $id);
require_capability('moodle/grade:export', $context);
$strgrades = get_string('grades', 'grades');
$navigation = grade_build_nav(__FILE__, null, array('courseid' => $course->id));
print_header($course->shortname.': '.get_string('grades'), $course->fullname, $navigation);
print_grade_plugin_selector($id, '', '');
print_grade_page_head($course->id, 'export', 'keymanager', get_string('keymanager', 'grades'));
$stredit = get_string('edit');
$strdelete = get_string('delete');
+1 -7
View File
@@ -39,13 +39,7 @@ $context = get_context_instance(CONTEXT_COURSE, $id);
require_capability('moodle/grade:export', $context);
require_capability('gradeexport/ods:view', $context);
$strgrades = get_string('grades', 'grades');
$actionstr = get_string('modulename', 'gradeexport_ods');
$navigation = grade_build_nav(__FILE__, $actionstr, array('courseid' => $course->id));
print_header($course->shortname.': '.get_string('grades'), $course->fullname, $navigation);
print_grade_plugin_selector($id, 'export', 'ods');
print_grade_page_head($COURSE->id, 'export', 'ods', get_string('exportto', 'grades') . ' ' . get_string('modulename', 'gradeexport_ods'));
if (!empty($CFG->gradepublishing)) {
$CFG->gradepublishing = has_capability('gradeexport/ods:publish', $context);
+1 -7
View File
@@ -39,13 +39,7 @@ $context = get_context_instance(CONTEXT_COURSE, $id);
require_capability('moodle/grade:export', $context);
require_capability('gradeexport/txt:view', $context);
$strgrades = get_string('grades', 'grades');
$actionstr = get_string('modulename', 'gradeexport_txt');
$navigation = grade_build_nav(__FILE__, $actionstr, array('courseid' => $course->id));
print_header($course->shortname.': '.get_string('grades'), $course->fullname, $navigation);
print_grade_plugin_selector($id, 'export', 'txt');
print_grade_page_head($COURSE->id, 'export', 'txt', get_string('exportto', 'grades') . ' ' . get_string('modulename', 'gradeexport_txt'));
if (!empty($CFG->gradepublishing)) {
$CFG->gradepublishing = has_capability('gradeexport/txt:publish', $context);
+1 -7
View File
@@ -39,13 +39,7 @@ $context = get_context_instance(CONTEXT_COURSE, $id);
require_capability('moodle/grade:export', $context);
require_capability('gradeexport/xls:view', $context);
$strgrades = get_string('grades', 'grades');
$actionstr = get_string('modulename', 'gradeexport_xls');
$navigation = grade_build_nav(__FILE__, $actionstr, array('courseid' => $course->id));
print_header($course->shortname.': '.get_string('grades'), $course->fullname, $navigation);
print_grade_plugin_selector($id, 'export', 'xls');
print_grade_page_head($COURSE->id, 'export', 'xls', get_string('exportto', 'grades') . ' ' . get_string('modulename', 'gradeexport_xls'));
if (!empty($CFG->gradepublishing)) {
$CFG->gradepublishing = has_capability('gradeexport/xls:publish', $context);
+1 -7
View File
@@ -39,13 +39,7 @@ $context = get_context_instance(CONTEXT_COURSE, $id);
require_capability('moodle/grade:export', $context);
require_capability('gradeexport/xml:view', $context);
$strgrades = get_string('grades', 'grades');
$actionstr = get_string('modulename', 'gradeexport_xml');
$navigation = grade_build_nav(__FILE__, $actionstr, array('courseid' => $course->id));
print_header($course->shortname.': '.get_string('grades'), $course->fullname, $navigation);
print_grade_plugin_selector($id, 'export', 'xml');
print_grade_page_head($COURSE->id, 'export', 'xml', get_string('exportto', 'grades') . ' ' . get_string('modulename', 'gradeexport_xml'));
if (!empty($CFG->gradepublishing)) {
$CFG->gradepublishing = has_capability('gradeexport/xml:publish', $context);
+1 -5
View File
@@ -61,12 +61,8 @@ if (isset($CFG->CSV_DELIMITER)) {
$csv_encode = '/\&\#44/';
}
$strgrades = get_string('grades', 'grades');
$actionstr = get_string('csv', 'grades');
$navigation = grade_build_nav(__FILE__, $actionstr, array('courseid' => $course->id));
print_header($course->shortname.': '.get_string('grades'), $course->fullname, $navigation);
print_grade_plugin_selector($id, 'import', 'csv');
print_grade_page_head($course->id, 'import', 'csv');
// set up import form
$mform = new grade_import_form(null, array('includeseparator'=>!isset($CFG->CSV_DELIMITER), 'verbosescales'=>true));
+1 -5
View File
@@ -37,11 +37,7 @@ $context = get_context_instance(CONTEXT_COURSE, $id);
require_capability('moodle/grade:import', $context);
$strgrades = get_string('grades', 'grades');
$navigation = grade_build_nav(__FILE__, null, array('courseid' => $course->id));
print_header($course->shortname.': '.get_string('grades'), $course->fullname, $navigation);
print_grade_plugin_selector($id, '', '');
print_grade_page_head($course->id, 'import', 'keymanager', get_string('keymanager', 'grades'));
$stredit = get_string('edit');
$strdelete = get_string('delete');
+1 -6
View File
@@ -71,12 +71,7 @@ if ($importcode !== false) {
}
} else {
$strgrades = get_string('grades', 'grades');
$actionstr = get_string('xml', 'grades');
$navigation = grade_build_nav(__FILE__, $actionstr, array('courseid' => $course->id));
print_header($course->shortname.': '.get_string('grades'), $course->fullname, $navigation);
print_grade_plugin_selector($id, 'import', 'xml');
print_grade_page_head($course->id, 'import', 'xml', get_string('importxml', 'grades'));
grade_import_commit($id, $importcode, $feedback, true);
+4 -7
View File
@@ -41,7 +41,6 @@ require_capability('gradeimport/xml:view', $context);
// print header
$strgrades = get_string('grades', 'grades');
$actionstr = get_string('modulename', 'gradeimport_xml');
$navigation = grade_build_nav(__FILE__, $actionstr, array('courseid' => $course->id));
if (!empty($CFG->gradepublishing)) {
$CFG->gradepublishing = has_capability('gradeimport/xml:publish', $context);
@@ -60,8 +59,8 @@ if ($data = $mform->get_data()) {
}
if ($text = $mform->get_file_content('userfile')) {
print_header($course->shortname.': '.get_string('grades'), $course->fullname, $navigation);
print_grade_plugin_selector($id, 'import', 'xml');
print_grade_page_head($COURSE->id, 'import', 'xml', get_string('importxml', 'grades'));
$error = '';
$importcode = import_xml_grades($text, $course, $error);
@@ -84,8 +83,7 @@ if ($data = $mform->get_data()) {
$data->key = create_user_key('grade/import', $USER->id, $course->id, $data->iprestriction, $data->validuntil);
}
print_header($course->shortname.': '.get_string('grades'), $course->fullname, $navigation);
print_grade_plugin_selector($id, 'import', 'xml');
print_grade_page_head($COURSE->id, 'import', 'xml', get_string('importxml', 'grades'));
echo '<div class="gradeexportlink">';
$link = $CFG->wwwroot.'/grade/import/xml/fetch.php?id='.$id.'&amp;feedback='.(int)($data->feedback).'&amp;url='.urlencode($data->url).'&amp;key='.$data->key;
@@ -96,8 +94,7 @@ if ($data = $mform->get_data()) {
}
}
print_header($course->shortname.': '.get_string('grades'), $course->fullname, $navigation);
print_grade_plugin_selector($id, 'import', 'xml');
print_grade_page_head($COURSE->id, 'import', 'xml', get_string('importxml', 'grades'));
$mform->display();
+5 -19
View File
@@ -44,12 +44,8 @@ require_capability('gradereport/grader:view', $context);
require('preferences_form.php');
$mform = new grader_report_preferences_form('preferences.php', compact('course'));
if ($mform->is_cancelled()){
redirect($CFG->wwwroot . '/grade/report/grader/index.php?id='.$courseid);
}
// If data submitted, then process and store.
if ($data = $mform->get_data()) {
if (!$mform->is_cancelled() && $data = $mform->get_data()) {
foreach ($data as $preference => $value) {
if (substr($preference, 0, 6) !== 'grade_') {
continue;
@@ -66,21 +62,11 @@ if ($data = $mform->get_data()) {
exit;
}
$strgrades = get_string('grades');
$strgraderreport = get_string('modulename', 'gradereport_grader');
$strgradepreferences = get_string('gradepreferences', 'grades');
if ($mform->is_cancelled()){
redirect($CFG->wwwroot . '/grade/report/grader/index.php?id='.$courseid);
}
$navigation = grade_build_nav(__FILE__, $strgradepreferences, $courseid);
print_header_simple($strgrades.': '.$strgraderreport . ': ' . $strgradepreferences,': '.$strgradepreferences, $navigation,
'', '', true, '', navmenu($course));
/// Print the plugin selector at the top
print_grade_plugin_selector($course->id, 'report', 'grader');
// Add tabs
$currenttab = 'preferences';
include('tabs.php');
print_grade_page_head($courseid, 'preferences', 'grader', get_string('preferences', 'gradereport_grader'));
// If USER has admin capability, print a link to the site config page for this report
if (has_capability('moodle/site:config', $systemcontext)) {
+7 -4
View File
@@ -126,7 +126,6 @@ class grade_report {
*/
var $groupwheresql;
/**
* Constructor. Sets local copies of user preferences and initialises grade_tree.
* @param int $courseid
@@ -156,6 +155,9 @@ class grade_report {
// roles to be displayed in the gradebook
$this->gradebookroles = $CFG->gradebookroles;
// Set up link to preferences page
$this->preferences_page = $CFG->wwwroot.'/grade/report/grader/preferences.php?id='.$courseid;
// init gtree in child class
}
@@ -182,7 +184,7 @@ class grade_report {
} elseif (isset($CFG->$fullprefname)) {
$retval = get_user_preferences($fullprefname, $CFG->$fullprefname);
} elseif (isset($CFG->$shortprefname)) {
$retval = get_user_preferences($fullprefname, $CFG->$shortprefname);
$retval = get_user_preferences($fullprefname, $CFG->$shortprefname);
} else {
$retval = null;
}
@@ -308,10 +310,11 @@ class grade_report {
* @param string HTML
*/
function get_sort_arrow($direction='move', $sort_link=null) {
$matrix = array('up' => 'asc', 'down' => 'desc', 'move' => 'desc');
$matrix = array('up' => 'desc', 'down' => 'asc', 'move' => 'desc');
$strsort = $this->get_lang_string('sort' . $matrix[$direction]);
$arrow = print_arrow($direction, $strsort, true);
$html = '<a href="'.$sort_link .'">' . $arrow . '</a>';
$html = '<a href="'.$sort_link .'" alt="'.$strsort.'" title="'.$strsort.'">' . $arrow . '</a>';
return $html;
}
}
+3 -11
View File
@@ -38,16 +38,6 @@ $context = get_context_instance(CONTEXT_COURSE, $course->id);
require_capability('gradereport/outcomes:view', $context);
// Build navigation
$strgrades = get_string('grades');
$stroutcomes = get_string('outcomes', 'grades');
$navigation = grade_build_nav(__FILE__, $stroutcomes, $course->id);
/// Print header
print_header_simple($strgrades.':'.$stroutcomes, ':'.$strgrades, $navigation, '', '', true);
print_grade_plugin_selector($courseid, 'report', 'outcomes');
//first make sure we have proper final grades
grade_regrade_final_grades($courseid);
@@ -165,7 +155,9 @@ foreach ($report_info as $outcomeid => $outcomedata) {
$html .= '</table>';
print_heading($stroutcomes);
print_grade_page_head($courseid, 'report', 'outcomes');
echo $html;
print_footer($course);
+10 -15
View File
@@ -67,18 +67,6 @@ if (!isset($USER->grade_last_report)) {
}
$USER->grade_last_report[$course->id] = 'overview';
/// Build navigation
$strgrades = get_string('grades');
$reportname = get_string('modulename', 'gradereport_overview');
$navigation = grade_build_nav(__FILE__, $reportname, $course->id);
/// Print header
print_header_simple($strgrades.': '.$reportname, ': '.$strgrades, $navigation,
'', '', true, '', navmenu($course));
/// Print the plugin selector at the top
print_grade_plugin_selector($course->id, 'report', 'overview');
if ($access) {
@@ -87,9 +75,7 @@ if ($access) {
// Create a report instance
$report = new grade_report_overview($userid, $gpr, $context);
// print the page
print_heading(get_string('modulename', 'gradereport_overview'). ' - '.fullname($report->user));
print_grade_page_head($courseid, 'report', 'overview', get_string('modulename', 'gradereport_overview'). ' - '.fullname($report->user));
if ($report->fill_table()) {
echo $report->print_table(true);
@@ -97,6 +83,15 @@ if ($access) {
} else {
// no access to grades!
/// Print header
/// Build navigation
$strgrades = get_string('grades');
$reportname = get_string('modulename', 'gradereport_overview');
$navigation = grade_build_nav(__FILE__, $reportname, $course->id);
print_header_simple($strgrades.': '.$reportname, ': '.$strgrades, $navigation,
'', '', true, '', navmenu($course));
echo "Can not view grades."; //TODO: localize
}
print_footer($course);
+2 -1
View File
@@ -1,7 +1,8 @@
<?PHP // $Id$
<?PHP // $Id$
$string['modulename'] = 'Grader report';
$string['grader:manage'] = 'Manage the grader report';
$string['grader:view'] = 'View the grader report';
$string['preferences'] = 'Grader report preferences';
?>
+4
View File
@@ -85,4 +85,8 @@ define('GRADE_REPORT_PREFERENCE_UNUSED', -1);
define('GRADE_REPORT_MEAN_ALL', 0);
define('GRADE_REPORT_MEAN_GRADED', 1);
define('GRADE_NAVMETHOD_DROPDOWN', 0);
define('GRADE_NAVMETHOD_TABS', 1);
define('GRADE_NAVMETHOD_COMBO', 2);
?>
+5 -2
View File
@@ -296,11 +296,11 @@ body#admin-index .copyright {
font-style: normal;
}
.plugincompattable {
.plugincompattable {
text-align: left;
}
.plugincheckwrapper {
.plugincheckwrapper {
text-align: center;
}
@@ -586,6 +586,9 @@ body#grade-index .grades .header {
font-style: normal;
}
#choosepluginreport_jump option.optionheader {
font-weight: bold;
}
/***
*** Login
***/
+8 -1
View File
@@ -2209,7 +2209,6 @@ body#doc-contents ul {
display: inline;
padding: 5px;
}
/* outcomes edit */
.grade-edit-outcome .buttons {
@@ -2302,6 +2301,14 @@ div.allcoursegrades {
margin-top: 7px;
}
#choosepluginreport_jump option {
margin-left: 20px;
}
#choosepluginreport_jump option.optionheader {
margin-left: 0px;
}
/***
*** Login
***/