From 4d064218fbeed1aa2ec7413767260ea50ae8bbcf Mon Sep 17 00:00:00 2001 From: David Mudrak Date: Tue, 1 Nov 2011 16:25:58 +0100 Subject: [PATCH] MDL-29794 Rename templates.php back to pick.php We will need the general management page implemented in a separate script. This one will be used for picking an existing form only. --- grade/grading/manage.php | 2 +- grade/grading/{templates.php => pick.php} | 11 +++++---- .../{templates_form.php => pick_form.php} | 2 +- theme/standard/style/grade.css | 24 +++++++++---------- 4 files changed, 20 insertions(+), 19 deletions(-) rename grade/grading/{templates.php => pick.php} (96%) rename grade/grading/{templates_form.php => pick_form.php} (97%) diff --git a/grade/grading/manage.php b/grade/grading/manage.php index 1b93e1ec538..4187c6d92ba 100644 --- a/grade/grading/manage.php +++ b/grade/grading/manage.php @@ -211,7 +211,7 @@ if (!empty($method)) { } else { echo $output->management_action_icon($controller->get_editor_url($returnurl), get_string('manageactionnew', 'core_grading'), 'b/document-new'); - $pickurl = new moodle_url('/grade/grading/templates.php', array('targetid' => $controller->get_areaid())); + $pickurl = new moodle_url('/grade/grading/pick.php', array('targetid' => $controller->get_areaid())); if (!is_null($returnurl)) { $pickurl->param('returnurl', $returnurl->out(false)); } diff --git a/grade/grading/templates.php b/grade/grading/pick.php similarity index 96% rename from grade/grading/templates.php rename to grade/grading/pick.php index 397407f96a1..6276c58c7f8 100644 --- a/grade/grading/templates.php +++ b/grade/grading/pick.php @@ -26,7 +26,7 @@ require_once(dirname(dirname(dirname(__FILE__))).'/config.php'); require_once($CFG->dirroot.'/grade/grading/lib.php'); -require_once($CFG->dirroot.'/grade/grading/templates_form.php'); +require_once($CFG->dirroot.'/grade/grading/pick_form.php'); $targetid = required_param('targetid', PARAM_INT); // area we are coming from $pick = optional_param('pick', null, PARAM_INT); // create new form from this template @@ -60,7 +60,7 @@ $canshare = has_capability('moodle/grade:sharegradingforms', get_system_contex $canmanage = has_capability('moodle/grade:managesharedforms', get_system_context()); // setup the page -$PAGE->set_url(new moodle_url('/grade/grading/templates.php', array('targetid' => $targetid))); +$PAGE->set_url(new moodle_url('/grade/grading/pick.php', array('targetid' => $targetid))); navigation_node::override_active_url($targetmanager->get_management_url()); $PAGE->set_title(get_string('gradingmanagement', 'core_grading')); $PAGE->set_heading(get_string('gradingmanagement', 'core_grading')); @@ -211,11 +211,12 @@ $rs->close(); if (!$found) { echo $output->heading(get_string('nosharedformfound', 'core_grading')); - echo $output->single_button( - new moodle_url('/grade/grading/manage.php', array('areaid' => $targetid)), - get_string('back'), 'get'); } +echo $output->single_button( + new moodle_url('/grade/grading/manage.php', array('areaid' => $targetid)), + get_string('back'), 'get'); + echo $output->footer(); //////////////////////////////////////////////////////////////////////////////// diff --git a/grade/grading/templates_form.php b/grade/grading/pick_form.php similarity index 97% rename from grade/grading/templates_form.php rename to grade/grading/pick_form.php index c0a32bff33a..b3a3f5ec305 100644 --- a/grade/grading/templates_form.php +++ b/grade/grading/pick_form.php @@ -16,7 +16,7 @@ // along with Moodle. If not, see . /** - * Defines forms used by templates.php + * Defines forms used by pick.php * * @package core * @subpackage grading diff --git a/theme/standard/style/grade.css b/theme/standard/style/grade.css index 34387468972..c0ba9f89121 100644 --- a/theme/standard/style/grade.css +++ b/theme/standard/style/grade.css @@ -45,15 +45,15 @@ td.grade div.overridden {background-color: #DDDDDD;} #page-grade-grading-manage #actionresultmessagebox {background-color:#D2EBFF;width:60%;margin:1em auto 1em auto;text-align:center; padding:0.5em;border:2px solid #CCC;text-align:center;-moz-border-radius:5px;position:relative} #page-grade-grading-manage #actionresultmessagebox span {position:absolute;right:0px;top:-1.2em;color:#666;font-size:80%} -#page-grade-grading-templates .templatesearchform {text-align:center;margin:0px auto;} -#page-grade-grading-templates .template-name {clear: both; padding:3px; background-color: #F6F6F6;} -#page-grade-grading-templates .template-description {margin-bottom: 1em; padding: 0px 2em 0px 0px; margin-right:51%;} -#page-grade-grading-templates .template-preview {width:50%; float:right; border:1px solid #EEE; padding: 1em; margin-bottom: 1em;} -#page-grade-grading-templates .template-actions {margin-bottom: 1em; padding: 0px 2em 0px 0px; margin-right:51%;} -#page-grade-grading-templates .template-actions .action {display:inline-block;margin:0.25em;padding:0.25em;border:2px solid transparent;} -#page-grade-grading-templates .template-actions .action.pick {background-color:#EEE;border:2px solid #CCC;-moz-border-radius:3px} -#page-grade-grading-templates .template-actions .action:hover {text-decoration:none;background-color:#F6F6F6;border:2px solid #CCC;-moz-border-radius:3px} -#page-grade-grading-templates .template-actions .action .action-text {display:inline;} -#page-grade-grading-templates .template-actions .action .action-icon {margin:0px 3px;} -#page-grade-grading-templates .template-preview-confirm {width:50%;margin:1em auto;border:1px solid #EEE; padding: 1em;} - +#page-grade-grading-pick .templatesearchform {text-align:center;margin:0px auto;} +#page-grade-grading-pick .template-name {clear: both; padding:3px; background-color: #F6F6F6;} +#page-grade-grading-pick .template-description {margin-bottom: 1em; padding: 0px 2em 0px 0px; margin-right:51%;} +#page-grade-grading-pick .template-preview {width:50%; float:right; border:1px solid #EEE; padding: 1em; margin-bottom: 1em;} +#page-grade-grading-pick .template-actions {margin-bottom: 1em; padding: 0px 2em 0px 0px; margin-right:51%;} +#page-grade-grading-pick .template-actions .action {display:inline-block;margin:0.25em;padding:0.25em;border:2px solid transparent;} +#page-grade-grading-pick .template-actions .action.pick {background-color:#EEE;border:2px solid #CCC;-moz-border-radius:3px} +#page-grade-grading-pick .template-actions .action:hover {text-decoration:none;background-color:#F6F6F6;border:2px solid #CCC;-moz-border-radius:3px} +#page-grade-grading-pick .template-actions .action .action-text {display:inline;} +#page-grade-grading-pick .template-actions .action .action-icon {margin:0px 3px;} +#page-grade-grading-pick .template-preview-confirm {width:50%;margin:1em auto;border:1px solid #EEE; padding: 1em;} +#page-grade-grading-pick .singlebutton {clear:both;}