From: Petr Skoda Date: Sun, 1 Nov 2009 14:55:15 +0000 (+0000) Subject: MDL-20700 coding style cleanup - cvs keywords removed, closign php tag removed, trail... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=1adbd2c35095699e987e1f68151423ab054c42ba;p=moodle.git MDL-20700 coding style cleanup - cvs keywords removed, closign php tag removed, trailing whitespace cleanup --- diff --git a/mod/choice/backuplib.php b/mod/choice/backuplib.php index ec2d7b7760..b83fd4d6a8 100644 --- a/mod/choice/backuplib.php +++ b/mod/choice/backuplib.php @@ -1,4 +1,4 @@ - + diff --git a/mod/choice/db/access.php b/mod/choice/db/access.php index a75fc9ec67..d6471ca4b9 100644 --- a/mod/choice/db/access.php +++ b/mod/choice/db/access.php @@ -79,4 +79,4 @@ $mod_choice_capabilities = array( ) ); -?> + diff --git a/mod/choice/db/install.php b/mod/choice/db/install.php index c34218a04d..c3caa11fa1 100644 --- a/mod/choice/db/install.php +++ b/mod/choice/db/install.php @@ -1,4 +1,4 @@ - + diff --git a/mod/choice/index.php b/mod/choice/index.php index 06563c297a..a83c05c9b7 100644 --- a/mod/choice/index.php +++ b/mod/choice/index.php @@ -97,4 +97,4 @@ echo $OUTPUT->footer(); -?> + diff --git a/mod/choice/lib.php b/mod/choice/lib.php index 40ecb17696..b6029fdf77 100644 --- a/mod/choice/lib.php +++ b/mod/choice/lib.php @@ -791,7 +791,7 @@ function choice_get_post_actions() { /** * Implementation of the function for printing the form elements that control * whether the course reset functionality affects the choice. - * + * * @param object $mform form passed by reference */ function choice_reset_course_form_definition(&$mform) { diff --git a/mod/choice/mod_form.php b/mod/choice/mod_form.php index a9f84da258..19b45119bc 100644 --- a/mod/choice/mod_form.php +++ b/mod/choice/mod_form.php @@ -136,4 +136,4 @@ class mod_choice_mod_form extends moodleform_mod { } } -?> + diff --git a/mod/choice/report.php b/mod/choice/report.php index c15ebce9b1..89458f2afe 100644 --- a/mod/choice/report.php +++ b/mod/choice/report.php @@ -237,4 +237,3 @@ } echo $OUTPUT->footer(); -?> \ No newline at end of file diff --git a/mod/choice/restorelib.php b/mod/choice/restorelib.php index 3249c097e1..0712fe42cf 100644 --- a/mod/choice/restorelib.php +++ b/mod/choice/restorelib.php @@ -1,4 +1,4 @@ - + diff --git a/mod/choice/version.php b/mod/choice/version.php index dfebaf1e04..d83882e5a7 100644 --- a/mod/choice/version.php +++ b/mod/choice/version.php @@ -1,4 +1,4 @@ -version = 2009042001; $module->requires = 2009041700; // Requires this Moodle version $module->cron = 0; -?> + diff --git a/mod/choice/view.php b/mod/choice/view.php index be7cd8bc98..c951db2f5e 100644 --- a/mod/choice/view.php +++ b/mod/choice/view.php @@ -166,4 +166,4 @@ /// Mark as viewed $completion=new completion_info($course); $completion->set_module_viewed($cm); -?> + diff --git a/mod/data/backuplib.php b/mod/data/backuplib.php index 3065e8bf89..4ad6ebbb0c 100644 --- a/mod/data/backuplib.php +++ b/mod/data/backuplib.php @@ -1,4 +1,4 @@ -header(); data_print_comments($data, $record, $page, $mform); echo $OUTPUT->footer(); -?> \ No newline at end of file diff --git a/mod/data/comment_form.php b/mod/data/comment_form.php index 6a639a79d0..67c9ba4371 100644 --- a/mod/data/comment_form.php +++ b/mod/data/comment_form.php @@ -1,4 +1,4 @@ -libdir.'/formslib.php'; @@ -33,4 +33,3 @@ class mod_data_comment_form extends moodleform { } } -?> \ No newline at end of file diff --git a/mod/data/db/access.php b/mod/data/db/access.php index 35365e5819..24510b5c40 100644 --- a/mod/data/db/access.php +++ b/mod/data/db/access.php @@ -208,4 +208,4 @@ $mod_data_capabilities = array( ), ); -?> + diff --git a/mod/data/db/install.php b/mod/data/db/install.php index 31c5cf4d7d..2295c57800 100644 --- a/mod/data/db/install.php +++ b/mod/data/db/install.php @@ -1,4 +1,4 @@ - + diff --git a/mod/data/edit.php b/mod/data/edit.php index a90a4d80fb..8e1a5cf4f7 100755 --- a/mod/data/edit.php +++ b/mod/data/edit.php @@ -369,4 +369,3 @@ foreach ($fields as $eachfield) { } echo $OUTPUT->footer(); -?> \ No newline at end of file diff --git a/mod/data/export.php b/mod/data/export.php index 31bf3fe02e..09cd98328d 100644 --- a/mod/data/export.php +++ b/mod/data/export.php @@ -126,4 +126,3 @@ switch ($formdata['exporttype']) { } die(); -?> \ No newline at end of file diff --git a/mod/data/export_form.php b/mod/data/export_form.php index 75e6f9c9a8..5df3bfbe84 100644 --- a/mod/data/export_form.php +++ b/mod/data/export_form.php @@ -1,4 +1,4 @@ - + diff --git a/mod/data/field.php b/mod/data/field.php index 355026c6f1..1dd9bf4354 100755 --- a/mod/data/field.php +++ b/mod/data/field.php @@ -361,4 +361,3 @@ if (($mode == 'new') && (!empty($newtype)) && confirm_sesskey()) { /// /// Finish the page echo $OUTPUT->footer(); -?> \ No newline at end of file diff --git a/mod/data/field/checkbox/field.class.php b/mod/data/field/checkbox/field.class.php index 0d50f0c8e3..629094f8d8 100755 --- a/mod/data/field/checkbox/field.class.php +++ b/mod/data/field/checkbox/field.class.php @@ -1,4 +1,4 @@ -select(html_select::make($options, 'f_'.$this->field->id, $value)); + return $OUTPUT->select(html_select::make($options, 'f_'.$this->field->id, $value)); } - + function parse_search_field() { return optional_param('f_'.$this->field->id, '', PARAM_NOTAGS); } - + function generate_sql($tablealias, $value) { static $i=0; $i++; $name = "df_checkbox_$i"; - return array(" ({$tablealias}.fieldid = {$this->field->id} AND {$tablealias}.content = :$name) ", array($name=>$value)); + return array(" ({$tablealias}.fieldid = {$this->field->id} AND {$tablealias}.content = :$name) ", array($name=>$value)); } function update_content($recordid, $value, $name='') { @@ -133,4 +133,4 @@ class data_field_checkbox extends data_field_base { return $str; } } -?> + diff --git a/mod/data/field/date/field.class.php b/mod/data/field/date/field.class.php index 4b5a85a2e7..597f07ea79 100755 --- a/mod/data/field/date/field.class.php +++ b/mod/data/field/date/field.class.php @@ -1,4 +1,4 @@ -field->id.'_d', 'f_'.$this->field->id.'_m', 'f_'.$this->field->id.'_y', $value, true); } - + function generate_sql($tablealias, $value) { return array(' 1=1 ', array()); - //return " ({$tablealias}.fieldid = {$this->field->id} AND {$tablealias}.content = '$value') "; + //return " ({$tablealias}.fieldid = {$this->field->id} AND {$tablealias}.content = '$value') "; } - + function parse_search_field() { return ''; - /* + /* $day = optional_param('f_'.$this->field->id.'_d', 0, PARAM_INT); $month = optional_param('f_'.$this->field->id.'_m', 0, PARAM_INT); $year = optional_param('f_'.$this->field->id.'_y', 0, PARAM_INT); @@ -119,4 +119,4 @@ class data_field_date extends data_field_base { } -?> + diff --git a/mod/data/field/file/field.class.php b/mod/data/field/file/field.class.php index b4e0d75e4a..b449385e39 100755 --- a/mod/data/field/file/field.class.php +++ b/mod/data/field/file/field.class.php @@ -1,4 +1,4 @@ - + diff --git a/mod/data/field/latlong/field.class.php b/mod/data/field/latlong/field.class.php index e74c68730e..1de8546797 100755 --- a/mod/data/field/latlong/field.class.php +++ b/mod/data/field/latlong/field.class.php @@ -1,4 +1,4 @@ - + diff --git a/mod/data/field/menu/field.class.php b/mod/data/field/menu/field.class.php index 2c99ce1a94..c4431ce34f 100755 --- a/mod/data/field/menu/field.class.php +++ b/mod/data/field/menu/field.class.php @@ -1,4 +1,4 @@ -field->id, $content, get_string('menuchoose', 'data')); $select->nothingvalue = ''; @@ -57,7 +57,7 @@ class data_field_menu extends data_field_base { return $str; } - + function display_search_field($content = '') { global $CFG, $DB, $OUTPUT; @@ -88,7 +88,7 @@ class data_field_menu extends data_field_base { return ''; } - return $OUTPUT->select(html_select::make($options, 'f_'.$this->field->id, $content, ' ')); + return $OUTPUT->select(html_select::make($options, 'f_'.$this->field->id, $content, ' ')); } function parse_search_field() { @@ -99,9 +99,9 @@ class data_field_menu extends data_field_base { static $i=0; $i++; $name = "df_menu_$i"; - return array(" ({$tablealias}.fieldid = {$this->field->id} AND {$tablealias}.content = :$name) ", array($name=>$value)); + return array(" ({$tablealias}.fieldid = {$this->field->id} AND {$tablealias}.content = :$name) ", array($name=>$value)); } } -?> + diff --git a/mod/data/field/multimenu/field.class.php b/mod/data/field/multimenu/field.class.php index 030ef4d149..8e89804964 100755 --- a/mod/data/field/multimenu/field.class.php +++ b/mod/data/field/multimenu/field.class.php @@ -1,4 +1,4 @@ - + diff --git a/mod/data/field/number/field.class.php b/mod/data/field/number/field.class.php index 1fe18c933f..bb80ec3aa9 100755 --- a/mod/data/field/number/field.class.php +++ b/mod/data/field/number/field.class.php @@ -1,4 +1,4 @@ -field->id, '', PARAM_NOTAGS); } - + // need to cast? function generate_sql($tablealias, $value) { static $i=0; $i++; $name = "df_number_$i"; - return array(" ({$tablealias}.fieldid = {$this->field->id} AND {$tablealias}.content = :$name) ", array($name=>$value)); + return array(" ({$tablealias}.fieldid = {$this->field->id} AND {$tablealias}.content = :$name) ", array($name=>$value)); } function get_sort_sql($fieldname) { @@ -102,4 +102,4 @@ class data_field_number extends data_field_base { } -?> + diff --git a/mod/data/field/picture/field.class.php b/mod/data/field/picture/field.class.php index f0ce2f5b9e..8720f029c1 100755 --- a/mod/data/field/picture/field.class.php +++ b/mod/data/field/picture/field.class.php @@ -1,4 +1,4 @@ - + diff --git a/mod/data/field/radiobutton/field.class.php b/mod/data/field/radiobutton/field.class.php index e0dcd96fa0..df5dcfba30 100755 --- a/mod/data/field/radiobutton/field.class.php +++ b/mod/data/field/radiobutton/field.class.php @@ -1,4 +1,4 @@ -'; return $str; } - + function display_search_field($value = '') { global $CFG, $DB, $OUTPUT; $temp = $DB->get_records_sql_menu('SELECT id, content FROM {data_content} WHERE fieldid=? GROUP BY content ORDER BY content', array($this->field->id)); @@ -78,13 +78,13 @@ class data_field_radiobutton extends data_field_base { function parse_search_field() { return optional_param('f_'.$this->field->id, '', PARAM_NOTAGS); } - + function generate_sql($tablealias, $value) { static $i=0; $i++; $name = "df_number_$i"; - return array(" ({$tablealias}.fieldid = {$this->field->id} AND {$tablealias}.content = :$name) ", array($name=>$value)); + return array(" ({$tablealias}.fieldid = {$this->field->id} AND {$tablealias}.content = :$name) ", array($name=>$value)); } } -?> + diff --git a/mod/data/field/text/field.class.php b/mod/data/field/text/field.class.php index 2b42d5ea87..a6f4e252f5 100755 --- a/mod/data/field/text/field.class.php +++ b/mod/data/field/text/field.class.php @@ -1,4 +1,4 @@ -field->id.'" value="'.$value.'" />'; + return ''; } - + function parse_search_field() { return optional_param('f_'.$this->field->id, '', PARAM_NOTAGS); } - + function generate_sql($tablealias, $value) { global $DB; @@ -44,7 +44,7 @@ class data_field_text extends data_field_base { $name = "df_picture_$i"; return array(" ({$tablealias}.fieldid = {$this->field->id} AND {$tablealias}.content $ILIKE :$name) ", array($name=>"%$value%")); } - + } -?> + diff --git a/mod/data/field/textarea/field.class.php b/mod/data/field/textarea/field.class.php index 6b401f47a5..e07e7a7a46 100755 --- a/mod/data/field/textarea/field.class.php +++ b/mod/data/field/textarea/field.class.php @@ -1,4 +1,4 @@ -'; return $str; } - - + + function display_search_field($value = '') { - return ''; + return ''; } - + function parse_search_field() { return optional_param('f_'.$this->field->id, '', PARAM_NOTAGS); } - + function generate_sql($tablealias, $value) { global $DB; @@ -82,7 +82,7 @@ class data_field_textarea extends data_field_base { $name = "df_picture_$i"; return array(" ({$tablealias}.fieldid = {$this->field->id} AND {$tablealias}.content $ILIKE :$name) ", array($name=>"%$value%")); } - + function gen_textarea($usehtmleditor, $text='') { return print_textarea($usehtmleditor, $this->field->param3, $this->field->param2, '', '', 'field_'.$this->field->id, $text, '', true, 'field_' . $this->field->id); @@ -115,4 +115,4 @@ class data_field_textarea extends data_field_base { } } } -?> + diff --git a/mod/data/field/url/field.class.php b/mod/data/field/url/field.class.php index ab972617e4..01542a486a 100755 --- a/mod/data/field/url/field.class.php +++ b/mod/data/field/url/field.class.php @@ -1,4 +1,4 @@ - + diff --git a/mod/data/filter.php b/mod/data/filter.php index 0fa1283b1b..4132801136 100644 --- a/mod/data/filter.php +++ b/mod/data/filter.php @@ -1,4 +1,4 @@ - + diff --git a/mod/data/import.php b/mod/data/import.php index 1dba3c9fd7..b9bb9ac64b 100755 --- a/mod/data/import.php +++ b/mod/data/import.php @@ -255,4 +255,4 @@ function data_get_records_csv($filename, $fielddelimiter=',', $fieldenclosure="\ return $rows; } -?> + diff --git a/mod/data/index.php b/mod/data/index.php index 2731986dbd..0d814b5a15 100755 --- a/mod/data/index.php +++ b/mod/data/index.php @@ -143,4 +143,3 @@ echo "
"; echo $OUTPUT->table($table); echo $OUTPUT->footer(); -?> \ No newline at end of file diff --git a/mod/data/mod_form.php b/mod/data/mod_form.php index 244339522a..62ed939146 100644 --- a/mod/data/mod_form.php +++ b/mod/data/mod_form.php @@ -73,4 +73,4 @@ class mod_data_mod_form extends moodleform_mod { } } -?> + diff --git a/mod/data/preset.php b/mod/data/preset.php index 5799c0c55c..b2a351ce0c 100644 --- a/mod/data/preset.php +++ b/mod/data/preset.php @@ -134,7 +134,7 @@ switch ($action) { $optionsyes = array('fullname' => $userid.'/'.$shortname, 'action' => 'delete', 'd' => $data->id); - + $optionsno = array('d' => $data->id); echo $OUTPUT->confirm($strwarning, new moodle_url('preset.php', $optionsyes), new moodle_url('preset.php', $optionsno)); echo $OUTPUT->footer(); @@ -546,4 +546,4 @@ function data_presets_export($course, $cm, $data) { return $exportfile; } -?> + diff --git a/mod/data/rate.php b/mod/data/rate.php index 8e10342e22..9e05cd085d 100755 --- a/mod/data/rate.php +++ b/mod/data/rate.php @@ -104,4 +104,3 @@ if (!empty($_SERVER['HTTP_REFERER'])) { } } -?> \ No newline at end of file diff --git a/mod/data/report.php b/mod/data/report.php index 4cd8a7c3e6..ccdcfd7692 100755 --- a/mod/data/report.php +++ b/mod/data/report.php @@ -87,4 +87,3 @@ if (!$ratings = data_get_ratings($record->id, $sqlsort)) { echo $OUTPUT->close_window_button(); echo $OUTPUT->footer(); -?> \ No newline at end of file diff --git a/mod/data/restorelib.php b/mod/data/restorelib.php index 5a1da05e2d..59f05befb8 100644 --- a/mod/data/restorelib.php +++ b/mod/data/restorelib.php @@ -721,4 +721,4 @@ function data_decode_content_links_caller($restore) { return $status; } -?> + diff --git a/mod/data/rsslib.php b/mod/data/rsslib.php index ef0390779a..540d369ff2 100644 --- a/mod/data/rsslib.php +++ b/mod/data/rsslib.php @@ -113,4 +113,4 @@ return $status; } -?> + diff --git a/mod/data/settings.php b/mod/data/settings.php index 8b2af4e06b..cfddead073 100644 --- a/mod/data/settings.php +++ b/mod/data/settings.php @@ -1,4 +1,4 @@ -enablerssfeeds)) { $options = array(0 => get_string('rssglobaldisabled', 'admin')); @@ -11,4 +11,4 @@ if (empty($CFG->enablerssfeeds)) { $settings->add(new admin_setting_configselect('data_enablerssfeeds', get_string('enablerssfeeds', 'admin'), $str, 0, $options)); -?> + diff --git a/mod/data/simpletest/test_data_portfolio_callers.php b/mod/data/simpletest/test_data_portfolio_callers.php index 92312664c4..a17ca8df35 100644 --- a/mod/data/simpletest/test_data_portfolio_callers.php +++ b/mod/data/simpletest/test_data_portfolio_callers.php @@ -1,4 +1,4 @@ -libdir/simpletest/portfolio_testclass.php"); require_once("$CFG->dirroot/mod/data/lib.php"); require_once("$CFG->dirroot/$CFG->admin/generator.php"); @@ -69,4 +69,4 @@ class testDataPortfolioCallers extends portfoliolib_test { parent::test_caller_with_plugins(); } } -?> + diff --git a/mod/data/simpletest/testpreset.php b/mod/data/simpletest/testpreset.php index 1edcc1878b..b543693e7c 100644 --- a/mod/data/simpletest/testpreset.php +++ b/mod/data/simpletest/testpreset.php @@ -1,4 +1,4 @@ - + diff --git a/mod/data/tabs.php b/mod/data/tabs.php index f34dda26ac..40298737cf 100755 --- a/mod/data/tabs.php +++ b/mod/data/tabs.php @@ -1,4 +1,4 @@ -wwwroot.'/mod/data/view.php?d='.$data->id, get_string('list','data')); - + if (isset($record)) { $row[] = new tabobject('single', $CFG->wwwroot.'/mod/data/view.php?d='.$data->id.'&rid='.$record->id, get_string('single','data')); } else { @@ -55,7 +55,7 @@ } if (has_capability(DATA_CAP_EXPORT, $context)) { // The capability required to Export database records is centrally defined in 'lib.php' - // and should be weaker than those required to edit Templates, Fields and Presets. + // and should be weaker than those required to edit Templates, Fields and Presets. $row[] = new tabobject('export', $CFG->wwwroot.'/mod/data/export.php?d='.$data->id, get_string('export', 'data')); } @@ -105,4 +105,4 @@ // Print out the tabs and continue! print_tabs($tabs, $currenttab, $inactive, $activetwo); -?> + diff --git a/mod/data/templates.php b/mod/data/templates.php index 99068c30c8..9855a0e2e2 100755 --- a/mod/data/templates.php +++ b/mod/data/templates.php @@ -298,4 +298,3 @@ echo ''; /// Finish the page echo $OUTPUT->footer(); -?> \ No newline at end of file diff --git a/mod/data/version.php b/mod/data/version.php index b40155e72f..ae50653944 100644 --- a/mod/data/version.php +++ b/mod/data/version.php @@ -1,4 +1,4 @@ -version = 2009042000; $module->requires = 2009041700; // Requires this Moodle version $module->cron = 60; -?> + diff --git a/mod/data/view.php b/mod/data/view.php index 40c2ce88f0..247e201360 100755 --- a/mod/data/view.php +++ b/mod/data/view.php @@ -1,4 +1,4 @@ -set_heading($course->fullname); $PAGE->set_button($buttons); echo $OUTPUT->header(); - + /// Check to see if groups are being used here $returnurl = 'view.php?d='.$data->id.'&search='.s($search).'&sort='.s($sort).'&order='.s($order).'&'; groups_print_activity_menu($cm, $returnurl); @@ -682,4 +682,4 @@ $completion->set_module_viewed($cm); echo $OUTPUT->footer(); -?> + diff --git a/mod/feedback/README.txt b/mod/feedback/README.txt index b0df9b5397..9a0c603be7 100644 --- a/mod/feedback/README.txt +++ b/mod/feedback/README.txt @@ -17,7 +17,7 @@ Requirements ------------ Moodle 1.9 or later -Installation +Installation ------------ The zip-archive includes the same directory hierarchy as moodle So you only have to copy the files to the correspondent place. diff --git a/mod/feedback/analysis.php b/mod/feedback/analysis.php index b0da2860db..10141718db 100644 --- a/mod/feedback/analysis.php +++ b/mod/feedback/analysis.php @@ -154,4 +154,3 @@ echo $OUTPUT->box_end(); echo $OUTPUT->footer(); -?> \ No newline at end of file diff --git a/mod/feedback/analysis_course.php b/mod/feedback/analysis_course.php index 5ab28ba908..ed58238e4e 100644 --- a/mod/feedback/analysis_course.php +++ b/mod/feedback/analysis_course.php @@ -200,4 +200,3 @@ echo $OUTPUT->box_end(); echo $OUTPUT->footer(); -?> \ No newline at end of file diff --git a/mod/feedback/analysis_to_excel.php b/mod/feedback/analysis_to_excel.php index 1a452cceff..b945218b95 100644 --- a/mod/feedback/analysis_to_excel.php +++ b/mod/feedback/analysis_to_excel.php @@ -13,7 +13,7 @@ require_once("lib.php"); require_once('easy_excel.php'); $id = required_param('id', PARAM_INT); //the POST dominated the GET -$coursefilter = optional_param('coursefilter', '0', PARAM_INT); +$coursefilter = optional_param('coursefilter', '0', PARAM_INT); $url = new moodle_url($CFG->wwwroot.'/mod/feedback/analysis_to_excel.php', array('id'=>$id)); if ($coursefilter !== '0') { @@ -164,10 +164,10 @@ if(is_array($completeds)){ $workbook->close(); exit; -//////////////////////////////////////////////////////////////////////////////// -//////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// //functions -//////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// function feedback_excelprint_detailed_head(&$worksheet, $items, $rowOffset) { @@ -266,4 +266,3 @@ function feedback_excelprint_detailed_items(&$worksheet, $completed, $items, $ro } return $rowOffset + 1; } -?> \ No newline at end of file diff --git a/mod/feedback/backuplib.php b/mod/feedback/backuplib.php index caa1ef1b27..091d772096 100644 --- a/mod/feedback/backuplib.php +++ b/mod/feedback/backuplib.php @@ -1,4 +1,4 @@ -get_record('feedback', array('id'=>$feedback)); } - + $status = true; fwrite ($bf,start_tag("MOD",3,true)); //Print feedback data @@ -69,15 +69,15 @@ fwrite ($bf,full_tag("TIMEOPEN",4,false,$feedback->timeopen)); fwrite ($bf,full_tag("TIMECLOSE",4,false,$feedback->timeclose)); fwrite ($bf,full_tag("TIMEMODIFIED",4,false,$feedback->timemodified)); - + //backup the items of each feedback feedback_backup_data($bf, $preferences, $feedback->id); - + //End mod $status =fwrite ($bf,end_tag("MOD",3,true)); return $status; } - + function feedback_backup_data($bf, $preferences, $feedbackid) { global $CFG, $DB; @@ -102,7 +102,7 @@ fwrite ($bf,full_tag("HASVALUE",6,false,$feedbackitem->hasvalue)); fwrite ($bf,full_tag("POSITION",6,false,$feedbackitem->position)); fwrite ($bf,full_tag("REQUIRED",6,false,$feedbackitem->required)); - + if ($backup_userdata) { //backup the values of items $feedbackvalues = $DB->get_records('feedback_value', array('item'=>$feedbackitem->id)); @@ -128,7 +128,7 @@ } $status =fwrite ($bf,end_tag("ITEMS",4,true)); } - + if($backup_userdata) { //backup of feedback-completeds $feedbackcompleteds = $DB->get_records('feedback_completed', array('feedback'=>$feedbackid)); @@ -144,13 +144,13 @@ fwrite ($bf,full_tag("TIMEMODIFIED",6,false,$feedbackcompleted->timemodified)); fwrite ($bf,full_tag("RANDOMRESPONSE",6,false,$feedbackcompleted->random_response)); fwrite ($bf,full_tag("ANONYMOUSRESPONSE",6,false,$feedbackcompleted->anonymous_response)); - + //End completed $status =fwrite ($bf,end_tag("COMPLETED",5,true)); } $status =fwrite ($bf,end_tag("COMPLETEDS",4,true)); } - + //backup of tracking-data $feedbacktrackings = $DB->get_records('feedback_tracking', array('feedback'=>$feedbackid)); if($feedbacktrackings) { @@ -163,13 +163,13 @@ fwrite ($bf,full_tag("USERID",6,false,$feedbacktracking->userid)); fwrite ($bf,full_tag("FEEDBACK",6,false,$feedbacktracking->feedback)); fwrite ($bf,full_tag("COMPLETED",6,false,$feedbacktracking->completed)); - + //End completed $status =fwrite ($bf,end_tag("TRACKING",5,true)); } $status =fwrite ($bf,end_tag("TRACKINGS",4,true)); } - + } } @@ -194,7 +194,7 @@ fwrite ($bf,full_tag("HASVALUE",7,false,$templateitem->hasvalue)); fwrite ($bf,full_tag("POSITION",7,false,$templateitem->position)); fwrite ($bf,full_tag("REQUIRED",7,false,$templateitem->required)); - + //End item $status =fwrite ($bf,end_tag("ITEM",6,true)); } @@ -217,14 +217,14 @@ //First the course data $info[0][0] = get_string("modulenameplural","feedback"); $info[0][1] = feedback_count($course); - + //Now, if requested, the user_data - + if ($user_data) { $info[1][0] = get_string('ready_feedbacks','feedback'); $info[1][1] = feedback_completed_count($course); } - + return $info; } @@ -253,13 +253,13 @@ /////////////////////////////////////////////////////////////// //// INTERNAL FUNCTIONS. BASED IN THE MOD STRUCTURE - //Returns an array of feedbacks ids + //Returns an array of feedbacks ids function feedback_count ($course) { global $DB; return $DB->count_records('feedback', array('course'=>$course)); } - + function feedback_completed_count($course) { global $DB; @@ -273,5 +273,5 @@ } return $count; } - -?> + + diff --git a/mod/feedback/choose_group_form.php b/mod/feedback/choose_group_form.php index 1d2c082ba6..5f9805eae2 100644 --- a/mod/feedback/choose_group_form.php +++ b/mod/feedback/choose_group_form.php @@ -1,4 +1,4 @@ -libdir.'/formslib.php'; class feedback_choose_group_form extends moodleform { var $feedbackdata; - + function definition() { $this->feedbackdata = new object(); //this function can not be called, because not all data are available at this time //I use set_form_elements instead } - + //this function set the data used in set_form_elements() //in this form the only value have to set is course //eg: array('course' => $course) @@ -29,13 +29,13 @@ class feedback_choose_group_form extends moodleform { } } } - + //here the elements will be set //this function have to be called manually //the advantage is that the data are already set function set_form_elements(){ $mform =& $this->_form; - + $elementgroup = array(); //headline // $mform->addElement('header', 'general', get_string('choose_group', 'feedback')); @@ -44,7 +44,7 @@ class feedback_choose_group_form extends moodleform { $mform->setType('id', PARAM_INT); $mform->addElement('hidden', 'do_show'); $mform->setType('do-show', PARAM_INT); - + // visible elements $groups_options = array(); if(isset($this->feedbackdata->groups)){ @@ -58,8 +58,8 @@ class feedback_choose_group_form extends moodleform { // buttons $elementgroup[] =& $mform->createElement('submit', 'switch_group', get_string('switch_group', 'feedback')); $mform->addGroup($elementgroup, 'elementgroup', '', array(' '), false); - + //------------------------------------------------------------------------------- } } -?> + diff --git a/mod/feedback/complete.php b/mod/feedback/complete.php index d66684a56c..bfd24b36a2 100644 --- a/mod/feedback/complete.php +++ b/mod/feedback/complete.php @@ -439,4 +439,3 @@ if($feedback_can_submit) { echo $OUTPUT->footer(); -?> \ No newline at end of file diff --git a/mod/feedback/complete_guest.php b/mod/feedback/complete_guest.php index feefbc89cc..0c07c177b5 100644 --- a/mod/feedback/complete_guest.php +++ b/mod/feedback/complete_guest.php @@ -402,4 +402,3 @@ if($feedback_can_submit) { echo $OUTPUT->footer(); -?> \ No newline at end of file diff --git a/mod/feedback/db/access.php b/mod/feedback/db/access.php index faa7e96e1f..40be778807 100644 --- a/mod/feedback/db/access.php +++ b/mod/feedback/db/access.php @@ -46,7 +46,7 @@ $mod_feedback_capabilities = array( 'admin' => CAP_ALLOW ) ), - + 'mod/feedback:complete' => array( 'riskbitmask' => RISK_SPAM, @@ -60,7 +60,7 @@ $mod_feedback_capabilities = array( 'admin' => CAP_PREVENT ) ), - + 'mod/feedback:viewanalysepage' => array( 'riskbitmask' => RISK_PERSONAL, @@ -74,7 +74,7 @@ $mod_feedback_capabilities = array( 'admin' => CAP_ALLOW ) ), - + 'mod/feedback:deletesubmissions' => array( 'captype' => 'write', @@ -141,7 +141,7 @@ $mod_feedback_capabilities = array( ), 'mod/feedback:viewreports' => array( - + 'riskbitmask' => RISK_PERSONAL, 'captype' => 'read', @@ -154,7 +154,7 @@ $mod_feedback_capabilities = array( ), 'mod/feedback:receivemail' => array( - + 'riskbitmask' => RISK_PERSONAL, 'captype' => 'read', @@ -168,4 +168,4 @@ $mod_feedback_capabilities = array( ); -?> + diff --git a/mod/feedback/db/install.php b/mod/feedback/db/install.php index e7968129e9..a161fd8c88 100644 --- a/mod/feedback/db/install.php +++ b/mod/feedback/db/install.php @@ -1,4 +1,4 @@ - + diff --git a/mod/feedback/delete_completed.php b/mod/feedback/delete_completed.php index d08de50a6f..c094887f52 100644 --- a/mod/feedback/delete_completed.php +++ b/mod/feedback/delete_completed.php @@ -86,4 +86,4 @@ echo $OUTPUT->box_end(); echo $OUTPUT->footer(); -?> + diff --git a/mod/feedback/delete_completed_form.php b/mod/feedback/delete_completed_form.php index 38bf5277fd..021590fff8 100644 --- a/mod/feedback/delete_completed_form.php +++ b/mod/feedback/delete_completed_form.php @@ -1,4 +1,4 @@ -addElement('header', 'general', ''); - + // hidden elements $mform->addElement('hidden', 'id'); $mform->setType('id', PARAM_INT); @@ -33,4 +33,4 @@ class mod_feedback_delete_completed_form extends moodleform { } } -?> + diff --git a/mod/feedback/delete_item.php b/mod/feedback/delete_item.php index e45b20cf90..577c268b43 100644 --- a/mod/feedback/delete_item.php +++ b/mod/feedback/delete_item.php @@ -1,4 +1,4 @@ -footer(); -?> + diff --git a/mod/feedback/delete_item_form.php b/mod/feedback/delete_item_form.php index 7d48508fb7..3c26e18eaf 100644 --- a/mod/feedback/delete_item_form.php +++ b/mod/feedback/delete_item_form.php @@ -1,4 +1,4 @@ -addElement('header', 'general', ''); - + // hidden elements $mform->addElement('hidden', 'id'); $mform->setType('id', PARAM_INT); @@ -31,4 +31,4 @@ class mod_feedback_delete_item_form extends moodleform { } } -?> + diff --git a/mod/feedback/delete_template_form.php b/mod/feedback/delete_template_form.php index 75e85a181e..1c0697d6a8 100644 --- a/mod/feedback/delete_template_form.php +++ b/mod/feedback/delete_template_form.php @@ -1,4 +1,4 @@ -addElement('header', 'general', ''); - + // hidden elements $mform->addElement('hidden', 'id'); $mform->setType('id', PARAM_INT); @@ -31,4 +31,4 @@ class mod_feedback_delete_template_form extends moodleform { } } -?> + diff --git a/mod/feedback/easy_excel.php b/mod/feedback/easy_excel.php index 19a055f7f3..99265ce61f 100644 --- a/mod/feedback/easy_excel.php +++ b/mod/feedback/easy_excel.php @@ -17,7 +17,7 @@ require_once 'Spreadsheet/Excel/Writer.php'; class EasyWorkbook extends Spreadsheet_Excel_Writer { function &addWorksheet($name = ''){ global $CFG; - + $index = count($this->_worksheets); $sheetname = $this->_sheetname; @@ -69,7 +69,7 @@ class EasyWorksheet extends Spreadsheet_Excel_Writer_Worksheet { function set_workbook(&$workbook) { $this->m_workbook =& $workbook; } - + function write($row, $col, $token) { parent::write($row, $col, $token, $this->m_format); @@ -95,7 +95,7 @@ class EasyWorksheet extends Spreadsheet_Excel_Writer_Worksheet { parent::writeUrl($row, $col, $url, $string, $this->m_format); } - /** + /** * Setz das aktuelle Format, dass zum Schreiben verwendet wird * Der Formatstring setzt sich aus den folgenden Buchstaben mit folgender Bedeutung zusammen. * = Fett @@ -130,7 +130,7 @@ class EasyWorksheet extends Spreadsheet_Excel_Writer_Worksheet { if((count($this->m_formatbox) > 0) AND array_key_exists($signature, $this->m_formatbox)) { $this->m_format = $this->m_formatbox[$signature]; }else { - + $this->m_format = &$this->m_workbook->addFormat(); if($textWrap) { @@ -219,7 +219,7 @@ class EasyWorksheet extends Spreadsheet_Excel_Writer_Worksheet { } $this->m_format->setSize($size); - + //save the format with its signature $this->m_formatbox[$signature] = $this->m_format; } @@ -231,11 +231,11 @@ function feedback_convert_to_win($text) { static $textlib; static $newwincharset; static $oldcharset; - + if(!isset($textlib)) { $textlib = textlib_get_instance(); } - + if(!isset($newwincharset)) { if(!isset($CFG->latinexcelexport) || !$CFG->latinexcelexport) { $newwincharset = 'UTF-16LE'; @@ -246,16 +246,16 @@ function feedback_convert_to_win($text) { } } } - + if(!isset($oldcharset)) { $oldcharset = get_string('thischarset'); } - + //converting
into newline $newtext = str_ireplace('
', "\n", $text); $newtext = str_ireplace('
', "\n", $newtext); - + return $textlib->convert($newtext, $oldcharset, $newwincharset); } -?> + diff --git a/mod/feedback/edit.php b/mod/feedback/edit.php index c0775026e8..86575a82d6 100644 --- a/mod/feedback/edit.php +++ b/mod/feedback/edit.php @@ -420,4 +420,3 @@ function feedback_edit_print_default_form_values($id, $tab) { echo ''; echo ''; } -?> \ No newline at end of file diff --git a/mod/feedback/edit_form.php b/mod/feedback/edit_form.php index 8f740d5d82..5ebb52ed40 100644 --- a/mod/feedback/edit_form.php +++ b/mod/feedback/edit_form.php @@ -1,4 +1,4 @@ -addElement('select', 'typ', '', $feedback_names_options, $attributes); @@ -41,13 +41,13 @@ class feedback_edit_add_question_form extends moodleform { class feedback_edit_use_template_form extends moodleform { var $feedbackdata; - + function definition() { $this->feedbackdata = new object(); //this function can not be called, because not all data are available at this time //I use set_form_elements instead } - + //this function set the data used in set_form_elements() //in this form the only value have to set is course //eg: array('course' => $course) @@ -58,20 +58,20 @@ class feedback_edit_use_template_form extends moodleform { } } } - + //here the elements will be set //this function have to be called manually //the advantage is that the data are already set function set_form_elements(){ $mform =& $this->_form; - + $elementgroup = array(); //headline $mform->addElement('header', '', get_string('using_templates', 'feedback')); // hidden elements $mform->addElement('hidden', 'id'); $mform->setType('id', PARAM_INT); - + // visible elements $templates_options = array(); if($templates = feedback_get_template_list($this->feedbackdata->course)){//get the templates @@ -87,21 +87,21 @@ class feedback_edit_use_template_form extends moodleform { $mform->addElement('static', 'info', get_string('no_templates_available_yet', 'feedback')); } $mform->addGroup($elementgroup, 'elementgroup', '', array(' '), false); - + //------------------------------------------------------------------------------- } } class feedback_edit_create_template_form extends moodleform { var $feedbackdata; - + function definition() { } - + function data_preprocessing(&$default_values){ $default_values['templatename'] = ''; } - + function set_feedbackdata($data) { if(is_array($data)) { foreach($data as $key => $val) { @@ -109,7 +109,7 @@ class feedback_edit_create_template_form extends moodleform { } } } - + function set_form_elements(){ $mform =& $this->_form; $capabilities = $this->feedbackdata->capabilities; @@ -124,23 +124,23 @@ class feedback_edit_create_template_form extends moodleform { //headline $mform->addElement('header', '', get_string('creating_templates', 'feedback')); - + // visible elements $elementgroup = array(); - + $elementgroup[] =& $mform->createElement('static', 'templatenamelabel', get_string('name', 'feedback')); $elementgroup[] =& $mform->createElement('text', 'templatename', get_string('name', 'feedback'), array('size'=>'40', 'maxlength'=>'200')); if($capabilities->createpublictemplate) { $elementgroup[] =& $mform->createElement('checkbox', 'ispublic', get_string('public', 'feedback'), get_string('public', 'feedback')); } - + // buttons $elementgroup[] =& $mform->createElement('submit', 'create_template', get_string('save_as_new_template', 'feedback')); $mform->addGroup($elementgroup, 'elementgroup', get_string('name', 'feedback'), array(' '), false); - + $mform->setType('templatename', PARAM_TEXT); - + //------------------------------------------------------------------------------- } } -?> + diff --git a/mod/feedback/edit_item.php b/mod/feedback/edit_item.php index a4e8a43bb1..4225646ada 100644 --- a/mod/feedback/edit_item.php +++ b/mod/feedback/edit_item.php @@ -253,4 +253,3 @@ if ($typ!='label') { echo $OUTPUT->footer(); -?> \ No newline at end of file diff --git a/mod/feedback/export.php b/mod/feedback/export.php index 3f6b234a5a..6b3c36b9d0 100644 --- a/mod/feedback/export.php +++ b/mod/feedback/export.php @@ -12,7 +12,7 @@ require_once("../../config.php"); require_once("lib.php"); // get parameters -$id = required_param('id', PARAM_INT); +$id = required_param('id', PARAM_INT); $action = optional_param('action', false, PARAM_ALPHA); $url = new moodle_url($CFG->wwwroot.'/mod/feedback/export.php', array('id'=>$id)); @@ -109,4 +109,3 @@ function feedback_send_xml_data($data, $filename) { @header('Content-Disposition: attachment; filename='.$filename); print($data); } -?> \ No newline at end of file diff --git a/mod/feedback/index.php b/mod/feedback/index.php index dacfd90f91..a1b3472de9 100644 --- a/mod/feedback/index.php +++ b/mod/feedback/index.php @@ -113,4 +113,3 @@ echo $OUTPUT->table($table); echo $OUTPUT->footer(); -?> \ No newline at end of file diff --git a/mod/feedback/item/captcha/captcha_form.php b/mod/feedback/item/captcha/captcha_form.php index 5f868f9855..dc21fa37c2 100644 --- a/mod/feedback/item/captcha/captcha_form.php +++ b/mod/feedback/item/captcha/captcha_form.php @@ -8,21 +8,21 @@ class feedback_captcha_form extends feedback_item_form { var $itemname; var $itemlabel; var $select; - + function definition() { $mform =& $this->_form; - + $mform->addElement('header', 'general', get_string($this->type, 'feedback')); $this->requiredcheck = $mform->addElement('checkbox', 'required', get_string('required', 'feedback')); - + $this->itemname = $mform->addElement('text', 'itemname', get_string('item_name', 'feedback'), array('size="'.FEEDBACK_ITEM_NAME_TEXTBOX_SIZE.'"','maxlength="255"')); $this->itemlabel = $mform->addElement('text', 'itemlabel', get_string('item_label', 'feedback'), array('size="'.FEEDBACK_ITEM_LABEL_TEXTBOX_SIZE.'"','maxlength="255"')); - + $this->select = $mform->addElement('select', - 'count_of_nums', - get_string('count_of_nums', 'feedback').' ', + 'count_of_nums', + get_string('count_of_nums', 'feedback').' ', array_slice(range(0,10),3,10,true)); - + } } -?> + diff --git a/mod/feedback/item/captcha/lib.php b/mod/feedback/item/captcha/lib.php index 292eeffdbe..f634193f94 100644 --- a/mod/feedback/item/captcha/lib.php +++ b/mod/feedback/item/captcha/lib.php @@ -1,4 +1,4 @@ -dirroot.'/mod/feedback/item/feedback_item_class.php'); diff --git a/mod/feedback/item/captcha/print_captcha.php b/mod/feedback/item/captcha/print_captcha.php index b1d44fa1d8..9c9c161eda 100644 --- a/mod/feedback/item/captcha/print_captcha.php +++ b/mod/feedback/item/captcha/print_captcha.php @@ -114,4 +114,4 @@ function get_random_color($val1 = 0, $val2 = 255) { return rand($min, $max); } -?> + diff --git a/mod/feedback/item/feedback_item_class.php b/mod/feedback/item/feedback_item_class.php index 62e8d7b98c..e84623da31 100644 --- a/mod/feedback/item/feedback_item_class.php +++ b/mod/feedback/item/feedback_item_class.php @@ -1,4 +1,4 @@ -feedback_item_base(); } - + /** * prints the item-related sequenz on the edit-item form - * + * * @param $item the db-object from feedback_item * @param $usehtmleditor defines whether the editor should be shown or not */ @@ -96,8 +96,8 @@ class feedback_item_base { class feedback_item_pagebreak extends feedback_item_base { var $type = "pagebreak"; function init() { - + } } -?> + diff --git a/mod/feedback/item/feedback_item_form_class.php b/mod/feedback/item/feedback_item_form_class.php index 6c76344713..b803489b3a 100644 --- a/mod/feedback/item/feedback_item_form_class.php +++ b/mod/feedback/item/feedback_item_form_class.php @@ -9,4 +9,4 @@ abstract class feedback_item_form extends moodleform { return $this->_form; } } -?> + diff --git a/mod/feedback/item/info/info_form.php b/mod/feedback/item/info/info_form.php index a7ead8cf2f..5ee5e599c1 100644 --- a/mod/feedback/item/info/info_form.php +++ b/mod/feedback/item/info/info_form.php @@ -8,17 +8,17 @@ class feedback_info_form extends feedback_item_form { var $itemname; var $itemlabel; var $infotype; - + function definition() { $mform =& $this->_form; - + $mform->addElement('header', 'general', get_string($this->type, 'feedback')); $this->requiredcheck = &$mform->addElement('hidden', 'required'); $mform->setType('required', PARAM_INT); - + $this->itemname = &$mform->addElement('text', 'itemname', get_string('item_name', 'feedback'), array('size="'.FEEDBACK_ITEM_NAME_TEXTBOX_SIZE.'"','maxlength="255"')); $this->itemlabel = $mform->addElement('text', 'itemlabel', get_string('item_label', 'feedback'), array('size="'.FEEDBACK_ITEM_LABEL_TEXTBOX_SIZE.'"','maxlength="255"')); - + $options=array(); $options[1] = get_string('responsetime', 'feedback'); $options[2] = get_string('coursename', 'feedback'); @@ -27,4 +27,4 @@ class feedback_info_form extends feedback_item_form { } } -?> + diff --git a/mod/feedback/item/info/lib.php b/mod/feedback/item/info/lib.php index dd3773f0ec..7b2bf6af15 100644 --- a/mod/feedback/item/info/lib.php +++ b/mod/feedback/item/info/lib.php @@ -1,4 +1,4 @@ -dirroot.'/mod/feedback/item/feedback_item_class.php'); diff --git a/mod/feedback/item/label/label_form.php b/mod/feedback/item/label/label_form.php index 0719c98aa7..3c02cda7d9 100644 --- a/mod/feedback/item/label/label_form.php +++ b/mod/feedback/item/label/label_form.php @@ -5,15 +5,15 @@ require_once($CFG->dirroot.'/mod/feedback/item/feedback_item_form_class.php'); class feedback_label_form extends feedback_item_form { var $type = "label"; var $area; - + function definition() { $mform =& $this->_form; - + $mform->addElement('header', 'general', get_string($this->type, 'feedback')); - + $mform->addElement('hidden', 'itemname', $this->type); $mform->setType('itemname', PARAM_INT); $this->area = $mform->addElement('htmleditor', 'presentation', '', array('rows'=>20)); } } -?> + diff --git a/mod/feedback/item/label/lib.php b/mod/feedback/item/label/lib.php index f62c9c7a4c..64dbdfca4a 100644 --- a/mod/feedback/item/label/lib.php +++ b/mod/feedback/item/label/lib.php @@ -1,22 +1,22 @@ -dirroot.'/mod/feedback/item/feedback_item_class.php'); class feedback_item_label extends feedback_item_base { var $type = "label"; function init() { - + } - + function show_edit($item) { global $CFG; - + require_once('label_form.php'); - + $item_form = new feedback_label_form(); - + $item->presentation = isset($item->presentation) ? $item->presentation : ''; - + $item_form->area->setValue($item->presentation); return $item_form; } diff --git a/mod/feedback/item/multichoice/lib.php b/mod/feedback/item/multichoice/lib.php index 432dc8e598..7fcf45b8af 100644 --- a/mod/feedback/item/multichoice/lib.php +++ b/mod/feedback/item/multichoice/lib.php @@ -1,4 +1,4 @@ -dirroot.'/mod/feedback/item/feedback_item_class.php'); diff --git a/mod/feedback/item/multichoice/multichoice_form.php b/mod/feedback/item/multichoice/multichoice_form.php index b2cad9b0de..2bca9342cf 100644 --- a/mod/feedback/item/multichoice/multichoice_form.php +++ b/mod/feedback/item/multichoice/multichoice_form.php @@ -10,33 +10,33 @@ class feedback_multichoice_form extends feedback_item_form { var $selectadjust; var $selecttype; var $values; - + function definition() { $mform =& $this->_form; - + $mform->addElement('header', 'general', get_string($this->type, 'feedback')); - + $this->requiredcheck = $mform->addElement('checkbox', 'required', get_string('required', 'feedback')); - + $this->itemname = $mform->addElement('text', 'itemname', get_string('item_name', 'feedback'), array('size="'.FEEDBACK_ITEM_NAME_TEXTBOX_SIZE.'"','maxlength="255"')); $this->itemlabel = $mform->addElement('text', 'itemlabel', get_string('item_label', 'feedback'), array('size="'.FEEDBACK_ITEM_LABEL_TEXTBOX_SIZE.'"','maxlength="255"')); $this->selectadjust = $mform->addElement('select', - 'horizontal', - get_string('adjustment', 'feedback').' ', + 'horizontal', + get_string('adjustment', 'feedback').' ', array(0 => get_string('vertical', 'feedback'), 1 => get_string('horizontal', 'feedback'))); - + $this->selecttype = $mform->addElement('select', - 'subtype', - get_string('multichoicetype', 'feedback').' ', + 'subtype', + get_string('multichoicetype', 'feedback').' ', array('r'=>get_string('radio', 'feedback'), 'c'=>get_string('check', 'feedback'), 'd'=>get_string('dropdown', 'feedback'))); $mform->addElement('static', 'hint', get_string('multichoice_values', 'feedback'), get_string('use_one_line_for_each_value', 'feedback')); - + $this->values = $mform->addElement('textarea', 'itemvalues', '', 'wrap="virtual" rows="10" cols="65"'); } } -?> + diff --git a/mod/feedback/item/multichoicerated/lib.php b/mod/feedback/item/multichoicerated/lib.php index a0aeae4171..e520cf2f4b 100644 --- a/mod/feedback/item/multichoicerated/lib.php +++ b/mod/feedback/item/multichoicerated/lib.php @@ -1,4 +1,4 @@ -dirroot.'/mod/feedback/item/feedback_item_class.php'); diff --git a/mod/feedback/item/multichoicerated/multichoicerated_form.php b/mod/feedback/item/multichoicerated/multichoicerated_form.php index 5d9b0a498c..c8b497a402 100644 --- a/mod/feedback/item/multichoicerated/multichoicerated_form.php +++ b/mod/feedback/item/multichoicerated/multichoicerated_form.php @@ -10,32 +10,32 @@ class feedback_multichoicerated_form extends feedback_item_form { var $selectadjust; var $selecttype; var $values; - + function definition() { $mform =& $this->_form; - + $mform->addElement('header', 'general', get_string($this->type, 'feedback')); - + $this->requiredcheck = $mform->addElement('checkbox', 'required', get_string('required', 'feedback')); - + $this->itemname = $mform->addElement('text', 'itemname', get_string('item_name', 'feedback'), array('size="'.FEEDBACK_ITEM_NAME_TEXTBOX_SIZE.'"','maxlength="255"')); $this->itemlabel = $mform->addElement('text', 'itemlabel', get_string('item_label', 'feedback'), array('size="'.FEEDBACK_ITEM_LABEL_TEXTBOX_SIZE.'"','maxlength="255"')); $this->selectadjust = $mform->addElement('select', - 'horizontal', - get_string('adjustment', 'feedback').' ', + 'horizontal', + get_string('adjustment', 'feedback').' ', array(0 => get_string('vertical', 'feedback'), 1 => get_string('horizontal', 'feedback'))); - + $this->selecttype = $mform->addElement('select', - 'subtype', - get_string('multichoicetype', 'feedback').' ', + 'subtype', + get_string('multichoicetype', 'feedback').' ', array('r'=>get_string('radio', 'feedback'), 'd'=>get_string('dropdown', 'feedback'))); $mform->addElement('static', 'hint', get_string('multichoice_values', 'feedback'), get_string('use_one_line_for_each_value', 'feedback')); - + $this->values = $mform->addElement('textarea', 'itemvalues', '', 'wrap="virtual" rows="10" cols="65"'); } } -?> + diff --git a/mod/feedback/item/numeric/lib.php b/mod/feedback/item/numeric/lib.php index 4c99b9ac4b..93df5a6683 100644 --- a/mod/feedback/item/numeric/lib.php +++ b/mod/feedback/item/numeric/lib.php @@ -1,4 +1,4 @@ -dirroot.'/mod/feedback/item/feedback_item_class.php'); diff --git a/mod/feedback/item/numeric/numeric_form.php b/mod/feedback/item/numeric/numeric_form.php index c7366ada22..41d1e385ad 100644 --- a/mod/feedback/item/numeric/numeric_form.php +++ b/mod/feedback/item/numeric/numeric_form.php @@ -9,20 +9,20 @@ class feedback_numeric_form extends feedback_item_form { var $itemlabel; var $selectfrom; var $selectto; - + function definition() { $mform =& $this->_form; - + $mform->addElement('header', 'general', get_string($this->type, 'feedback')); $this->requiredcheck = $mform->addElement('checkbox', 'required', get_string('required', 'feedback')); - + $this->itemname = $mform->addElement('text', 'itemname', get_string('item_name', 'feedback'), array('size="'.FEEDBACK_ITEM_NAME_TEXTBOX_SIZE.'"','maxlength="255"')); $this->itemlabel = $mform->addElement('text', 'itemlabel', get_string('item_label', 'feedback'), array('size="'.FEEDBACK_ITEM_LABEL_TEXTBOX_SIZE.'"','maxlength="255"')); - + $this->selectfrom = $mform->addElement('text', 'numericrangefrom', get_string('numeric_range_from', 'feedback'), array('size="10"','maxlength="10"')); - + $this->selectto = $mform->addElement('text', 'numericrangeto', get_string('numeric_range_to', 'feedback'), array('size="10"','maxlength="10"')); } } -?> + diff --git a/mod/feedback/item/textarea/lib.php b/mod/feedback/item/textarea/lib.php index 3bd9e50144..746dfc2b04 100644 --- a/mod/feedback/item/textarea/lib.php +++ b/mod/feedback/item/textarea/lib.php @@ -1,4 +1,4 @@ -dirroot.'/mod/feedback/item/feedback_item_class.php'); diff --git a/mod/feedback/item/textarea/textarea_form.php b/mod/feedback/item/textarea/textarea_form.php index bd6124dc06..57ff0d0caa 100644 --- a/mod/feedback/item/textarea/textarea_form.php +++ b/mod/feedback/item/textarea/textarea_form.php @@ -9,26 +9,26 @@ class feedback_textarea_form extends feedback_item_form { var $itemlabel; var $selectwidth; var $selectheight; - + function definition() { $mform =& $this->_form; - + $mform->addElement('header', 'general', get_string($this->type, 'feedback')); $this->requiredcheck = $mform->addElement('checkbox', 'required', get_string('required', 'feedback')); - + $this->itemname = $mform->addElement('text', 'itemname', get_string('item_name', 'feedback'), array('size="'.FEEDBACK_ITEM_NAME_TEXTBOX_SIZE.'"','maxlength="255"')); $this->itemlabel = $mform->addElement('text', 'itemlabel', get_string('item_label', 'feedback'), array('size="'.FEEDBACK_ITEM_LABEL_TEXTBOX_SIZE.'"','maxlength="255"')); - + $this->selectwidth = $mform->addElement('select', - 'itemwidth', - get_string('textarea_width', 'feedback').' ', + 'itemwidth', + get_string('textarea_width', 'feedback').' ', array_slice(range(0,80),5,80,true)); $this->selectheight = $mform->addElement('select', - 'itemheight', - get_string('textarea_height', 'feedback').' ', + 'itemheight', + get_string('textarea_height', 'feedback').' ', array_slice(range(0,40),5,40,true)); } } -?> + diff --git a/mod/feedback/item/textfield/lib.php b/mod/feedback/item/textfield/lib.php index f972004441..fe18b4c51d 100644 --- a/mod/feedback/item/textfield/lib.php +++ b/mod/feedback/item/textfield/lib.php @@ -1,4 +1,4 @@ -dirroot.'/mod/feedback/item/feedback_item_class.php'); diff --git a/mod/feedback/item/textfield/textfield_form.php b/mod/feedback/item/textfield/textfield_form.php index d468958a75..4d1664cc51 100644 --- a/mod/feedback/item/textfield/textfield_form.php +++ b/mod/feedback/item/textfield/textfield_form.php @@ -9,26 +9,26 @@ class feedback_textfield_form extends feedback_item_form { var $itemlabel; var $selectwith; var $selectheight; - + function definition() { $mform =& $this->_form; - + $mform->addElement('header', 'general', get_string($this->type, 'feedback')); $this->requiredcheck = $mform->addElement('checkbox', 'required', get_string('required', 'feedback')); - + $this->itemname = $mform->addElement('text', 'itemname', get_string('item_name', 'feedback'), array('size="'.FEEDBACK_ITEM_NAME_TEXTBOX_SIZE.'"','maxlength="255"')); $this->itemlabel = $mform->addElement('text', 'itemlabel', get_string('item_label', 'feedback'), array('size="'.FEEDBACK_ITEM_LABEL_TEXTBOX_SIZE.'"','maxlength="255"')); - + $this->selectwith = $mform->addElement('select', - 'itemsize', - get_string('textfield_size', 'feedback').' ', + 'itemsize', + get_string('textfield_size', 'feedback').' ', array_slice(range(0,255),5,255,true)); $this->selectheight = $mform->addElement('select', - 'itemmaxlength', - get_string('textfield_maxlength', 'feedback').' ', + 'itemmaxlength', + get_string('textfield_maxlength', 'feedback').' ', array_slice(range(0,255),5,255,true)); } } -?> + diff --git a/mod/feedback/mapcourse.php b/mod/feedback/mapcourse.php index 6f9e5bbd90..cdeae91648 100644 --- a/mod/feedback/mapcourse.php +++ b/mod/feedback/mapcourse.php @@ -131,4 +131,3 @@ echo $OUTPUT->box_end(); echo $OUTPUT->footer(); -?> \ No newline at end of file diff --git a/mod/feedback/mod_form.php b/mod/feedback/mod_form.php index 1eedc587e3..099025e2fc 100644 --- a/mod/feedback/mod_form.php +++ b/mod/feedback/mod_form.php @@ -1,4 +1,4 @@ -addElement('htmleditor', 'page_after_submit', get_string("page_after_submit", "feedback"), array('rows' => 20)); $mform->setType('page_after_submit', PARAM_RAW); - + $mform->addElement('text', 'site_after_submit', get_string('url_for_continue_button', 'feedback'), array('size'=>'64','maxlength'=>'255')); $mform->setType('site_after_submit', PARAM_TEXT); $mform->setHelpButton('site_after_submit', array('url_for_continue', get_string('url_for_continue_button', 'feedback'), 'feedback')); @@ -111,4 +111,3 @@ class mod_feedback_mod_form extends moodleform_mod { } } -?> \ No newline at end of file diff --git a/mod/feedback/print.php b/mod/feedback/print.php index 7e1557e425..615eeb682c 100644 --- a/mod/feedback/print.php +++ b/mod/feedback/print.php @@ -97,4 +97,3 @@ echo $OUTPUT->continue_button('view.php?id='.$id); echo $OUTPUT->footer(); -?> \ No newline at end of file diff --git a/mod/feedback/restorelib.php b/mod/feedback/restorelib.php index 7a6f8853c5..0e36011d7f 100644 --- a/mod/feedback/restorelib.php +++ b/mod/feedback/restorelib.php @@ -1,4 +1,4 @@ -text of each feedback_posting // //----------------------------------------------------------- - + define('FEEDBACK_MULTICHOICERESTORE_TYPE_SEP', '>>>>>'); function feedback_restore_mods($mod,$restore) { global $CFG, $DB; - + // $allValues = array(); // $allTrackings = array(); $status = true; $restore_userdata = restore_userdata_selected($restore,'feedback',$mod->id); - + //Get record from backup_ids $data = backup_getid($restore->backup_unique_code,$mod->modtype,$mod->id); if ($data) { - //Now get completed xmlized object + //Now get completed xmlized object $info = $data->info; - + //check of older backupversion of feedback $version = intval(backup_todb($info['MOD']['#']['VERSION']['0']['#'])); - + //Now, build the feedback record structure $feedback->course = $restore->course_id; $feedback->name = backup_todb($info['MOD']['#']['NAME']['0']['#']); @@ -63,7 +63,7 @@ //The structure is equal to the db, so insert the feedback $newid = $DB->insert_record ("feedback",$feedback); - + //create events // the open-event if($feedback->timeopen > 0) { @@ -83,10 +83,10 @@ } else { $event->timeduration = 0; } - + add_event($event); } - + // the close-event if($feedback->timeclose > 0) { $event = NULL; @@ -101,11 +101,11 @@ $event->timestart = $feedback->timeclose; $event->visible = instance_is_visible('feedback', $feedback); $event->timeduration = 0; - + add_event($event); } - //Do some output + //Do some output echo ""; - + } else { $status = false; } @@ -300,7 +300,7 @@ function feedback_restore_logs($restore,$log) { $status = false; - + //Depending of the action, we recode different things switch ($log->action) { case "add": @@ -392,4 +392,4 @@ return $status; } -?> + diff --git a/mod/feedback/tabs.php b/mod/feedback/tabs.php index f8952a6179..df7c63853f 100644 --- a/mod/feedback/tabs.php +++ b/mod/feedback/tabs.php @@ -1,4 +1,4 @@ -wwwroot.htmlspecialchars('/mod/feedback/view.php?id='.$id.'&do_show=view'), get_string('overview', 'feedback')); - + if($capabilities->edititems) { $row[] = new tabobject('edit', $CFG->wwwroot.htmlspecialchars('/mod/feedback/edit.php?id='.$id.'&do_show=edit'), get_string('edit_items', 'feedback')); $row[] = new tabobject('templates', $CFG->wwwroot.htmlspecialchars('/mod/feedback/edit.php?id='.$id.'&do_show=templates'), get_string('templates', 'feedback')); } - + if($capabilities->viewreports) { if($feedback->course == SITEID){ $row[] = new tabobject('analysis', $CFG->wwwroot.htmlspecialchars('/mod/feedback/analysis_course.php?id='.$id.'&courseid='.$courseid.'&do_show=analysis'), get_string('analysis', 'feedback')); @@ -34,14 +34,14 @@ $row[] = new tabobject('analysis', $CFG->wwwroot.htmlspecialchars('/mod/feedback/analysis.php?id='.$id.'&courseid='.$courseid.'&do_show=analysis'), get_string('analysis', 'feedback')); } } - + if($capabilities->viewreports) { $row[] = new tabobject('showentries', $CFG->wwwroot.htmlspecialchars('/mod/feedback/show_entries.php?id='.$id.'&do_show=showentries'), get_string('show_entries', 'feedback')); } - + if(count($row) > 1) { $tabs[] = $row; print_tabs($tabs, $current_tab, $inactive, $activated); } -?> + diff --git a/mod/feedback/unmapcourse.php b/mod/feedback/unmapcourse.php index 0976b5a052..042677067e 100644 --- a/mod/feedback/unmapcourse.php +++ b/mod/feedback/unmapcourse.php @@ -49,4 +49,3 @@ if ($DB->delete_records('feedback_sitecourse_map', array('id'=>$cmapid))) { print_error('cannotunmap', 'feedback'); } -?> \ No newline at end of file diff --git a/mod/feedback/use_templ.php b/mod/feedback/use_templ.php index 67f4151ea8..734ed42683 100644 --- a/mod/feedback/use_templ.php +++ b/mod/feedback/use_templ.php @@ -123,4 +123,3 @@ if(is_array($templateitems)){ echo $OUTPUT->footer(); -?> \ No newline at end of file diff --git a/mod/feedback/use_templ_form.php b/mod/feedback/use_templ_form.php index dca0b9ca87..ba95a5d232 100644 --- a/mod/feedback/use_templ_form.php +++ b/mod/feedback/use_templ_form.php @@ -1,4 +1,4 @@ -addElement('header', 'general', ''); - + // visible elements $mform->addElement('radio', 'deleteolditems', get_string('delete_old_items', 'feedback'), '', 1); $mform->addElement('radio', 'deleteolditems', get_string('append_new_items', 'feedback'), '', 0); @@ -38,4 +38,4 @@ class mod_feedback_use_templ_form extends moodleform { } } -?> + diff --git a/mod/feedback/version.php b/mod/feedback/version.php index 7093fb5e29..5bb5ac8bb2 100644 --- a/mod/feedback/version.php +++ b/mod/feedback/version.php @@ -1,4 +1,4 @@ -version = 2009052701; // The current module version (Date: YYYYMMDDXX) $module->requires = 2009041700; // Requires this Moodle version $feedback_version_intern = 1; //this version is used for restore older backups $module->cron = 0; // Period for cron to check this module (secs) -?> + diff --git a/mod/feedback/view.php b/mod/feedback/view.php index fe69ea70f8..f8116592c6 100644 --- a/mod/feedback/view.php +++ b/mod/feedback/view.php @@ -205,4 +205,3 @@ echo "

"; echo $OUTPUT->footer(); -?> \ No newline at end of file diff --git a/mod/forum/backuplib.php b/mod/forum/backuplib.php index 1b13717a99..f8bbe2d571 100644 --- a/mod/forum/backuplib.php +++ b/mod/forum/backuplib.php @@ -1,4 +1,4 @@ - + diff --git a/mod/forum/db/access.php b/mod/forum/db/access.php index 7aea2fe3be..42b4742e97 100644 --- a/mod/forum/db/access.php +++ b/mod/forum/db/access.php @@ -311,4 +311,4 @@ $mod_forum_capabilities = array( ) ), ); -?> + diff --git a/mod/forum/db/install.php b/mod/forum/db/install.php index eb8ab485ac..c17fa21b6a 100644 --- a/mod/forum/db/install.php +++ b/mod/forum/db/install.php @@ -1,4 +1,4 @@ - + diff --git a/mod/forum/db/upgrade.php b/mod/forum/db/upgrade.php index 57582082dd..39480eb6f0 100644 --- a/mod/forum/db/upgrade.php +++ b/mod/forum/db/upgrade.php @@ -1,4 +1,4 @@ - + diff --git a/mod/forum/discuss.php b/mod/forum/discuss.php index 46282b2446..241d05e53c 100644 --- a/mod/forum/discuss.php +++ b/mod/forum/discuss.php @@ -1,4 +1,4 @@ -footer(); -?> + diff --git a/mod/forum/index.php b/mod/forum/index.php index 1824d24259..702d76ecfd 100644 --- a/mod/forum/index.php +++ b/mod/forum/index.php @@ -417,4 +417,3 @@ if ($learningforums) { echo $OUTPUT->footer(); -?> \ No newline at end of file diff --git a/mod/forum/lib.php b/mod/forum/lib.php index 7a0c45f396..1ecea4ab84 100644 --- a/mod/forum/lib.php +++ b/mod/forum/lib.php @@ -3853,7 +3853,7 @@ function forum_print_ratings($postid, $scale, $aggregatetype, $link=true, $ratin $link = html_link::make("/mod/forum/report.php?id=$postid", $agg); $link->add_action(new popup_action('click', $link->url, 'ratings', array('height' => 400, 'width' => 600))); - $strratings .= $OUTPUT->link($link); + $strratings .= $OUTPUT->link($link); } else { $strratings .= "$agg "; } @@ -4436,9 +4436,9 @@ function forum_pluginfile($course, $cminfo, $context, $filearea, $args, $forcedo if (!$cm = get_coursemodule_from_instance('forum', $cminfo->instance, $course->id)) { return false; } - + require_course_login($course, true, $cm); - + if (!$post = $DB->get_record('forum_posts', array('id'=>$postid))) { return false; } @@ -6758,7 +6758,7 @@ function forum_tp_get_discussion_read_records($userid, $discussionid) { /** * If its an old post, do nothing. If the record exists, the maintenance will clear it up later. - * + * * @return bool */ function forum_tp_mark_post_read($userid, $post, $forumid) { @@ -7188,7 +7188,7 @@ function forum_tp_can_track_forums($forum=false, $user=false) { // if possible, avoid expensive // queries - if (empty($CFG->forum_trackreadposts)) { + if (empty($CFG->forum_trackreadposts)) { return false; } @@ -8250,7 +8250,7 @@ function forum_extend_navigation($navref, $course, $module, $cm) { global $CFG, $OUTPUT, $USER; $limit = 5; - + $discussions = forum_get_discussions($cm,"d.timemodified DESC", false, -1, $limit); $discussioncount = forum_get_discussions_count($cm); if (!is_array($discussions) || count($discussions)==0) { @@ -8354,7 +8354,7 @@ function forum_extend_settings_navigation($settingsnav, $module=null) { $url = new moodle_url($CFG->wwwroot.'/mod/forum/subscribers.php', array('id'=>$forumobject->id)); $forum->add(get_string('showsubscribers', 'forum'), $url, navigation_node::TYPE_SETTING); } - + if (forum_is_forcesubscribed($forumobject) || ($forumobject->forcesubscribe == FORUM_DISALLOWSUBSCRIBE && !has_capability('mod/forum:managesubscriptions', $PAGE->cm->context))) { // Do nothing } else { diff --git a/mod/forum/markposts.php b/mod/forum/markposts.php index bd7ff27fc5..a9b151ccf8 100644 --- a/mod/forum/markposts.php +++ b/mod/forum/markposts.php @@ -88,4 +88,3 @@ if ($mark == 'read') { redirect($returnto); -?> \ No newline at end of file diff --git a/mod/forum/mod_form.php b/mod/forum/mod_form.php index d9c7630998..efcd79937c 100644 --- a/mod/forum/mod_form.php +++ b/mod/forum/mod_form.php @@ -252,4 +252,4 @@ class mod_forum_mod_form extends moodleform_mod { return $data; } } -?> + diff --git a/mod/forum/post.php b/mod/forum/post.php index 8607bc6b3b..9f2f1da12b 100644 --- a/mod/forum/post.php +++ b/mod/forum/post.php @@ -817,4 +817,3 @@ $mform_post->display(); echo $OUTPUT->footer(); -?> \ No newline at end of file diff --git a/mod/forum/post_form.php b/mod/forum/post_form.php index e77b14333a..200e8bdcbd 100644 --- a/mod/forum/post_form.php +++ b/mod/forum/post_form.php @@ -1,4 +1,4 @@ -libdir.'/formslib.php'); diff --git a/mod/forum/rate.php b/mod/forum/rate.php index 8d22663058..aee44a8384 100644 --- a/mod/forum/rate.php +++ b/mod/forum/rate.php @@ -107,4 +107,3 @@ if ($data = data_submitted()) { print_error('invalidaccess', 'forum'); } -?> \ No newline at end of file diff --git a/mod/forum/rate_ajax.js b/mod/forum/rate_ajax.js index d252aa5755..4581d31789 100644 --- a/mod/forum/rate_ajax.js +++ b/mod/forum/rate_ajax.js @@ -1,5 +1,3 @@ -// $Id$ - /////////////////////////////////////////////////////////////////////////// // // // NOTICE OF COPYRIGHT // diff --git a/mod/forum/rate_ajax.php b/mod/forum/rate_ajax.php index 376acd2fab..21b41e822b 100644 --- a/mod/forum/rate_ajax.php +++ b/mod/forum/rate_ajax.php @@ -154,4 +154,3 @@ $response['status'] = 'Ok'; $response['message'] = $rateinfo; echo json_encode($response); -?> \ No newline at end of file diff --git a/mod/forum/report.php b/mod/forum/report.php index 83566313c0..1b576f5321 100644 --- a/mod/forum/report.php +++ b/mod/forum/report.php @@ -91,4 +91,3 @@ if (!$ratings = forum_get_ratings($post->id, $sqlsort)) { echo $OUTPUT->close_window_button(); echo $OUTPUT->footer(); -?> \ No newline at end of file diff --git a/mod/forum/restorelib.php b/mod/forum/restorelib.php index 7fb7f45584..06f0778a9e 100644 --- a/mod/forum/restorelib.php +++ b/mod/forum/restorelib.php @@ -1,4 +1,4 @@ - + diff --git a/mod/forum/rsslib.php b/mod/forum/rsslib.php index 8a9cb76d80..69034265fa 100644 --- a/mod/forum/rsslib.php +++ b/mod/forum/rsslib.php @@ -1,4 +1,4 @@ - + diff --git a/mod/forum/search.php b/mod/forum/search.php index 1280c2c4b7..b61e0184cd 100644 --- a/mod/forum/search.php +++ b/mod/forum/search.php @@ -406,4 +406,3 @@ function forum_menu_list($course) { return $menu; } -?> \ No newline at end of file diff --git a/mod/forum/settings.php b/mod/forum/settings.php index b554d044c7..2e44c7c8c0 100644 --- a/mod/forum/settings.php +++ b/mod/forum/settings.php @@ -1,4 +1,4 @@ -dirroot.'/mod/forum/lib.php'); @@ -70,4 +70,4 @@ $settings->add(new admin_setting_configcheckbox('forum_logblocked', get_string(' $settings->add(new admin_setting_configcheckbox('forum_ajaxrating', get_string('ajaxrating', 'forum'), get_string('configajaxrating', 'forum'), 0)); -?> + diff --git a/mod/forum/settracking.php b/mod/forum/settracking.php index 05e848f467..0542e65764 100644 --- a/mod/forum/settracking.php +++ b/mod/forum/settracking.php @@ -54,4 +54,4 @@ if (forum_tp_is_tracked($forum) ) { } } -?> + diff --git a/mod/forum/simpletest/test_forum_portfolio_callers.php b/mod/forum/simpletest/test_forum_portfolio_callers.php index e353e195ca..88eb9617cf 100644 --- a/mod/forum/simpletest/test_forum_portfolio_callers.php +++ b/mod/forum/simpletest/test_forum_portfolio_callers.php @@ -1,4 +1,4 @@ -libdir/simpletest/portfolio_testclass.php"); require_once("$CFG->dirroot/mod/forum/lib.php"); require_once("$CFG->dirroot/$CFG->admin/generator.php"); @@ -71,4 +71,4 @@ class testForumPortfolioCallers extends portfoliolib_test { parent::test_caller_with_plugins(); } } -?> + diff --git a/mod/forum/simpletest/testmodforumlib.php b/mod/forum/simpletest/testmodforumlib.php index 89da4494a5..4e71e4f211 100644 --- a/mod/forum/simpletest/testmodforumlib.php +++ b/mod/forum/simpletest/testmodforumlib.php @@ -1,4 +1,4 @@ - + diff --git a/mod/forum/subscribe.php b/mod/forum/subscribe.php index 21c344821a..9624fbfd8a 100644 --- a/mod/forum/subscribe.php +++ b/mod/forum/subscribe.php @@ -112,4 +112,3 @@ if (forum_is_subscribed($user->id, $forum->id)) { } } -?> \ No newline at end of file diff --git a/mod/forum/subscribers.php b/mod/forum/subscribers.php index 61cf82743b..35c7d6ec48 100644 --- a/mod/forum/subscribers.php +++ b/mod/forum/subscribers.php @@ -161,4 +161,3 @@ echo $OUTPUT->box_end(); echo $OUTPUT->footer(); -?> \ No newline at end of file diff --git a/mod/forum/user.php b/mod/forum/user.php index c06aec86e0..a29996d3b9 100644 --- a/mod/forum/user.php +++ b/mod/forum/user.php @@ -111,7 +111,7 @@ if ($course->id == SITEID) { // Get the posts. if ($posts = forum_search_posts($searchterms, $searchcourse, $page*$perpage, $perpage, $totalcount, $extrasql)) { - + $baseurl = new moodle_url('user.php', array('id' => $user->id, 'course' => $course->id, 'mode' => $mode, 'perpage' => $perpage)); echo $OUTPUT->paging_bar(moodle_paging_bar::make($totalcount, $page, $perpage, $baseurl)); @@ -191,4 +191,3 @@ if ($posts = forum_search_posts($searchterms, $searchcourse, $page*$perpage, $pe echo ''; echo $OUTPUT->footer(); -?> \ No newline at end of file diff --git a/mod/forum/version.php b/mod/forum/version.php index a11bd8a2b6..a75b9412ca 100644 --- a/mod/forum/version.php +++ b/mod/forum/version.php @@ -1,4 +1,4 @@ -version = 2009050400; $module->requires = 2009041700; // Requires this Moodle version $module->cron = 60; -?> + diff --git a/mod/forum/view.php b/mod/forum/view.php index 6a1acc851b..9e0c924988 100644 --- a/mod/forum/view.php +++ b/mod/forum/view.php @@ -1,4 +1,4 @@ -set_module_viewed($cm); echo $OUTPUT->footer($course); -?> + diff --git a/mod/glossary/approve.php b/mod/glossary/approve.php index 7bfa9ba85f..4164a287b7 100644 --- a/mod/glossary/approve.php +++ b/mod/glossary/approve.php @@ -48,4 +48,3 @@ add_to_log($course->id, "glossary", "approve entry", "showentry.php?id=$cm->id&a redirect("view.php?id=$cm->id&mode=$mode&hook=$hook",get_string("entryapproved","glossary"),1); die; -?> \ No newline at end of file diff --git a/mod/glossary/backuplib.php b/mod/glossary/backuplib.php index 4e080f23a5..f9fc4e55b9 100644 --- a/mod/glossary/backuplib.php +++ b/mod/glossary/backuplib.php @@ -1,4 +1,4 @@ - + diff --git a/mod/glossary/comment.php b/mod/glossary/comment.php index 8ab6834123..2d59774855 100644 --- a/mod/glossary/comment.php +++ b/mod/glossary/comment.php @@ -230,7 +230,7 @@ function glossary_comment_print_header($course, $cm, $glossary, $entry, $action) $PAGE->set_title(format_string($glossary->name)); $PAGE->set_button($OUTPUT->update_module_button($cm->id, 'glossary')); echo $OUTPUT->header(); - + /// print original glossary entry for any comment action (add, update, delete) glossary_print_entry($course, $cm, $glossary, $entry, 'approval', '', false); } diff --git a/mod/glossary/comment_form.php b/mod/glossary/comment_form.php index 5498da5817..14d0e1f52c 100644 --- a/mod/glossary/comment_form.php +++ b/mod/glossary/comment_form.php @@ -1,4 +1,4 @@ -libdir.'/formslib.php'; diff --git a/mod/glossary/comments.php b/mod/glossary/comments.php index 67497ccb4d..70de4cccad 100644 --- a/mod/glossary/comments.php +++ b/mod/glossary/comments.php @@ -75,4 +75,3 @@ if ($comments = $DB->get_records("glossary_comments", array("entryid"=>$entry->i echo $OUTPUT->footer(); -?> \ No newline at end of file diff --git a/mod/glossary/deleteentry.php b/mod/glossary/deleteentry.php index 766ae48368..5cc13c0b94 100644 --- a/mod/glossary/deleteentry.php +++ b/mod/glossary/deleteentry.php @@ -116,4 +116,3 @@ if ($confirm and confirm_sesskey()) { // the operation was confirmed. echo $OUTPUT->footer(); } -?> \ No newline at end of file diff --git a/mod/glossary/edit.php b/mod/glossary/edit.php index f67b109d4b..13b57fbd89 100644 --- a/mod/glossary/edit.php +++ b/mod/glossary/edit.php @@ -1,4 +1,4 @@ -dirroot.'/lib/formslib.php'); class mod_glossary_entry_form extends moodleform { @@ -126,4 +126,4 @@ class mod_glossary_entry_form extends moodleform { return $errors; } } -?> + diff --git a/mod/glossary/editcategories.html b/mod/glossary/editcategories.html index 3698148c84..6dd0520389 100644 --- a/mod/glossary/editcategories.html +++ b/mod/glossary/editcategories.html @@ -1,4 +1,4 @@ - diff --git a/mod/glossary/editcategories.php b/mod/glossary/editcategories.php index 9640be99fe..40bd32c1a5 100644 --- a/mod/glossary/editcategories.php +++ b/mod/glossary/editcategories.php @@ -130,7 +130,7 @@ if ( $hook >0 ) { - '; } @@ -259,5 +259,5 @@ if ( $action ) { -footer(); diff --git a/mod/glossary/exportentry.php b/mod/glossary/exportentry.php index 2d63c3e024..4c1e7a9843 100644 --- a/mod/glossary/exportentry.php +++ b/mod/glossary/exportentry.php @@ -120,4 +120,3 @@ if (!data_submitted() or !$confirm or !confirm_sesskey()) { redirect ($returnurl); } -?> \ No newline at end of file diff --git a/mod/glossary/filter.php b/mod/glossary/filter.php index 6c3c9eeb05..77b815babb 100644 --- a/mod/glossary/filter.php +++ b/mod/glossary/filter.php @@ -1,4 +1,4 @@ -get_records_select('glossary_entries', @@ -137,13 +137,13 @@ function glossary_filter($courseid, $text) { } - $conceptlist[] = new filterobject($concept->concept, $href_tag_begin, '', + $conceptlist[] = new filterobject($concept->concept, $href_tag_begin, '', $concept->casesensitive, $concept->fullmatch); } $conceptlist = filter_remove_duplicates($conceptlist); } - + global $GLOSSARY_EXCLUDECONCEPTS; if(!empty($GLOSSARY_EXCLUDECONCEPTS)) { $reducedconceptlist=array(); @@ -173,4 +173,4 @@ function glossary_sort_entries_by_length ($entry0, $entry1) { } -?> + diff --git a/mod/glossary/import.html b/mod/glossary/import.html index 8589153c3b..9e32e89014 100644 --- a/mod/glossary/import.html +++ b/mod/glossary/import.html @@ -5,12 +5,12 @@ maxbytes, $course->maxbytes))); - echo ') '; - echo $OUTPUT->help_icon(moodle_help_icon::make("filetoimport", get_string("filetoimport", "glossary"), "glossary")); + echo ') '; + echo $OUTPUT->help_icon(moodle_help_icon::make("filetoimport", get_string("filetoimport", "glossary"), "glossary")); ?> - @@ -48,4 +48,4 @@ - + diff --git a/mod/glossary/import.php b/mod/glossary/import.php index ea530c1695..ab12f3d785 100644 --- a/mod/glossary/import.php +++ b/mod/glossary/import.php @@ -375,4 +375,3 @@ if ($xml = glossary_read_imported_file($file['tmp_name']) ) { /// Finish the page echo $OUTPUT->footer(); -?> \ No newline at end of file diff --git a/mod/glossary/index.php b/mod/glossary/index.php index 77706b2d12..3d0fc85517 100644 --- a/mod/glossary/index.php +++ b/mod/glossary/index.php @@ -133,4 +133,3 @@ echo $OUTPUT->table($table); echo $OUTPUT->footer(); -?> \ No newline at end of file diff --git a/mod/glossary/lib.php b/mod/glossary/lib.php index 3829680c53..934abf3797 100644 --- a/mod/glossary/lib.php +++ b/mod/glossary/lib.php @@ -536,7 +536,7 @@ function glossary_grade_item_update($glossary, $grades=NULL) { /** * Delete grade item for given glossary - * + * * @global object * @param object $glossary object */ @@ -1356,7 +1356,7 @@ function glossary_pluginfile($course, $cminfo, $context, $filearea, $args, $forc } require_course_login($course, true, $cm); - + if (!$entry = $DB->get_record('glossary_entries', array('id'=>$entryid))) { return false; } @@ -1550,7 +1550,7 @@ function glossary_print_categories_menu($cm, $glossary, $hook, $category) { } echo ''; echo '
+
@@ -201,7 +201,7 @@ if ( $action ) {
- + get_records("glossary_categories", array("glossaryid"=>$glossary->id), "name ASC"); @@ -227,7 +227,7 @@ if ( $action ) {
- dirroot.'/lib/uploadlib.php'); upload_print_form_fragment(1,array('file'),null,false,null,0,0); ?> @@ -26,7 +26,7 @@ help_icon(moodle_help_icon::make("destination", get_string("destination", "glossary"), "glossary")) ?> :" /> + " /> help_icon(moodle_help_icon::make("importcategories", get_string("importcategories", "glossary"), "glossary")) ?>
'; - + $select = html_select::make_popup_form("$CFG->wwwroot/mod/glossary/view.php?id=$cm->id&mode=cat", 'hook', $menu, "catmenu", $selected); $select->nothinglabel = false; echo $OUTPUT->select($select); @@ -2206,7 +2206,7 @@ function glossary_count_unrated_entries($glossaryid, $userid) { * @param int $entryid * @param array $scale */ -function glossary_print_ratings_mean($entryid, $scale) { +function glossary_print_ratings_mean($entryid, $scale) { global $OUTPUT; static $strrate; @@ -2221,7 +2221,7 @@ function glossary_print_ratings_mean($entryid, $scale) { echo "$strratings: "; $link = html_link::make("/mod/glossary/report.php?id=$entryid", $mean); $link->add_action(new popup_action('click', $link->url, "ratings")); - echo $OUTPUT->link($link); + echo $OUTPUT->link($link); } } @@ -2358,7 +2358,7 @@ function glossary_print_rating_menu($entryid, $userid, $scale) { * @param int $page page currently selected (0 based) * @param int $perpage number of records per page * @param string $baseurl url to link in each page, the string 'page=XX' will be added automatically. - * + * * @param int $maxpageallowed Optional maximum number of page allowed. * @param int $maxdisplay Optional maximum number of page links to show in the bar * @param string $separator Optional string to be used between pages in the bar diff --git a/mod/glossary/mod_form.php b/mod/glossary/mod_form.php index ee265f2542..6e87f51646 100644 --- a/mod/glossary/mod_form.php +++ b/mod/glossary/mod_form.php @@ -187,4 +187,4 @@ class mod_glossary_mod_form extends moodleform_mod { } } -?> + diff --git a/mod/glossary/print.php b/mod/glossary/print.php index 090bd7bbda..c6c2e4e97f 100644 --- a/mod/glossary/print.php +++ b/mod/glossary/print.php @@ -203,4 +203,3 @@ if ( $allentries ) { } echo $OUTPUT->footer(); -?> \ No newline at end of file diff --git a/mod/glossary/rate.php b/mod/glossary/rate.php index 1c6c3f3685..ad37822d00 100644 --- a/mod/glossary/rate.php +++ b/mod/glossary/rate.php @@ -1,4 +1,4 @@ - + diff --git a/mod/glossary/report.php b/mod/glossary/report.php index 4e4ffda3a2..7f1f6dc8fe 100644 --- a/mod/glossary/report.php +++ b/mod/glossary/report.php @@ -91,4 +91,3 @@ if (!$ratings = glossary_get_ratings($entry->id, $sqlsort)) { echo $OUTPUT->close_window_button(); echo $OUTPUT->footer(); -?> \ No newline at end of file diff --git a/mod/glossary/restorelib.php b/mod/glossary/restorelib.php index baad6856f2..9d8d4d3f75 100644 --- a/mod/glossary/restorelib.php +++ b/mod/glossary/restorelib.php @@ -1,4 +1,4 @@ - + diff --git a/mod/glossary/rsslib.php b/mod/glossary/rsslib.php index 3d54aff640..a7b7236928 100644 --- a/mod/glossary/rsslib.php +++ b/mod/glossary/rsslib.php @@ -1,4 +1,4 @@ - + diff --git a/mod/glossary/settings.php b/mod/glossary/settings.php index 90a62572c3..16ffaae61d 100644 --- a/mod/glossary/settings.php +++ b/mod/glossary/settings.php @@ -1,4 +1,4 @@ -dirroot.'/mod/glossary/lib.php'); diff --git a/mod/glossary/showentry.php b/mod/glossary/showentry.php index 3fc116dfb1..0e14cd75bb 100644 --- a/mod/glossary/showentry.php +++ b/mod/glossary/showentry.php @@ -83,4 +83,3 @@ echo $OUTPUT->close_window_button(); /// Show one reduced footer echo $OUTPUT->footer(); -?> \ No newline at end of file diff --git a/mod/glossary/sql.php b/mod/glossary/sql.php index 3d73ecaff6..ce30c9013a 100644 --- a/mod/glossary/sql.php +++ b/mod/glossary/sql.php @@ -3,7 +3,6 @@ /** * SQL.PHP * This file is include from view.php and print.php - * @version $Id$ * @copyright 2003 **/ @@ -265,4 +264,4 @@ } $allentries = $DB->get_records_sql("$sqlselect $sqlfrom $sqlwhere $sqlorderby", $params, $limitfrom, $limitnum); -?> +