2009-07-07 02:26:36 +00:00
|
|
|
<?php
|
|
|
|
// This file is part of Moodle - http://moodle.org/
|
|
|
|
//
|
|
|
|
// Moodle is free software: you can redistribute it and/or modify
|
|
|
|
// it under the terms of the GNU General Public License as published by
|
|
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
|
|
// (at your option) any later version.
|
|
|
|
//
|
|
|
|
// Moodle is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
// GNU General Public License for more details.
|
|
|
|
//
|
|
|
|
// You should have received a copy of the GNU General Public License
|
|
|
|
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
2007-06-30 21:12:47 +00:00
|
|
|
|
2009-08-24 15:10:36 +00:00
|
|
|
/**
|
2012-01-06 11:52:46 +07:00
|
|
|
* Edit and review page for grade categories and items
|
2009-08-24 15:10:36 +00:00
|
|
|
*
|
2012-01-06 11:52:46 +07:00
|
|
|
* @package core_grades
|
2009-08-24 15:10:36 +00:00
|
|
|
* @copyright 2008 Nicolas Connault
|
|
|
|
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
|
|
|
*/
|
|
|
|
|
2007-07-29 23:02:03 +00:00
|
|
|
require_once '../../../config.php';
|
2007-07-16 18:58:09 +00:00
|
|
|
require_once $CFG->dirroot.'/grade/lib.php';
|
2007-08-06 09:01:18 +00:00
|
|
|
require_once $CFG->dirroot.'/grade/report/lib.php'; // for preferences
|
2009-02-09 10:49:41 +00:00
|
|
|
require_once $CFG->dirroot.'/grade/edit/tree/lib.php';
|
2007-06-30 21:12:47 +00:00
|
|
|
|
2009-02-09 10:49:41 +00:00
|
|
|
$courseid = required_param('id', PARAM_INT);
|
|
|
|
$action = optional_param('action', 0, PARAM_ALPHA);
|
|
|
|
$eid = optional_param('eid', 0, PARAM_ALPHANUM);
|
|
|
|
$category = optional_param('category', null, PARAM_INT);
|
|
|
|
$aggregationtype = optional_param('aggregationtype', null, PARAM_INT);
|
2007-05-30 08:48:11 +00:00
|
|
|
|
2010-02-05 05:20:13 +00:00
|
|
|
$url = new moodle_url('/grade/edit/tree/index.php', array('id' => $courseid));
|
|
|
|
$PAGE->set_url($url);
|
2010-05-05 03:27:22 +00:00
|
|
|
$PAGE->set_pagelayout('admin');
|
2009-08-24 15:10:36 +00:00
|
|
|
|
2007-06-25 09:37:26 +00:00
|
|
|
/// Make sure they can even access this course
|
2008-11-20 15:44:36 +00:00
|
|
|
if (!$course = $DB->get_record('course', array('id' => $courseid))) {
|
2007-07-23 15:38:31 +00:00
|
|
|
print_error('nocourseid');
|
2007-06-25 09:37:26 +00:00
|
|
|
}
|
|
|
|
|
2007-06-30 21:12:47 +00:00
|
|
|
require_login($course);
|
2012-07-24 14:04:40 +08:00
|
|
|
$context = context_course::instance($course->id);
|
2007-07-24 07:45:15 +00:00
|
|
|
require_capability('moodle/grade:manage', $context);
|
|
|
|
|
2010-06-07 07:52:11 +00:00
|
|
|
// todo $PAGE->requires->js_module() should be used here instead
|
|
|
|
$PAGE->requires->js('/grade/edit/tree/functions.js');
|
|
|
|
|
2007-07-24 07:45:15 +00:00
|
|
|
/// return tracking object
|
2007-07-29 23:02:03 +00:00
|
|
|
$gpr = new grade_plugin_return(array('type'=>'edit', 'plugin'=>'tree', 'courseid'=>$courseid));
|
2007-07-24 07:45:15 +00:00
|
|
|
$returnurl = $gpr->get_return_url(null);
|
2007-06-25 09:37:26 +00:00
|
|
|
|
2009-02-09 10:49:41 +00:00
|
|
|
// Change category aggregation if requested
|
2009-04-16 07:16:44 +00:00
|
|
|
if (!is_null($category) && !is_null($aggregationtype) && confirm_sesskey()) {
|
2009-02-09 10:49:41 +00:00
|
|
|
if (!$grade_category = grade_category::fetch(array('id'=>$category, 'courseid'=>$courseid))) {
|
2009-09-30 07:20:31 +00:00
|
|
|
print_error('invalidcategoryid');
|
2009-02-09 10:49:41 +00:00
|
|
|
}
|
2010-06-10 03:00:04 +00:00
|
|
|
|
2010-09-21 08:16:49 +00:00
|
|
|
$data = new stdClass();
|
2009-02-09 10:49:41 +00:00
|
|
|
$data->aggregation = $aggregationtype;
|
|
|
|
grade_category::set_properties($grade_category, $data);
|
|
|
|
$grade_category->update();
|
2010-06-10 03:00:04 +00:00
|
|
|
|
2009-04-16 07:16:44 +00:00
|
|
|
grade_regrade_final_grades($courseid);
|
2009-02-09 10:49:41 +00:00
|
|
|
}
|
|
|
|
|
2007-07-24 07:45:15 +00:00
|
|
|
//first make sure we have proper final grades - we need it for locking changes
|
|
|
|
grade_regrade_final_grades($courseid);
|
2007-06-25 09:37:26 +00:00
|
|
|
|
2007-06-30 21:12:47 +00:00
|
|
|
// get the grading tree object
|
2007-07-08 19:24:41 +00:00
|
|
|
// note: total must be first for moving to work correctly, if you want it last moving code must be rewritten!
|
2007-07-13 08:59:46 +00:00
|
|
|
$gtree = new grade_tree($courseid, false, false);
|
2007-06-05 08:50:24 +00:00
|
|
|
|
2007-06-30 21:12:47 +00:00
|
|
|
if (empty($eid)) {
|
|
|
|
$element = null;
|
|
|
|
$object = null;
|
2007-05-30 08:48:11 +00:00
|
|
|
|
2007-06-30 21:12:47 +00:00
|
|
|
} else {
|
|
|
|
if (!$element = $gtree->locate_element($eid)) {
|
2008-05-14 07:24:28 +00:00
|
|
|
print_error('invalidelementid', '', $returnurl);
|
2007-06-30 21:12:47 +00:00
|
|
|
}
|
2007-07-24 07:45:15 +00:00
|
|
|
$object = $element['object'];
|
2007-06-30 21:12:47 +00:00
|
|
|
}
|
2007-06-28 13:20:30 +00:00
|
|
|
|
2007-10-08 23:09:10 +00:00
|
|
|
$switch = grade_get_setting($course->id, 'aggregationposition', $CFG->grade_aggregationposition);
|
2007-06-28 13:20:30 +00:00
|
|
|
|
2007-08-01 06:47:35 +00:00
|
|
|
$strgrades = get_string('grades');
|
|
|
|
$strgraderreport = get_string('graderreport', 'grades');
|
2007-06-28 13:20:30 +00:00
|
|
|
|
2007-06-30 21:12:47 +00:00
|
|
|
$moving = false;
|
2009-08-25 07:31:13 +00:00
|
|
|
$movingeid = false;
|
2007-06-30 21:12:47 +00:00
|
|
|
|
2009-08-25 07:31:13 +00:00
|
|
|
if ($action == 'moveselect') {
|
|
|
|
if ($eid and confirm_sesskey()) {
|
|
|
|
$movingeid = $eid;
|
|
|
|
$moving=true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
$grade_edit_tree = new grade_edit_tree($gtree, $movingeid, $gpr);
|
2009-02-09 10:49:41 +00:00
|
|
|
|
2007-06-30 21:12:47 +00:00
|
|
|
switch ($action) {
|
|
|
|
case 'delete':
|
2009-04-16 07:16:44 +00:00
|
|
|
if ($eid && confirm_sesskey()) {
|
2009-02-09 10:49:41 +00:00
|
|
|
if (!$grade_edit_tree->element_deletable($element)) {
|
2007-12-18 17:38:22 +00:00
|
|
|
// no deleting of external activities - they would be recreated anyway!
|
2008-02-17 19:12:11 +00:00
|
|
|
// exception is activity without grading or misconfigured activities
|
2007-11-01 15:09:02 +00:00
|
|
|
break;
|
|
|
|
}
|
2007-07-05 21:40:05 +00:00
|
|
|
$confirm = optional_param('confirm', 0, PARAM_BOOL);
|
|
|
|
|
2009-05-30 13:01:20 +00:00
|
|
|
if ($confirm) {
|
2007-07-05 21:40:05 +00:00
|
|
|
$object->delete('grade/report/grader/category');
|
|
|
|
redirect($returnurl);
|
|
|
|
|
|
|
|
} else {
|
2009-09-08 01:48:37 +00:00
|
|
|
$PAGE->set_title($strgrades . ': ' . $strgraderreport);
|
2010-06-02 07:26:56 +00:00
|
|
|
$PAGE->set_heading($course->fullname);
|
2009-09-08 01:48:37 +00:00
|
|
|
echo $OUTPUT->header();
|
2007-07-05 21:40:05 +00:00
|
|
|
$strdeletecheckfull = get_string('deletecheck', '', $object->get_name());
|
|
|
|
$optionsyes = array('eid'=>$eid, 'confirm'=>1, 'sesskey'=>sesskey(), 'id'=>$course->id, 'action'=>'delete');
|
|
|
|
$optionsno = array('id'=>$course->id);
|
2010-01-03 20:47:13 +00:00
|
|
|
$formcontinue = new single_button(new moodle_url('index.php', $optionsyes), get_string('yes'));
|
2010-01-14 19:18:04 +00:00
|
|
|
$formcancel = new single_button(new moodle_url('index.php', $optionsno), get_string('no'), 'get');
|
2009-08-20 08:40:49 +00:00
|
|
|
echo $OUTPUT->confirm($strdeletecheckfull, $formcontinue, $formcancel);
|
2009-08-06 14:12:17 +00:00
|
|
|
echo $OUTPUT->footer();
|
2007-07-05 21:40:05 +00:00
|
|
|
die;
|
|
|
|
}
|
|
|
|
}
|
2007-06-30 21:12:47 +00:00
|
|
|
break;
|
|
|
|
|
2007-07-01 19:45:13 +00:00
|
|
|
case 'autosort':
|
|
|
|
//TODO: implement autosorting based on order of mods on course page, categories first, manual items last
|
|
|
|
break;
|
|
|
|
|
2007-06-30 21:12:47 +00:00
|
|
|
case 'move':
|
|
|
|
if ($eid and confirm_sesskey()) {
|
|
|
|
$moveafter = required_param('moveafter', PARAM_ALPHANUM);
|
2009-02-09 10:49:41 +00:00
|
|
|
$first = optional_param('first', false, PARAM_BOOL); // If First is set to 1, it means the target is the first child of the category $moveafter
|
|
|
|
|
2007-06-30 21:12:47 +00:00
|
|
|
if(!$after_el = $gtree->locate_element($moveafter)) {
|
2008-05-14 07:24:28 +00:00
|
|
|
print_error('invalidelementid', '', $returnurl);
|
2007-06-30 21:12:47 +00:00
|
|
|
}
|
2009-02-09 10:49:41 +00:00
|
|
|
|
2007-06-30 21:12:47 +00:00
|
|
|
$after = $after_el['object'];
|
|
|
|
$sortorder = $after->get_sortorder();
|
|
|
|
|
2009-02-09 10:49:41 +00:00
|
|
|
if (!$first) {
|
|
|
|
$parent = $after->get_parent_category();
|
|
|
|
$object->set_parent($parent->id);
|
|
|
|
} else {
|
|
|
|
$object->set_parent($after->id);
|
|
|
|
}
|
|
|
|
|
2007-06-30 21:12:47 +00:00
|
|
|
$object->move_after_sortorder($sortorder);
|
|
|
|
|
|
|
|
redirect($returnurl);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
break;
|
2007-06-28 13:20:30 +00:00
|
|
|
}
|
|
|
|
|
2010-05-19 03:50:27 +00:00
|
|
|
//if we go straight to the db to update an element we need to recreate the tree as
|
|
|
|
// $grade_edit_tree has already been constructed.
|
|
|
|
//Ideally we could do the updates through $grade_edit_tree to avoid recreating it
|
|
|
|
$recreatetree = false;
|
|
|
|
|
2009-05-30 13:01:20 +00:00
|
|
|
if ($data = data_submitted() and confirm_sesskey()) {
|
2009-02-09 10:49:41 +00:00
|
|
|
// Perform bulk actions first
|
2009-05-30 13:01:20 +00:00
|
|
|
if (!empty($data->bulkmove)) {
|
2009-02-09 10:49:41 +00:00
|
|
|
$elements = array();
|
2007-06-30 21:12:47 +00:00
|
|
|
|
2009-02-09 10:49:41 +00:00
|
|
|
foreach ($data as $key => $value) {
|
2014-09-22 12:37:37 +08:00
|
|
|
if (preg_match('/select_(ig[0-9]*)/', $key, $matches)) {
|
2009-02-09 10:49:41 +00:00
|
|
|
$elements[] = $matches[1];
|
|
|
|
}
|
|
|
|
}
|
2007-11-01 11:42:31 +00:00
|
|
|
|
2009-02-09 10:49:41 +00:00
|
|
|
$grade_edit_tree->move_elements($elements, $returnurl);
|
2007-11-01 11:42:31 +00:00
|
|
|
}
|
|
|
|
|
2009-02-09 10:49:41 +00:00
|
|
|
// Category and item field updates
|
|
|
|
foreach ($data as $key => $value) {
|
|
|
|
// Grade category text inputs
|
2009-05-30 13:01:20 +00:00
|
|
|
if (preg_match('/^(aggregation|droplow|keephigh)_([0-9]+)$/', $key, $matches)) {
|
|
|
|
$param = $matches[1];
|
|
|
|
$aid = $matches[2];
|
2009-05-08 13:31:30 +00:00
|
|
|
|
|
|
|
// Do not allow negative values
|
2009-05-30 13:01:20 +00:00
|
|
|
$value = clean_param($value, PARAM_INT);
|
2009-05-08 13:31:30 +00:00
|
|
|
$value = ($value < 0) ? 0 : $value;
|
|
|
|
|
2009-05-30 13:01:20 +00:00
|
|
|
$grade_category = grade_category::fetch(array('id'=>$aid, 'courseid'=>$courseid));
|
2009-02-10 10:40:50 +00:00
|
|
|
$grade_category->$param = $value;
|
|
|
|
|
|
|
|
$grade_category->update();
|
2007-06-30 21:12:47 +00:00
|
|
|
|
2010-05-19 03:50:27 +00:00
|
|
|
$recreatetree = true;
|
|
|
|
|
2009-02-09 10:49:41 +00:00
|
|
|
// Grade item text inputs
|
2014-09-23 11:37:12 +08:00
|
|
|
} elseif (preg_match('/^(weight|multfactor|plusfactor)_([0-9]+)$/', $key, $matches)) {
|
2009-05-30 13:01:20 +00:00
|
|
|
$param = $matches[1];
|
|
|
|
$aid = $matches[2];
|
2009-03-04 14:20:45 +00:00
|
|
|
|
2009-05-30 13:01:20 +00:00
|
|
|
$value = unformat_float($value);
|
2012-05-11 11:34:34 +08:00
|
|
|
$value = clean_param($value, PARAM_FLOAT);
|
2009-03-04 14:20:45 +00:00
|
|
|
|
2014-09-16 15:11:45 +08:00
|
|
|
$grade_item = grade_item::fetch(array('id' => $aid, 'courseid' => $courseid));
|
2009-05-30 13:01:20 +00:00
|
|
|
|
|
|
|
if ($param === 'grademax' and $value < $grade_item->grademin) {
|
|
|
|
// better not allow values lower than grade min
|
|
|
|
$value = $grade_item->grademin;
|
|
|
|
}
|
2014-08-31 19:08:50 +08:00
|
|
|
|
2014-09-04 15:08:13 +08:00
|
|
|
// Convert weight to aggregation coef2.
|
|
|
|
if ($param === 'weight') {
|
2014-09-22 11:07:13 +08:00
|
|
|
$aggcoef = $grade_item->get_coefstring();
|
|
|
|
if ($aggcoef == 'aggregationcoefextraweightsum') {
|
|
|
|
$value = $value / 100.0;
|
|
|
|
if (round($grade_item->aggregationcoef2, 4) != round($value, 4)) {
|
|
|
|
$grade_item->weightoverride = 1;
|
|
|
|
}
|
|
|
|
$grade_item->aggregationcoef2 = $value;
|
|
|
|
} else if ($aggcoef == 'aggregationcoefweight') {
|
|
|
|
$grade_item->aggregationcoef = $value;
|
2014-09-04 15:08:13 +08:00
|
|
|
}
|
2014-09-19 10:29:04 +08:00
|
|
|
} else {
|
|
|
|
$grade_item->$param = $value;
|
2014-08-31 19:08:50 +08:00
|
|
|
}
|
2007-06-30 21:12:47 +00:00
|
|
|
|
2009-02-10 10:40:50 +00:00
|
|
|
$grade_item->update();
|
2007-06-30 21:12:47 +00:00
|
|
|
|
2010-05-19 03:50:27 +00:00
|
|
|
$recreatetree = true;
|
|
|
|
|
2009-02-09 10:49:41 +00:00
|
|
|
// Grade item checkbox inputs
|
2009-05-30 13:01:20 +00:00
|
|
|
} elseif (preg_match('/^extracredit_([0-9]+)$/', $key, $matches)) { // Sum extra credit checkbox
|
|
|
|
$aid = $matches[1];
|
|
|
|
$value = clean_param($value, PARAM_BOOL);
|
2007-06-30 21:12:47 +00:00
|
|
|
|
2014-09-16 15:11:45 +08:00
|
|
|
$grade_item = grade_item::fetch(array('id' => $aid, 'courseid' => $courseid));
|
2014-09-04 10:17:03 +08:00
|
|
|
|
2009-05-30 13:01:20 +00:00
|
|
|
$grade_item->aggregationcoef = $value;
|
2009-02-10 10:40:50 +00:00
|
|
|
|
|
|
|
$grade_item->update();
|
2014-09-04 10:17:03 +08:00
|
|
|
|
2010-05-19 03:50:27 +00:00
|
|
|
$recreatetree = true;
|
|
|
|
|
2009-02-09 10:49:41 +00:00
|
|
|
// Grade category checkbox inputs
|
2009-05-30 13:01:20 +00:00
|
|
|
} elseif (preg_match('/^aggregate(onlygraded|subcats|outcomes)_([0-9]+)$/', $key, $matches)) {
|
|
|
|
$param = 'aggregate'.$matches[1];
|
|
|
|
$aid = $matches[2];
|
|
|
|
$value = clean_param($value, PARAM_BOOL);
|
2009-02-09 10:49:41 +00:00
|
|
|
|
2009-05-30 13:01:20 +00:00
|
|
|
$grade_category = grade_category::fetch(array('id'=>$aid, 'courseid'=>$courseid));
|
|
|
|
$grade_category->$param = $value;
|
2009-02-10 10:40:50 +00:00
|
|
|
|
|
|
|
$grade_category->update();
|
2010-05-19 03:50:27 +00:00
|
|
|
|
|
|
|
$recreatetree = true;
|
2007-06-30 21:12:47 +00:00
|
|
|
}
|
|
|
|
}
|
2014-09-16 15:11:45 +08:00
|
|
|
|
|
|
|
grade_regrade_final_grades($courseid);
|
2007-06-30 21:12:47 +00:00
|
|
|
}
|
|
|
|
|
2014-09-16 11:48:22 +08:00
|
|
|
print_grade_page_head($courseid, 'settings', 'setup', get_string('setupgradeslayout', 'grades'));
|
2010-10-01 03:54:59 +00:00
|
|
|
|
2009-02-09 10:49:41 +00:00
|
|
|
// Print Table of categories and items
|
2009-08-10 04:54:32 +00:00
|
|
|
echo $OUTPUT->box_start('gradetreebox generalbox');
|
2008-02-17 19:12:11 +00:00
|
|
|
|
2009-02-09 10:49:41 +00:00
|
|
|
echo '<form id="gradetreeform" method="post" action="'.$returnurl.'">';
|
|
|
|
echo '<div>';
|
|
|
|
echo '<input type="hidden" name="sesskey" value="'.sesskey().'" />';
|
2008-02-17 19:12:11 +00:00
|
|
|
|
2010-05-19 03:50:27 +00:00
|
|
|
//did we update something in the db and thus invalidate $grade_edit_tree?
|
|
|
|
if ($recreatetree) {
|
|
|
|
$grade_edit_tree = new grade_edit_tree($gtree, $movingeid, $gpr);
|
|
|
|
}
|
|
|
|
|
2010-03-20 22:15:54 +00:00
|
|
|
echo html_writer::table($grade_edit_tree->table);
|
2008-06-03 16:10:57 +00:00
|
|
|
|
2009-02-09 10:49:41 +00:00
|
|
|
echo '<div id="gradetreesubmit">';
|
|
|
|
if (!$moving) {
|
|
|
|
echo '<input class="advanced" type="submit" value="'.get_string('savechanges').'" />';
|
|
|
|
}
|
|
|
|
|
2009-04-24 08:13:56 +00:00
|
|
|
// We don't print a bulk move menu if there are no other categories than course category
|
2009-08-25 07:31:13 +00:00
|
|
|
if (!$moving && count($grade_edit_tree->categories) > 1) {
|
2009-02-09 10:49:41 +00:00
|
|
|
echo '<br /><br />';
|
|
|
|
echo '<input type="hidden" name="bulkmove" value="0" id="bulkmoveinput" />';
|
2014-09-10 10:43:16 +08:00
|
|
|
$attributes = array('id'=>'menumoveafter', 'class' => 'ignoredirty');
|
2012-08-07 13:34:34 +08:00
|
|
|
echo html_writer::label(get_string('moveselectedto', 'grades'), 'menumoveafter');
|
2010-02-11 09:57:33 +00:00
|
|
|
echo html_writer::select($grade_edit_tree->categories, 'moveafter', '', array(''=>'choosedots'), $attributes);
|
2010-02-11 15:44:06 +00:00
|
|
|
$OUTPUT->add_action_handler(new component_action('change', 'submit_bulk_move'), 'menumoveafter');
|
2010-01-26 09:32:21 +00:00
|
|
|
echo '<div id="noscriptgradetreeform" class="hiddenifjs">
|
2009-02-09 10:49:41 +00:00
|
|
|
<input type="submit" value="'.get_string('go').'" />
|
2009-07-02 07:45:44 +00:00
|
|
|
</div>';
|
2009-02-09 10:49:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
echo '</div>';
|
2008-02-17 19:12:11 +00:00
|
|
|
|
2009-02-09 10:49:41 +00:00
|
|
|
echo '</div></form>';
|
|
|
|
|
2009-08-10 04:54:32 +00:00
|
|
|
echo $OUTPUT->box_end();
|
2009-02-09 10:49:41 +00:00
|
|
|
|
|
|
|
// Print action buttons
|
2010-03-25 06:38:21 +00:00
|
|
|
echo $OUTPUT->container_start('buttons mdl-align');
|
2009-02-09 10:49:41 +00:00
|
|
|
|
|
|
|
if ($moving) {
|
2010-01-03 15:46:14 +00:00
|
|
|
echo $OUTPUT->single_button(new moodle_url('index.php', array('id'=>$course->id)), get_string('cancel'), 'get');
|
2009-02-09 10:49:41 +00:00
|
|
|
} else {
|
2010-01-03 15:46:14 +00:00
|
|
|
echo $OUTPUT->single_button(new moodle_url('category.php', array('courseid'=>$course->id)), get_string('addcategory', 'grades'), 'get');
|
|
|
|
echo $OUTPUT->single_button(new moodle_url('item.php', array('courseid'=>$course->id)), get_string('additem', 'grades'), 'get');
|
2009-02-09 10:49:41 +00:00
|
|
|
|
|
|
|
if (!empty($CFG->enableoutcomes)) {
|
2010-01-03 15:46:14 +00:00
|
|
|
echo $OUTPUT->single_button(new moodle_url('outcomeitem.php', array('courseid'=>$course->id)), get_string('addoutcomeitem', 'grades'), 'get');
|
2008-02-17 19:12:11 +00:00
|
|
|
}
|
|
|
|
|
2010-01-03 15:46:14 +00:00
|
|
|
//echo $OUTPUT->(new moodle_url('index.php', array('id'=>$course->id, 'action'=>'autosort')), get_string('autosort', 'grades'), 'get');
|
2008-02-17 19:12:11 +00:00
|
|
|
}
|
2007-06-30 21:12:47 +00:00
|
|
|
|
2009-08-20 08:40:49 +00:00
|
|
|
echo $OUTPUT->container_end();
|
2009-02-09 10:49:41 +00:00
|
|
|
|
2014-09-01 21:46:43 -07:00
|
|
|
$PAGE->requires->yui_module('moodle-core-formchangechecker',
|
|
|
|
'M.core_formchangechecker.init',
|
|
|
|
array(array(
|
|
|
|
'formid' => 'gradetreeform'
|
|
|
|
))
|
|
|
|
);
|
|
|
|
$PAGE->requires->string_for_js('changesmadereallygoaway', 'moodle');
|
|
|
|
|
2009-08-06 14:12:17 +00:00
|
|
|
echo $OUTPUT->footer();
|
2009-02-09 10:49:41 +00:00
|
|
|
die;
|
|
|
|
|
2009-11-01 12:11:29 +00:00
|
|
|
|