From fa9ea3e703a8f5239e56190a4bf1437a24507262 Mon Sep 17 00:00:00 2001 From: Andreas Grabs Date: Tue, 11 Dec 2012 20:54:07 +0100 Subject: [PATCH] MDL-36990 mod_feedback - correct some comments --- mod/feedback/edit.php | 64 +++++++++++++++++++++--------------------- mod/feedback/module.js | 34 +++++++++++----------- 2 files changed, 49 insertions(+), 49 deletions(-) diff --git a/mod/feedback/edit.php b/mod/feedback/edit.php index bd312d4ea4219..9e3b082b9f42d 100644 --- a/mod/feedback/edit.php +++ b/mod/feedback/edit.php @@ -63,7 +63,7 @@ require_capability('mod/feedback:edititems', $context); -//move up/down items +//Move up/down items if ($moveupitem) { $item = $DB->get_record('feedback_item', array('id'=>$moveupitem)); feedback_moveup_item($item); @@ -73,7 +73,7 @@ feedback_movedown_item($item); } -//moving of items +//Moving of items if ($movehere && isset($SESSION->feedback->moving->movingitem)) { $item = $DB->get_record('feedback_item', array('id'=>$SESSION->feedback->moving->movingitem)); feedback_move_item($item, intval($movehere)); @@ -94,14 +94,14 @@ exit; } -//the create_template-form +//The create_template-form $create_template_form = new feedback_edit_create_template_form(); $create_template_form->set_feedbackdata(array('context'=>$context, 'course'=>$course)); $create_template_form->set_form_elements(); $create_template_form->set_data(array('id'=>$id, 'do_show'=>'templates')); $create_template_formdata = $create_template_form->get_data(); if (isset($create_template_formdata->savetemplate) && $create_template_formdata->savetemplate == 1) { - //check the capabilities to create templates + //Check the capabilities to create templates. if (!has_capability('mod/feedback:createprivatetemplate', $context) AND !has_capability('mod/feedback:createpublictemplate', $context)) { print_error('cannotsavetempl', 'feedback'); @@ -109,7 +109,7 @@ if (trim($create_template_formdata->templatename) == '') { $savereturn = 'notsaved_name'; } else { - //if the feedback is located on the frontpage then templates can be public + //If the feedback is located on the frontpage then templates can be public. if (has_capability('mod/feedback:createpublictemplate', get_system_context())) { $create_template_formdata->ispublic = isset($create_template_formdata->ispublic) ? 1 : 0; } else { @@ -125,7 +125,7 @@ } } -//get the feedbackitems +//Get the feedbackitems $lastposition = 0; $feedbackitems = $DB->get_records('feedback_item', array('feedback'=>$feedback->id), 'position'); if (is_array($feedbackitems)) { @@ -140,17 +140,17 @@ $lastposition++; -//the add_item-form +//The add_item-form $add_item_form = new feedback_edit_add_question_form('edit_item.php'); $add_item_form->set_data(array('cmid'=>$id, 'position'=>$lastposition)); -//the use_template-form +//The use_template-form $use_template_form = new feedback_edit_use_template_form('use_templ.php'); $use_template_form->set_feedbackdata(array('course' => $course)); $use_template_form->set_form_elements(); $use_template_form->set_data(array('id'=>$id)); -/// Print the page header +//Print the page header. $strfeedbacks = get_string('modulenameplural', 'feedback'); $strfeedback = get_string('modulename', 'feedback'); @@ -158,7 +158,7 @@ $PAGE->set_heading(format_string($course->fullname)); $PAGE->set_title(format_string($feedback->name)); -// Adding the javascript module for the items dragdrop +//Adding the javascript module for the items dragdrop. if ($do_show == 'edit') { $jsmodule = array( 'name' => 'mod_feedback', @@ -181,14 +181,14 @@ /// print the tabs require('tabs.php'); -/// Print the main part of the page +/// Print the main part of the page. /////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////// $savereturn=isset($savereturn)?$savereturn:''; -//print the messages +//Print the messages. if ($savereturn == 'notsaved_name') { echo '

'. get_string('name_required', 'feedback'). @@ -208,7 +208,7 @@ } /////////////////////////////////////////////////////////////////////////// -///print the template-section +///Print the template-section. /////////////////////////////////////////////////////////////////////////// if ($do_show == 'templates') { echo $OUTPUT->box_start('generalbox boxaligncenter boxwidthwide'); @@ -237,7 +237,7 @@ echo $OUTPUT->box_end(); } /////////////////////////////////////////////////////////////////////////// -///print the Item-Edit-section +///Print the Item-Edit-section. /////////////////////////////////////////////////////////////////////////// if ($do_show == 'edit') { @@ -258,7 +258,7 @@ echo $OUTPUT->heading($anker); } - //check, if there exists required-elements + //Check, if there exists required-elements. $params = array('feedback' => $feedback->id, 'required' => 1); $countreq = $DB->count_records('feedback_item', $params); if ($countreq > 0) { @@ -267,12 +267,12 @@ echo ''; } - //use list instead a table + //Use list instead a table echo $OUTPUT->box_start('feedback_items'); if (isset($SESSION->feedback->moving) AND $SESSION->feedback->moving->shouldmoving == 1) { $moveposition = 1; $movehereurl = new moodle_url($url, array('movehere'=>$moveposition)); - //only shown if shouldmoving = 1 + //Only shown if shouldmoving = 1 echo $OUTPUT->box_start('feedback_item_box_'.$align.' clipboard'); $buttonlink = $movehereurl->out(); $strbutton = get_string('move_here', 'feedback'); @@ -282,19 +282,19 @@ '; echo $OUTPUT->box_end(); } - //print the inserted items + //Print the inserted items $itempos = 0; echo '

'; //The container for the dragging area - echo '