]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-9628 Renamed edit_* to *
authornicolasconnault <nicolasconnault>
Fri, 13 Jul 2007 05:53:16 +0000 (05:53 +0000)
committernicolasconnault <nicolasconnault>
Fri, 13 Jul 2007 05:53:16 +0000 (05:53 +0000)
grade/edit/calculation.php [moved from grade/edit/edit_calculation.php with 96% similarity]
grade/edit/calculation_form.php [moved from grade/edit/edit_calculation_form.php with 100% similarity]
grade/edit/category.php [moved from grade/edit/edit_category.php with 95% similarity]
grade/edit/category_form.php [moved from grade/edit/edit_category_form.php with 100% similarity]
grade/edit/grade.php [moved from grade/edit/edit_grade.php with 99% similarity]
grade/edit/grade_form.php [moved from grade/edit/edit_grade_form.php with 100% similarity]
grade/edit/item.php [moved from grade/edit/edit_item.php with 94% similarity]
grade/edit/item_form.php [moved from grade/edit/edit_item_form.php with 100% similarity]
grade/edit/tree.php [moved from grade/edit/edit_tree.php with 75% similarity]

similarity index 96%
rename from grade/edit/edit_calculation.php
rename to grade/edit/calculation.php
index 212216af661ea58c0e74d72279c00c90c21cec4e..e8c846d7eb59715194aeb077cf097318014f7182 100644 (file)
@@ -1,7 +1,7 @@
 <?php  //$Id$
 require_once '../../config.php';
 require_once $CFG->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);
similarity index 95%
rename from grade/edit/edit_category.php
rename to grade/edit/category.php
index 6446ddb72931a3a4fac5e650d99f11d3aa6d5966..6b71532115b7a106ffc1582ab2f5973bb709595f 100644 (file)
@@ -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();
similarity index 99%
rename from grade/edit/edit_grade.php
rename to grade/edit/grade.php
index 6e2dc156b66e68a9a31f55739557fc33cd5c8fc4..a7e96f518da44a22a441e4df74ecca8f893165b6 100644 (file)
@@ -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
similarity index 94%
rename from grade/edit/edit_item.php
rename to grade/edit/item.php
index d710074205931e8bddc6b11ee6803e08aa7868eb..1ea75d184b6cfb2a7fb82864295d5f5835f7561c 100644 (file)
@@ -1,7 +1,7 @@
 <?php  //$Id$
 require_once '../../config.php';
 require_once $CFG->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);
similarity index 75%
rename from grade/edit/edit_tree.php
rename to grade/edit/tree.php
index 5fbf92a7adacea983e66e8ed0b05e8a69bc59f06..76720f5b04c804006b563f55b7bb2a5da82184d6 100644 (file)
@@ -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.'&amp;id='.$object->id);
+                redirect('category.php?courseid='.$course->id.'&amp;id='.$object->id);
             } else {
-                redirect('edit_item.php?courseid='.$course->id.'&amp;id='.$object->id);
+                redirect('item.php?courseid='.$course->id.'&amp;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 '<div class="buttons">';
 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 '</div>';
 print_footer($course);
@@ -215,25 +215,25 @@ function print_grade_tree($element, $moving) {
     $eid    = $element['eid'];
 
 /// prepare actions
-    $actions = '<a href="edit_tree.php?id='.$COURSE->id.'&amp;action=edit&amp;eid='.$eid.'&amp;sesskey='.sesskey().'"><img src="'.$CFG->pixpath.'/t/edit.gif" class="iconsmall" alt="'.$stredit.'" title="'.$stredit.'"/></a>';
+    $actions = '<a href="tree.php?id='.$COURSE->id.'&amp;action=edit&amp;eid='.$eid.'&amp;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)) {
-        $actions .= '<a href="edit_tree.php?id='.$COURSE->id.'&amp;action=delete&amp;eid='.$eid.'&amp;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.'&amp;action=moveselect&amp;eid='.$eid.'&amp;sesskey='.sesskey().'"><img src="'.$CFG->pixpath.'/t/move.gif" class="iconsmall" alt="'.$strmove.'" title="'.$strmove.'"/></a>';
+        $actions .= '<a href="tree.php?id='.$COURSE->id.'&amp;action=delete&amp;eid='.$eid.'&amp;sesskey='.sesskey().'"><img src="'.$CFG->pixpath.'/t/delete.gif" class="iconsmall" alt="'.$strdelete.'" title="'.$strdelete.'"/></a>';
+        $actions .= '<a href="tree.php?id='.$COURSE->id.'&amp;action=moveselect&amp;eid='.$eid.'&amp;sesskey='.sesskey().'"><img src="'.$CFG->pixpath.'/t/move.gif" class="iconsmall" alt="'.$strmove.'" title="'.$strmove.'"/></a>';
     }
 
     if ($object->is_locked()) {
-        $actions .= '<a href="edit_tree.php?id='.$COURSE->id.'&amp;action=unlock&amp;eid='.$eid.'&amp;sesskey='.sesskey().'"><img src="'.$CFG->pixpath.'/t/unlock.gif" class="iconsmall" alt="'.$strunlock.'" title="'.$strunlock.'"/></a>';
+        $actions .= '<a href="tree.php?id='.$COURSE->id.'&amp;action=unlock&amp;eid='.$eid.'&amp;sesskey='.sesskey().'"><img src="'.$CFG->pixpath.'/t/unlock.gif" class="iconsmall" alt="'.$strunlock.'" title="'.$strunlock.'"/></a>';
     } else {
-        $actions .= '<a href="edit_tree.php?id='.$COURSE->id.'&amp;action=lock&amp;eid='.$eid.'&amp;sesskey='.sesskey().'"><img src="'.$CFG->pixpath.'/t/lock.gif" class="iconsmall" alt="'.$strlock.'" title="'.$strlock.'"/></a>';
+        $actions .= '<a href="tree.php?id='.$COURSE->id.'&amp;action=lock&amp;eid='.$eid.'&amp;sesskey='.sesskey().'"><img src="'.$CFG->pixpath.'/t/lock.gif" class="iconsmall" alt="'.$strlock.'" title="'.$strlock.'"/></a>';
     }
 
     if ($object->is_hidden()) {
         $name = '<span class="dimmed_text">'.$object->get_name().'</span>';
-        $actions .= '<a href="edit_tree.php?id='.$COURSE->id.'&amp;action=show&amp;eid='.$eid.'&amp;sesskey='.sesskey().'"><img src="'.$CFG->pixpath.'/t/show.gif" class="iconsmall" alt="'.$strshow.'" title="'.$strshow.'"/></a>';
+        $actions .= '<a href="tree.php?id='.$COURSE->id.'&amp;action=show&amp;eid='.$eid.'&amp;sesskey='.sesskey().'"><img src="'.$CFG->pixpath.'/t/show.gif" class="iconsmall" alt="'.$strshow.'" title="'.$strshow.'"/></a>';
     } else {
         $name = $object->get_name();
-        $actions .= '<a href="edit_tree.php?id='.$COURSE->id.'&amp;action=hide&amp;eid='.$eid.'&amp;sesskey='.sesskey().'"><img src="'.$CFG->pixpath.'/t/hide.gif" class="iconsmall" alt="'.$strhide.'" title="'.$strhide.'"/></a>';
+        $actions .= '<a href="tree.php?id='.$COURSE->id.'&amp;action=hide&amp;eid='.$eid.'&amp;sesskey='.sesskey().'"><img src="'.$CFG->pixpath.'/t/hide.gif" class="iconsmall" alt="'.$strhide.'" title="'.$strhide.'"/></a>';
     }
 
 /// prepare icon
@@ -260,7 +260,7 @@ function print_grade_tree($element, $moving) {
     $moveto = '';
     if ($moving) {
         $actions = ''; // no action icons when moving
-        $moveto = '<li><a href="edit_tree.php?id='.$COURSE->id.'&amp;action=move&amp;eid='.$moving.'&amp;moveafter='.$eid.'&amp;sesskey='.sesskey().'"><img class="movetarget" src="'.$CFG->wwwroot.'/pix/movehere.gif" alt="'.$strmovehere.'" title="'.$strmovehere.'" /></a></li>';
+        $moveto = '<li><a href="tree.php?id='.$COURSE->id.'&amp;action=move&amp;eid='.$moving.'&amp;moveafter='.$eid.'&amp;sesskey='.sesskey().'"><img class="movetarget" src="'.$CFG->wwwroot.'/pix/movehere.gif" alt="'.$strmovehere.'" title="'.$strmovehere.'" /></a></li>';
     }
 
 /// print the list items now