mirror of
https://github.com/moodle/moodle.git
synced 2025-07-13 18:36:34 +02:00
MDL-10437 moved editing forms to grade/edit/ directory - these should be shared by all reports, there were too many files in grader directory anyway
This commit is contained in:
6
grade/edit/edit_calculation.php
Normal file
6
grade/edit/edit_calculation.php
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?php //$Id$
|
||||||
|
|
||||||
|
echo "not implemented yet";
|
||||||
|
|
||||||
|
|
||||||
|
?>
|
0
grade/edit/edit_calculation_form.php
Normal file
0
grade/edit/edit_calculation_form.php
Normal file
@ -1,6 +1,6 @@
|
|||||||
<?php //$Id$
|
<?php //$Id$
|
||||||
|
|
||||||
require_once '../../../config.php';
|
require_once '../../config.php';
|
||||||
require_once $CFG->libdir.'/gradelib.php';
|
require_once $CFG->libdir.'/gradelib.php';
|
||||||
require_once 'edit_category_form.php';
|
require_once 'edit_category_form.php';
|
||||||
|
|
||||||
@ -17,7 +17,7 @@ $context = get_context_instance(CONTEXT_COURSE, $course->id);
|
|||||||
//require_capability() here!!
|
//require_capability() here!!
|
||||||
|
|
||||||
// default return url
|
// default return url
|
||||||
$returnurl = 'category.php?id='.$course->id;
|
$returnurl = 'edit_tree.php?id='.$course->id;
|
||||||
|
|
||||||
|
|
||||||
$mform = new edit_category_form();
|
$mform = new edit_category_form();
|
||||||
@ -50,7 +50,6 @@ $strgraderreport = get_string('graderreport', 'grades');
|
|||||||
$strcategoriesedit = get_string('categoriesedit', 'grades');
|
$strcategoriesedit = get_string('categoriesedit', 'grades');
|
||||||
|
|
||||||
$nav = array(array('name'=>$strgrades,'link'=>$CFG->wwwroot.'/grade/index.php?id='.$courseid, 'type'=>'misc'),
|
$nav = array(array('name'=>$strgrades,'link'=>$CFG->wwwroot.'/grade/index.php?id='.$courseid, 'type'=>'misc'),
|
||||||
array('name'=>$strgraderreport, 'link'=>$CFG->wwwroot.'/grade/report.php?id='.$courseid.'&report=grader', 'type'=>'misc'),
|
|
||||||
array('name'=>$strcategoriesedit, 'link'=>'', 'type'=>'misc'));
|
array('name'=>$strcategoriesedit, 'link'=>'', 'type'=>'misc'));
|
||||||
|
|
||||||
$navigation = build_navigation($nav);
|
$navigation = build_navigation($nav);
|
@ -1,6 +1,6 @@
|
|||||||
<?php //$Id$
|
<?php //$Id$
|
||||||
|
|
||||||
require_once '../../../config.php';
|
require_once '../../config.php';
|
||||||
require_once $CFG->libdir.'/gradelib.php';
|
require_once $CFG->libdir.'/gradelib.php';
|
||||||
require_once 'edit_grade_form.php';
|
require_once 'edit_grade_form.php';
|
||||||
|
|
||||||
@ -18,6 +18,7 @@ $context = get_context_instance(CONTEXT_COURSE, $course->id);
|
|||||||
require_capability('gradereport/grader:manage', $context);
|
require_capability('gradereport/grader:manage', $context);
|
||||||
|
|
||||||
// default return url
|
// default return url
|
||||||
|
//TODO: implement proper return support
|
||||||
$returnurl = $CFG->wwwroot.'/grade/report.php?report=grader&id='.$course->id;
|
$returnurl = $CFG->wwwroot.'/grade/report.php?report=grader&id='.$course->id;
|
||||||
|
|
||||||
$grade_grades = get_record('grade_grades', 'id', $id);
|
$grade_grades = get_record('grade_grades', 'id', $id);
|
||||||
@ -26,9 +27,9 @@ $gradeitem = get_record('grade_items', 'id', $grade_grades->itemid);
|
|||||||
$mform = new edit_grade_form(qualified_me(), array('gradeitem'=>$gradeitem));
|
$mform = new edit_grade_form(qualified_me(), array('gradeitem'=>$gradeitem));
|
||||||
if ($grade_grades = get_record('grade_grades', 'id', $id)) {
|
if ($grade_grades = get_record('grade_grades', 'id', $id)) {
|
||||||
if ($grade_text = get_record('grade_grades_text', 'gradeid', $id)) {
|
if ($grade_text = get_record('grade_grades_text', 'gradeid', $id)) {
|
||||||
$mform->set_data($grade_text);
|
$mform->set_data($grade_text);
|
||||||
}
|
}
|
||||||
|
|
||||||
$grade_grades->locked = $grade_grades->locked > 0 ? 1:0;
|
$grade_grades->locked = $grade_grades->locked > 0 ? 1:0;
|
||||||
$grade_grades->courseid = $courseid;
|
$grade_grades->courseid = $courseid;
|
||||||
$mform->set_data($grade_grades);
|
$mform->set_data($grade_grades);
|
||||||
@ -41,16 +42,16 @@ if ($mform->is_cancelled()) {
|
|||||||
redirect($returnurl);
|
redirect($returnurl);
|
||||||
// form processing
|
// form processing
|
||||||
} else if ($data = $mform->get_data()) {
|
} else if ($data = $mform->get_data()) {
|
||||||
|
|
||||||
$grade_grades = new grade_grades(array('id'=>$id));
|
$grade_grades = new grade_grades(array('id'=>$id));
|
||||||
$grade_item = new grade_item(array('id'=>$grade_grades->itemid));
|
$grade_item = new grade_item(array('id'=>$grade_grades->itemid));
|
||||||
$grade_item->update_final_grade($grade_grades->userid, $data->finalgrade, NULL, NULL, $data->feedback);
|
$grade_item->update_final_grade($grade_grades->userid, $data->finalgrade, NULL, NULL, $data->feedback);
|
||||||
|
|
||||||
// set locked
|
// set locked
|
||||||
$grade_grades->set_locked($data->locked);
|
$grade_grades->set_locked($data->locked);
|
||||||
// set hidden
|
// set hidden
|
||||||
$grade_grades->set_hidden($data->hidden);
|
$grade_grades->set_hidden($data->hidden);
|
||||||
|
|
||||||
// set locktime
|
// set locktime
|
||||||
$grade_grades->set_locktime($data->locktime);
|
$grade_grades->set_locktime($data->locktime);
|
||||||
|
|
||||||
@ -95,7 +96,6 @@ if (!empty($action) && $action == 'view' && !empty($grade_text->feedback)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$nav = array(array('name'=>$strgrades,'link'=>$CFG->wwwroot.'/grade/index.php?id='.$courseid, 'type'=>'misc'),
|
$nav = array(array('name'=>$strgrades,'link'=>$CFG->wwwroot.'/grade/index.php?id='.$courseid, 'type'=>'misc'),
|
||||||
array('name'=>$strgraderreport, 'link'=>$CFG->wwwroot.'/grade/report.php?id='.$courseid.'&report=grader', 'type'=>'misc'),
|
|
||||||
array('name'=>$heading, 'link'=>'', 'type'=>'misc'));
|
array('name'=>$heading, 'link'=>'', 'type'=>'misc'));
|
||||||
|
|
||||||
$navigation = build_navigation($nav);
|
$navigation = build_navigation($nav);
|
@ -7,9 +7,9 @@ class edit_grade_form extends moodleform {
|
|||||||
|
|
||||||
global $CFG, $USER;
|
global $CFG, $USER;
|
||||||
$mform =& $this->_form;
|
$mform =& $this->_form;
|
||||||
|
|
||||||
$gradeitem = $this->_customdata['gradeitem'];
|
$gradeitem = $this->_customdata['gradeitem'];
|
||||||
|
|
||||||
/// actual grade - numeric or scale
|
/// actual grade - numeric or scale
|
||||||
if ($gradeitem->gradetype == 1) {
|
if ($gradeitem->gradetype == 1) {
|
||||||
// numeric grade
|
// numeric grade
|
||||||
@ -17,7 +17,7 @@ class edit_grade_form extends moodleform {
|
|||||||
} else if ($gradeitem->gradetype == 2) {
|
} else if ($gradeitem->gradetype == 2) {
|
||||||
// scale grade
|
// scale grade
|
||||||
$scaleopt[-1] = get_string('nograde');
|
$scaleopt[-1] = get_string('nograde');
|
||||||
|
|
||||||
$i = 1;
|
$i = 1;
|
||||||
if ($scale = get_record('scale', 'id', $gradeitem->scaleid)) {
|
if ($scale = get_record('scale', 'id', $gradeitem->scaleid)) {
|
||||||
foreach (split(",", $scale->scale) as $option) {
|
foreach (split(",", $scale->scale) as $option) {
|
||||||
@ -25,13 +25,13 @@ class edit_grade_form extends moodleform {
|
|||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$mform->addElement('select', 'finalgrade', get_string('finalgrade', 'grades'), $scaleopt);
|
$mform->addElement('select', 'finalgrade', get_string('finalgrade', 'grades'), $scaleopt);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// hidden
|
/// hidden
|
||||||
$mform->addElement('advcheckbox', 'hidden', get_string('hidden', 'grades'));
|
$mform->addElement('advcheckbox', 'hidden', get_string('hidden', 'grades'));
|
||||||
|
|
||||||
/// locked
|
/// locked
|
||||||
$mform->addElement('advcheckbox', 'locked', get_string('locked', 'grades'));
|
$mform->addElement('advcheckbox', 'locked', get_string('locked', 'grades'));
|
||||||
|
|
||||||
@ -39,7 +39,7 @@ class edit_grade_form extends moodleform {
|
|||||||
$mform->addElement('date_time_selector', 'locktime', get_string('locktime', 'grades'), array('optional'=>true));
|
$mform->addElement('date_time_selector', 'locktime', get_string('locktime', 'grades'), array('optional'=>true));
|
||||||
$mform->disabledIf('locktime', 'gradetype', 'eq', GRADE_TYPE_NONE);
|
$mform->disabledIf('locktime', 'gradetype', 'eq', GRADE_TYPE_NONE);
|
||||||
/// hidden/visible
|
/// hidden/visible
|
||||||
|
|
||||||
/// feedback
|
/// feedback
|
||||||
$feedbackformat = get_user_preferences('grade_report_feedbackformat', $CFG->grade_report_feedbackformat);
|
$feedbackformat = get_user_preferences('grade_report_feedbackformat', $CFG->grade_report_feedbackformat);
|
||||||
|
|
@ -1,5 +1,5 @@
|
|||||||
<?php //$Id$
|
<?php //$Id$
|
||||||
require_once '../../../config.php';
|
require_once '../../config.php';
|
||||||
require_once $CFG->libdir.'/gradelib.php';
|
require_once $CFG->libdir.'/gradelib.php';
|
||||||
require_once 'edit_item_form.php';
|
require_once 'edit_item_form.php';
|
||||||
|
|
||||||
@ -16,7 +16,7 @@ $context = get_context_instance(CONTEXT_COURSE, $course->id);
|
|||||||
//require_capability() here!!
|
//require_capability() here!!
|
||||||
|
|
||||||
// default return url
|
// default return url
|
||||||
$returnurl = 'category.php?id='.$course->id;
|
$returnurl = 'edit_tree.php?id='.$course->id;
|
||||||
|
|
||||||
$mform = new edit_item_form();
|
$mform = new edit_item_form();
|
||||||
if ($item = get_record('grade_items', 'id', $id, 'courseid', $course->id)) {
|
if ($item = get_record('grade_items', 'id', $id, 'courseid', $course->id)) {
|
||||||
@ -54,7 +54,6 @@ $strgraderreport = get_string('graderreport', 'grades');
|
|||||||
$stritemsedit = get_string('itemsedit', 'grades');
|
$stritemsedit = get_string('itemsedit', 'grades');
|
||||||
|
|
||||||
$nav = array(array('name'=>$strgrades,'link'=>$CFG->wwwroot.'/grade/index.php?id='.$courseid, 'type'=>'misc'),
|
$nav = array(array('name'=>$strgrades,'link'=>$CFG->wwwroot.'/grade/index.php?id='.$courseid, 'type'=>'misc'),
|
||||||
array('name'=>$strgraderreport, 'link'=>$CFG->wwwroot.'/grade/report.php?id='.$courseid.'&report=grader', 'type'=>'misc'),
|
|
||||||
array('name'=>$stritemsedit, 'link'=>'', 'type'=>'misc'));
|
array('name'=>$stritemsedit, 'link'=>'', 'type'=>'misc'));
|
||||||
|
|
||||||
$navigation = build_navigation($nav);
|
$navigation = build_navigation($nav);
|
@ -24,7 +24,7 @@
|
|||||||
// //
|
// //
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
require_once '../../../config.php';
|
require_once '../../config.php';
|
||||||
require_once $CFG->libdir.'/gradelib.php';
|
require_once $CFG->libdir.'/gradelib.php';
|
||||||
|
|
||||||
$courseid = required_param('id', PARAM_INT);
|
$courseid = required_param('id', PARAM_INT);
|
||||||
@ -44,7 +44,7 @@ $context = get_context_instance(CONTEXT_COURSE, $course->id);
|
|||||||
//require_capability() here!!
|
//require_capability() here!!
|
||||||
|
|
||||||
// default return url
|
// default return url
|
||||||
$returnurl = 'category.php?id='.$course->id;
|
$returnurl = 'edit_tree.php?id='.$course->id;
|
||||||
|
|
||||||
// get the grading tree object
|
// get the grading tree object
|
||||||
// note: total must be first for moving to work correctly, if you want it last moving code must be rewritten!
|
// note: total must be first for moving to work correctly, if you want it last moving code must be rewritten!
|
||||||
@ -67,7 +67,6 @@ $strgraderreport = get_string('graderreport', 'grades');
|
|||||||
$strcategoriesedit = get_string('categoriesedit', 'grades');
|
$strcategoriesedit = get_string('categoriesedit', 'grades');
|
||||||
|
|
||||||
$nav = array(array('name'=>$strgrades,'link'=>$CFG->wwwroot.'/grade/index.php?id='.$courseid, 'type'=>'misc'),
|
$nav = array(array('name'=>$strgrades,'link'=>$CFG->wwwroot.'/grade/index.php?id='.$courseid, 'type'=>'misc'),
|
||||||
array('name'=>$strgraderreport, 'link'=>$CFG->wwwroot.'/grade/report.php?id='.$courseid.'&report=grader', 'type'=>'misc'),
|
|
||||||
array('name'=>$strcategoriesedit, 'link'=>'', 'type'=>'misc'));
|
array('name'=>$strcategoriesedit, 'link'=>'', 'type'=>'misc'));
|
||||||
|
|
||||||
$navigation = build_navigation($nav);
|
$navigation = build_navigation($nav);
|
||||||
@ -97,7 +96,7 @@ switch ($action) {
|
|||||||
$strdeletecheckfull = get_string('deletecheck', '', $object->get_name());
|
$strdeletecheckfull = get_string('deletecheck', '', $object->get_name());
|
||||||
$optionsyes = array('eid'=>$eid, 'confirm'=>1, 'sesskey'=>sesskey(), 'id'=>$course->id, 'action'=>'delete');
|
$optionsyes = array('eid'=>$eid, 'confirm'=>1, 'sesskey'=>sesskey(), 'id'=>$course->id, 'action'=>'delete');
|
||||||
$optionsno = array('id'=>$course->id);
|
$optionsno = array('id'=>$course->id);
|
||||||
notice_yesno($strdeletecheckfull, 'category.php', 'category.php', $optionsyes, $optionsno, 'post', 'get');
|
notice_yesno($strdeletecheckfull, 'edit_tree.php', 'edit_tree.php', $optionsyes, $optionsno, 'post', 'get');
|
||||||
print_footer($course);
|
print_footer($course);
|
||||||
die;
|
die;
|
||||||
}
|
}
|
||||||
@ -173,8 +172,9 @@ print_header_simple($strgrades . ': ' . $strgraderreport, ': ' . $strcategoriese
|
|||||||
print_heading(get_string('categoriesedit', 'grades'));
|
print_heading(get_string('categoriesedit', 'grades'));
|
||||||
|
|
||||||
// Add tabs
|
// Add tabs
|
||||||
$currenttab = 'editcategory';
|
// TODO: implement return support - use tabs from the report plugin
|
||||||
include('tabs.php');
|
/*$currenttab = 'editcategory';
|
||||||
|
include('tabs.php');*/
|
||||||
|
|
||||||
print_box_start('gradetreebox generalbox');
|
print_box_start('gradetreebox generalbox');
|
||||||
echo '<ul id="grade_tree">';
|
echo '<ul id="grade_tree">';
|
||||||
@ -184,12 +184,12 @@ print_box_end();
|
|||||||
|
|
||||||
echo '<div class="buttons">';
|
echo '<div class="buttons">';
|
||||||
if ($moving) {
|
if ($moving) {
|
||||||
print_single_button('category.php', array('id'=>$course->id), get_string('cancel'), 'get');
|
print_single_button('edit_tree.php', array('id'=>$course->id), get_string('cancel'), 'get');
|
||||||
} else {
|
} else {
|
||||||
print_single_button('edit_category.php', array('courseid'=>$course->id), get_string('addcategory', 'grades'), 'get');
|
print_single_button('edit_category.php', array('courseid'=>$course->id), get_string('addcategory', 'grades'), 'get');
|
||||||
print_single_button('edit_item.php', array('courseid'=>$course->id), get_string('additem', 'grades'), 'get'); // TODO: localize
|
print_single_button('edit_item.php', array('courseid'=>$course->id), get_string('additem', 'grades'), 'get');
|
||||||
print_single_button('category.php', array('id'=>$course->id, 'action'=>'autosort'), get_string('autosort', 'grades'), 'get'); //TODO: localize
|
print_single_button('edit_tree.php', array('id'=>$course->id, 'action'=>'autosort'), get_string('autosort', 'grades'), 'get');
|
||||||
print_single_button('category.php', array('id'=>$course->id, 'action'=>'synclegacy'), get_string('synclegacygrades', 'grades'), 'get'); //TODO: localize
|
print_single_button('edit_tree.php', array('id'=>$course->id, 'action'=>'synclegacy'), get_string('synclegacygrades', 'grades'), 'get');
|
||||||
}
|
}
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
print_footer($course);
|
print_footer($course);
|
||||||
@ -215,25 +215,25 @@ function print_grade_tree($element, $moving) {
|
|||||||
$eid = $element['eid'];
|
$eid = $element['eid'];
|
||||||
|
|
||||||
/// prepare actions
|
/// prepare actions
|
||||||
$actions = '<a href="category.php?id='.$COURSE->id.'&action=edit&eid='.$eid.'&sesskey='.sesskey().'"><img src="'.$CFG->pixpath.'/t/edit.gif" class="iconsmall" alt="'.$stredit.'" title="'.$stredit.'"/></a>';
|
$actions = '<a href="edit_tree.php?id='.$COURSE->id.'&action=edit&eid='.$eid.'&sesskey='.sesskey().'"><img src="'.$CFG->pixpath.'/t/edit.gif" class="iconsmall" alt="'.$stredit.'" title="'.$stredit.'"/></a>';
|
||||||
|
|
||||||
if ($element['type'] == 'item' or ($element['type'] == 'category' and $element['depth'] > 1)) {
|
if ($element['type'] == 'item' or ($element['type'] == 'category' and $element['depth'] > 1)) {
|
||||||
$actions .= '<a href="category.php?id='.$COURSE->id.'&action=delete&eid='.$eid.'&sesskey='.sesskey().'"><img src="'.$CFG->pixpath.'/t/delete.gif" class="iconsmall" alt="'.$strdelete.'" title="'.$strdelete.'"/></a>';
|
$actions .= '<a href="edit_tree.php?id='.$COURSE->id.'&action=delete&eid='.$eid.'&sesskey='.sesskey().'"><img src="'.$CFG->pixpath.'/t/delete.gif" class="iconsmall" alt="'.$strdelete.'" title="'.$strdelete.'"/></a>';
|
||||||
$actions .= '<a href="category.php?id='.$COURSE->id.'&action=moveselect&eid='.$eid.'&sesskey='.sesskey().'"><img src="'.$CFG->pixpath.'/t/move.gif" class="iconsmall" alt="'.$strmove.'" title="'.$strmove.'"/></a>';
|
$actions .= '<a href="edit_tree.php?id='.$COURSE->id.'&action=moveselect&eid='.$eid.'&sesskey='.sesskey().'"><img src="'.$CFG->pixpath.'/t/move.gif" class="iconsmall" alt="'.$strmove.'" title="'.$strmove.'"/></a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($object->is_locked()) {
|
if ($object->is_locked()) {
|
||||||
$actions .= '<a href="category.php?id='.$COURSE->id.'&action=unlock&eid='.$eid.'&sesskey='.sesskey().'"><img src="'.$CFG->pixpath.'/t/unlock.gif" class="iconsmall" alt="'.$strunlock.'" title="'.$strunlock.'"/></a>';
|
$actions .= '<a href="edit_tree.php?id='.$COURSE->id.'&action=unlock&eid='.$eid.'&sesskey='.sesskey().'"><img src="'.$CFG->pixpath.'/t/unlock.gif" class="iconsmall" alt="'.$strunlock.'" title="'.$strunlock.'"/></a>';
|
||||||
} else {
|
} else {
|
||||||
$actions .= '<a href="category.php?id='.$COURSE->id.'&action=lock&eid='.$eid.'&sesskey='.sesskey().'"><img src="'.$CFG->pixpath.'/t/lock.gif" class="iconsmall" alt="'.$strlock.'" title="'.$strlock.'"/></a>';
|
$actions .= '<a href="edit_tree.php?id='.$COURSE->id.'&action=lock&eid='.$eid.'&sesskey='.sesskey().'"><img src="'.$CFG->pixpath.'/t/lock.gif" class="iconsmall" alt="'.$strlock.'" title="'.$strlock.'"/></a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($object->is_hidden()) {
|
if ($object->is_hidden()) {
|
||||||
$name = '<span class="dimmed_text">'.$object->get_name().'</span>';
|
$name = '<span class="dimmed_text">'.$object->get_name().'</span>';
|
||||||
$actions .= '<a href="category.php?id='.$COURSE->id.'&action=show&eid='.$eid.'&sesskey='.sesskey().'"><img src="'.$CFG->pixpath.'/t/show.gif" class="iconsmall" alt="'.$strshow.'" title="'.$strshow.'"/></a>';
|
$actions .= '<a href="edit_tree.php?id='.$COURSE->id.'&action=show&eid='.$eid.'&sesskey='.sesskey().'"><img src="'.$CFG->pixpath.'/t/show.gif" class="iconsmall" alt="'.$strshow.'" title="'.$strshow.'"/></a>';
|
||||||
} else {
|
} else {
|
||||||
$name = $object->get_name();
|
$name = $object->get_name();
|
||||||
$actions .= '<a href="category.php?id='.$COURSE->id.'&action=hide&eid='.$eid.'&sesskey='.sesskey().'"><img src="'.$CFG->pixpath.'/t/hide.gif" class="iconsmall" alt="'.$strhide.'" title="'.$strhide.'"/></a>';
|
$actions .= '<a href="edit_tree.php?id='.$COURSE->id.'&action=hide&eid='.$eid.'&sesskey='.sesskey().'"><img src="'.$CFG->pixpath.'/t/hide.gif" class="iconsmall" alt="'.$strhide.'" title="'.$strhide.'"/></a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
/// prepare icon
|
/// prepare icon
|
||||||
@ -260,7 +260,7 @@ function print_grade_tree($element, $moving) {
|
|||||||
$moveto = '';
|
$moveto = '';
|
||||||
if ($moving) {
|
if ($moving) {
|
||||||
$actions = ''; // no action icons when moving
|
$actions = ''; // no action icons when moving
|
||||||
$moveto = '<li><a href="category.php?id='.$COURSE->id.'&action=move&eid='.$moving.'&moveafter='.$eid.'&sesskey='.sesskey().'"><img class="movetarget" src="'.$CFG->wwwroot.'/pix/movehere.gif" alt="'.$strmovehere.'" title="'.$strmovehere.'" /></a></li>';
|
$moveto = '<li><a href="edit_tree.php?id='.$COURSE->id.'&action=move&eid='.$moving.'&moveafter='.$eid.'&sesskey='.sesskey().'"><img class="movetarget" src="'.$CFG->wwwroot.'/pix/movehere.gif" alt="'.$strmovehere.'" title="'.$strmovehere.'" /></a></li>';
|
||||||
}
|
}
|
||||||
|
|
||||||
/// print the list items now
|
/// print the list items now
|
@ -390,8 +390,8 @@ class grade_report_grader {
|
|||||||
} else { // Print confirmation dialog
|
} else { // Print confirmation dialog
|
||||||
$eid = $element['eid'];
|
$eid = $element['eid'];
|
||||||
$strdeletecheckfull = get_string('deletecheck', '', $element['object']->get_name());
|
$strdeletecheckfull = get_string('deletecheck', '', $element['object']->get_name());
|
||||||
$linkyes = "category.php?target=$eid&action=delete&confirm=1$this->gtree->commonvars";
|
$linkyes = "edit_tree.php?target=$eid&action=delete&confirm=1$this->gtree->commonvars";
|
||||||
$linkno = "category.php?$this->gtree->commonvars";
|
$linkno = "edit_tree.php?$this->gtree->commonvars";
|
||||||
notice_yesno($strdeletecheckfull, $linkyes, $linkno);
|
notice_yesno($strdeletecheckfull, $linkyes, $linkno);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -982,11 +982,11 @@ class grade_report_grader {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Prepare image strings
|
// Prepare image strings
|
||||||
$edit_category_icon = '<a href="report/grader/edit_category.php?courseid='.$object->courseid.'&id='.$object->id.'">'
|
$edit_category_icon = '<a href="'.$CFG->wwwroot.'/grade/edit/edit_category.php?courseid='.$object->courseid.'&id='.$object->id.'">'
|
||||||
. '<img src="'.$CFG->pixpath.'/t/edit.gif" class="iconsmall" alt="'
|
. '<img src="'.$CFG->pixpath.'/t/edit.gif" class="iconsmall" alt="'
|
||||||
. $stredit.'" title="'.$stredit.'" /></a>'. "\n";
|
. $stredit.'" title="'.$stredit.'" /></a>'. "\n";
|
||||||
|
|
||||||
$edit_item_icon = '<a href="report/grader/edit_item.php?courseid='.$object->courseid.'&id='.$object->id.'">'
|
$edit_item_icon = '<a href="'.$CFG->wwwroot.'/grade/edit/edit_item.php?courseid='.$object->courseid.'&id='.$object->id.'">'
|
||||||
. '<img src="'.$CFG->pixpath.'/t/edit.gif" class="iconsmall" alt="'
|
. '<img src="'.$CFG->pixpath.'/t/edit.gif" class="iconsmall" alt="'
|
||||||
. $stredit.'" title="'.$stredit.'" /></a>'. "\n";
|
. $stredit.'" title="'.$stredit.'" /></a>'. "\n";
|
||||||
$overlib = '';
|
$overlib = '';
|
||||||
@ -995,7 +995,7 @@ class grade_report_grader {
|
|||||||
. $strfeedback.'\');" onmouseout="return nd();"';
|
. $strfeedback.'\');" onmouseout="return nd();"';
|
||||||
}
|
}
|
||||||
|
|
||||||
$edit_grade_icon = '<a href="report/grader/edit_grade.php?courseid='.$object->courseid.'&id='.$object->id.'">'
|
$edit_grade_icon = '<a href="'.$CFG->wwwroot.'/grade/edit/edit_grade.php?courseid='.$object->courseid.'&id='.$object->id.'">'
|
||||||
. '<img ' . $overlib . ' src="'.$CFG->pixpath.'/t/edit.gif"'
|
. '<img ' . $overlib . ' src="'.$CFG->pixpath.'/t/edit.gif"'
|
||||||
. 'class="iconsmall" alt="' . $stredit.'" title="'.$stredit.'" /></a>'. "\n";
|
. 'class="iconsmall" alt="' . $stredit.'" title="'.$stredit.'" /></a>'. "\n";
|
||||||
|
|
||||||
@ -1004,7 +1004,7 @@ class grade_report_grader {
|
|||||||
if ($type == 'item' or $type == 'courseitem' or $type == 'categoryitem') {
|
if ($type == 'item' or $type == 'courseitem' or $type == 'categoryitem') {
|
||||||
// show calculation icon only when calculation possible
|
// show calculation icon only when calculation possible
|
||||||
if (!$object->is_normal_item() and ($object->gradetype == GRADE_TYPE_SCALE or $object->gradetype == GRADE_TYPE_VALUE)) {
|
if (!$object->is_normal_item() and ($object->gradetype == GRADE_TYPE_SCALE or $object->gradetype == GRADE_TYPE_VALUE)) {
|
||||||
$edit_calculation_icon = '<a href="report/grader/edit_calculation.php?courseid='.$object->courseid.'&id='.$object->id.'">'
|
$edit_calculation_icon = '<a href="'.$CFG->wwwroot.'/grade/edit/edit_calculation.php?courseid='.$object->courseid.'&id='.$object->id.'">'
|
||||||
. '<img src="'.$CFG->pixpath.'/t/calc.gif" class="iconsmall" alt="'
|
. '<img src="'.$CFG->pixpath.'/t/calc.gif" class="iconsmall" alt="'
|
||||||
. $streditcalculation.'" title="'.$streditcalculation.'" /></a>'. "\n";
|
. $streditcalculation.'" title="'.$streditcalculation.'" /></a>'. "\n";
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
get_string('graderreport', 'grades'));
|
get_string('graderreport', 'grades'));
|
||||||
|
|
||||||
$row[] = new tabobject('editcategory',
|
$row[] = new tabobject('editcategory',
|
||||||
$CFG->wwwroot.'/grade/report/grader/category.php?id='.$courseid,
|
$CFG->wwwroot.'/grade/edit/edit_tree.php?id='.$courseid,
|
||||||
get_string('categoriesedit', 'grades'));
|
get_string('categoriesedit', 'grades'));
|
||||||
|
|
||||||
$row[] = new tabobject('preferences',
|
$row[] = new tabobject('preferences',
|
||||||
|
@ -163,11 +163,11 @@ $numusers = count(get_role_users(@implode(',', $CFG->gradebookroles), $context))
|
|||||||
}
|
}
|
||||||
$table->add_data($data);
|
$table->add_data($data);
|
||||||
}
|
}
|
||||||
|
|
||||||
//echo "<div><table class='boxaligncenter'><tr><td>asdfas</td></tr></table></div>";
|
//echo "<div><table class='boxaligncenter'><tr><td>asdfas</td></tr></table></div>";
|
||||||
$table->print_html();
|
$table->print_html();
|
||||||
} else {
|
} else {
|
||||||
notify(get_string('nogradeitem', 'grades'));
|
notify(get_string('nogradeitem', 'grades'));
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
@ -225,9 +225,9 @@ class grade_grades extends grade_object {
|
|||||||
|
|
||||||
if ($locktime) {
|
if ($locktime) {
|
||||||
// if current locktime is before, no need to reset
|
// if current locktime is before, no need to reset
|
||||||
|
|
||||||
if ($this->locktime && $this->locktime <= $locktime) {
|
if ($this->locktime && $this->locktime <= $locktime) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1499,11 +1499,11 @@ class grade_item extends grade_object {
|
|||||||
|
|
||||||
} else {
|
} else {
|
||||||
$gis = implode(',', $useditems);
|
$gis = implode(',', $useditems);
|
||||||
|
|
||||||
$sql = "SELECT gi.*
|
$sql = "SELECT gi.*
|
||||||
FROM {$CFG->prefix}grade_items gi
|
FROM {$CFG->prefix}grade_items gi
|
||||||
WHERE gi.id IN ($gis) and gi.courseid={$this->courseid}"; // from the same course only!
|
WHERE gi.id IN ($gis) and gi.courseid={$this->courseid}"; // from the same course only!
|
||||||
|
|
||||||
if (!$grade_items = get_records_sql($sql)) {
|
if (!$grade_items = get_records_sql($sql)) {
|
||||||
$grade_items = array();
|
$grade_items = array();
|
||||||
}
|
}
|
||||||
|
@ -2125,7 +2125,7 @@ body#grade-index .grades .weighted {
|
|||||||
|
|
||||||
/* gradebook edit tree */
|
/* gradebook edit tree */
|
||||||
|
|
||||||
#grade-report-grader-category .gradetreebox {
|
#grade-edit-edit_tree .gradetreebox {
|
||||||
width:70%;
|
width:70%;
|
||||||
margin-left:auto;
|
margin-left:auto;
|
||||||
margin-right:auto;
|
margin-right:auto;
|
||||||
@ -2133,40 +2133,40 @@ body#grade-index .grades .weighted {
|
|||||||
padding-bottom:15px;
|
padding-bottom:15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#grade-report-grader-category .buttons {
|
#grade-edit-edit_tree .buttons {
|
||||||
margin: 20px;
|
margin: 20px;
|
||||||
text-align:center;
|
text-align:center;
|
||||||
}
|
}
|
||||||
|
|
||||||
#grade-report-grader-category .buttons .singlebutton {
|
#grade-edit-edit_tree .buttons .singlebutton {
|
||||||
display: inline;
|
display: inline;
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#grade-report-grader-category .movetarget {
|
#grade-edit-edit_tree .movetarget {
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 80px;
|
width: 80px;
|
||||||
height: 16px;
|
height: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#grade-report-grader-category ul#grade_tree {
|
#grade-edit-edit_tree ul#grade_tree {
|
||||||
width: auto;
|
width: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
#grade-report-grader-category ul#grade_tree li {
|
#grade-edit-edit_tree ul#grade_tree li {
|
||||||
list-style: none;
|
list-style: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
#grade-report-grader-category ul#grade_tree li.category {
|
#grade-edit-edit_tree ul#grade_tree li.category {
|
||||||
margin-bottom: 6px;
|
margin-bottom: 6px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#grade-report-grader-category .moving {
|
#grade-edit-edit_tree .moving {
|
||||||
background-color: #E8EEF7;
|
background-color: #E8EEF7;
|
||||||
}
|
}
|
||||||
|
|
||||||
#grade-report-grader-category .iconsmall {
|
#grade-edit-edit_tree .iconsmall {
|
||||||
margin-left: 4px;
|
margin-left: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user