From 6fb39a98f239bfd0af567248a69ed7820be98984 Mon Sep 17 00:00:00 2001 From: nicolasconnault Date: Fri, 13 Jul 2007 05:53:16 +0000 Subject: [PATCH] MDL-9628 Renamed edit_* to * --- .../edit/{edit_calculation.php => calculation.php} | 6 ++-- ...t_calculation_form.php => calculation_form.php} | 0 grade/edit/{edit_category.php => category.php} | 4 +-- .../{edit_category_form.php => category_form.php} | 0 grade/edit/{edit_grade.php => grade.php} | 2 +- grade/edit/{edit_grade_form.php => grade_form.php} | 0 grade/edit/{edit_item.php => item.php} | 6 ++-- grade/edit/{edit_item_form.php => item_form.php} | 0 grade/edit/{edit_tree.php => tree.php} | 34 +++++++++++----------- 9 files changed, 26 insertions(+), 26 deletions(-) rename grade/edit/{edit_calculation.php => calculation.php} (96%) rename grade/edit/{edit_calculation_form.php => calculation_form.php} (100%) rename grade/edit/{edit_category.php => category.php} (95%) rename grade/edit/{edit_category_form.php => category_form.php} (100%) rename grade/edit/{edit_grade.php => grade.php} (99%) rename grade/edit/{edit_grade_form.php => grade_form.php} (100%) rename grade/edit/{edit_item.php => item.php} (94%) rename grade/edit/{edit_item_form.php => item_form.php} (100%) rename grade/edit/{edit_tree.php => tree.php} (75%) diff --git a/grade/edit/edit_calculation.php b/grade/edit/calculation.php similarity index 96% rename from grade/edit/edit_calculation.php rename to grade/edit/calculation.php index 212216af6..e8c846d7e 100644 --- a/grade/edit/edit_calculation.php +++ b/grade/edit/calculation.php @@ -1,7 +1,7 @@ libdir.'/gradelib.php'; -require_once 'edit_calculation_form.php'; +require_once 'calculation_form.php'; $courseid = required_param('courseid', PARAM_INT); $id = required_param('id', PARAM_INT); @@ -26,7 +26,7 @@ if (!$grade_item = grade_item::fetch(array('id'=>$id, 'courseid'=>$course->id))) // module items and items without grade can not have calculation if ($grade_item->is_normal_item() or ($grade_item->gradetype != GRADE_TYPE_VALUE and $grade_item->gradetype != GRADE_TYPE_SCALE)) { redirect($returnurl, get_string('erornocalculationallowed', 'grades')); //TODO: localize -} +} $mform = new edit_calculation_form(); @@ -56,4 +56,4 @@ print_header_simple($strgrades . ': ' . $strgraderreport, ': ' . $strcalculation $mform->display(); -print_footer($course); \ No newline at end of file +print_footer($course); diff --git a/grade/edit/edit_calculation_form.php b/grade/edit/calculation_form.php similarity index 100% rename from grade/edit/edit_calculation_form.php rename to grade/edit/calculation_form.php diff --git a/grade/edit/edit_category.php b/grade/edit/category.php similarity index 95% rename from grade/edit/edit_category.php rename to grade/edit/category.php index 6446ddb72..6b7153211 100644 --- a/grade/edit/edit_category.php +++ b/grade/edit/category.php @@ -2,7 +2,7 @@ require_once '../../config.php'; require_once $CFG->libdir.'/gradelib.php'; -require_once 'edit_category_form.php'; +require_once 'category_form.php'; $courseid = required_param('courseid', PARAM_INT); $id = optional_param('id', 0, PARAM_INT); @@ -17,7 +17,7 @@ $context = get_context_instance(CONTEXT_COURSE, $course->id); //require_capability() here!! // default return url -$returnurl = 'edit_tree.php?id='.$course->id; +$returnurl = 'tree.php?id='.$course->id; $mform = new edit_category_form(); diff --git a/grade/edit/edit_category_form.php b/grade/edit/category_form.php similarity index 100% rename from grade/edit/edit_category_form.php rename to grade/edit/category_form.php diff --git a/grade/edit/edit_grade.php b/grade/edit/grade.php similarity index 99% rename from grade/edit/edit_grade.php rename to grade/edit/grade.php index 6e2dc156b..a7e96f518 100644 --- a/grade/edit/edit_grade.php +++ b/grade/edit/grade.php @@ -2,7 +2,7 @@ require_once '../../config.php'; require_once $CFG->libdir.'/gradelib.php'; -require_once 'edit_grade_form.php'; +require_once 'grade_form.php'; $courseid = required_param('courseid', PARAM_INT); $id = optional_param('id', 0, PARAM_INT); // grade_grades id diff --git a/grade/edit/edit_grade_form.php b/grade/edit/grade_form.php similarity index 100% rename from grade/edit/edit_grade_form.php rename to grade/edit/grade_form.php diff --git a/grade/edit/edit_item.php b/grade/edit/item.php similarity index 94% rename from grade/edit/edit_item.php rename to grade/edit/item.php index d71007420..1ea75d184 100644 --- a/grade/edit/edit_item.php +++ b/grade/edit/item.php @@ -1,7 +1,7 @@ libdir.'/gradelib.php'; -require_once 'edit_item_form.php'; +require_once 'item_form.php'; $courseid = required_param('courseid', PARAM_INT); $id = optional_param('id', 0, PARAM_INT); @@ -16,7 +16,7 @@ $context = get_context_instance(CONTEXT_COURSE, $course->id); //require_capability() here!! // default return url -$returnurl = 'edit_tree.php?id='.$course->id; +$returnurl = 'tree.php?id='.$course->id; $mform = new edit_item_form(); if ($item = get_record('grade_items', 'id', $id, 'courseid', $course->id)) { @@ -63,4 +63,4 @@ print_header_simple($strgrades . ': ' . $strgraderreport, ': ' . $stritemsedit, $mform->display(); -print_footer($course); \ No newline at end of file +print_footer($course); diff --git a/grade/edit/edit_item_form.php b/grade/edit/item_form.php similarity index 100% rename from grade/edit/edit_item_form.php rename to grade/edit/item_form.php diff --git a/grade/edit/edit_tree.php b/grade/edit/tree.php similarity index 75% rename from grade/edit/edit_tree.php rename to grade/edit/tree.php index 5fbf92a7a..76720f5b0 100644 --- a/grade/edit/edit_tree.php +++ b/grade/edit/tree.php @@ -44,7 +44,7 @@ $context = get_context_instance(CONTEXT_COURSE, $course->id); //require_capability() here!! // default return url -$returnurl = 'edit_tree.php?id='.$course->id; +$returnurl = 'tree.php?id='.$course->id; // 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! @@ -76,9 +76,9 @@ switch ($action) { case 'edit': if ($eid and confirm_sesskey()) { if ($element['type'] == 'category') { - redirect('edit_category.php?courseid='.$course->id.'&id='.$object->id); + redirect('category.php?courseid='.$course->id.'&id='.$object->id); } else { - redirect('edit_item.php?courseid='.$course->id.'&id='.$object->id); + redirect('item.php?courseid='.$course->id.'&id='.$object->id); } } break; @@ -96,7 +96,7 @@ switch ($action) { $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); - notice_yesno($strdeletecheckfull, 'edit_tree.php', 'edit_tree.php', $optionsyes, $optionsno, 'post', 'get'); + notice_yesno($strdeletecheckfull, 'tree.php', 'tree.php', $optionsyes, $optionsno, 'post', 'get'); print_footer($course); die; } @@ -184,12 +184,12 @@ print_box_end(); echo '
'; if ($moving) { - print_single_button('edit_tree.php', array('id'=>$course->id), get_string('cancel'), 'get'); + print_single_button('tree.php', array('id'=>$course->id), get_string('cancel'), 'get'); } else { - 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'); - print_single_button('edit_tree.php', array('id'=>$course->id, 'action'=>'autosort'), get_string('autosort', 'grades'), 'get'); - print_single_button('edit_tree.php', array('id'=>$course->id, 'action'=>'synclegacy'), get_string('synclegacygrades', 'grades'), 'get'); + print_single_button('category.php', array('courseid'=>$course->id), get_string('addcategory', 'grades'), 'get'); + print_single_button('item.php', array('courseid'=>$course->id), get_string('additem', 'grades'), 'get'); + print_single_button('tree.php', array('id'=>$course->id, 'action'=>'autosort'), get_string('autosort', 'grades'), 'get'); + print_single_button('tree.php', array('id'=>$course->id, 'action'=>'synclegacy'), get_string('synclegacygrades', 'grades'), 'get'); } echo '
'; print_footer($course); @@ -215,25 +215,25 @@ function print_grade_tree($element, $moving) { $eid = $element['eid']; /// prepare actions - $actions = ''.$stredit.''; + $actions = ''.$stredit.''; if ($element['type'] == 'item' or ($element['type'] == 'category' and $element['depth'] > 1)) { - $actions .= ''.$strdelete.''; - $actions .= ''.$strmove.''; + $actions .= ''.$strdelete.''; + $actions .= ''.$strmove.''; } if ($object->is_locked()) { - $actions .= ''.$strunlock.''; + $actions .= ''.$strunlock.''; } else { - $actions .= ''.$strlock.''; + $actions .= ''.$strlock.''; } if ($object->is_hidden()) { $name = ''.$object->get_name().''; - $actions .= ''.$strshow.''; + $actions .= ''.$strshow.''; } else { $name = $object->get_name(); - $actions .= ''.$strhide.''; + $actions .= ''.$strhide.''; } /// prepare icon @@ -260,7 +260,7 @@ function print_grade_tree($element, $moving) { $moveto = ''; if ($moving) { $actions = ''; // no action icons when moving - $moveto = '
  • '.$strmovehere.'
  • '; + $moveto = '
  • '.$strmovehere.'
  • '; } /// print the list items now -- 2.11.4.GIT