From 2f67a9b3a5ed20f47c95f8ab12e7f9fc33e21e0f Mon Sep 17 00:00:00 2001 From: Petr Skoda Date: Wed, 16 Dec 2009 22:22:37 +0000 Subject: [PATCH] MDL-20700 whitespace terror returns yet again --- admin/report/security/lib.php | 10 +++--- admin/webservice/service_users.php | 4 +-- backup/lib.php | 2 +- blocks/section_links/settings.php | 10 +++--- lib/filelib.php | 2 +- lib/moodlelib.php | 6 ++-- lib/navigationlib.php | 2 +- lib/outputlib.php | 4 +-- login/environment.php | 4 +-- mod/chat/report.php | 2 +- mod/data/db/upgrade.php | 2 +- mod/feedback/mod_form.php | 2 +- mod/forum/db/access.php | 2 +- mod/forum/lib.php | 2 +- mod/forum/markposts.php | 2 +- mod/forum/post.php | 2 +- mod/forum/renderer.php | 6 ++-- mod/forum/report.php | 2 +- mod/forum/rsslib.php | 2 +- mod/forum/settracking.php | 2 +- mod/forum/subscribe.php | 2 +- mod/lesson/db/access.php | 2 +- mod/lesson/db/upgrade.php | 6 ++-- mod/lesson/editpage.php | 4 +-- mod/lesson/essay.php | 2 +- mod/lesson/format.php | 2 +- mod/lesson/importppt.php | 2 +- mod/lesson/lib.php | 36 +++++++++---------- mod/lesson/mod_form.php | 2 +- mod/lesson/pagetypes/branchtable.php | 2 +- mod/lesson/pagetypes/endofbranch.php | 12 +++---- mod/lesson/pagetypes/essay.php | 2 +- mod/lesson/pagetypes/matching.php | 4 +-- mod/lesson/pagetypes/multichoice.php | 8 ++--- mod/lesson/pagetypes/truefalse.php | 4 +-- mod/lesson/renderer.php | 12 +++---- mod/lesson/view.php | 2 +- question/format/hotpot/format.php | 2 +- question/type/questiontype.php | 2 +- repository/flickr_public/repository.class.php | 2 +- repository/local/repository.class.php | 2 +- repository/s3/repository.class.php | 6 ++-- theme/anomaly/header.html | 4 +-- user/selector/lib.php | 2 +- webservice/wsdoc.php | 2 +- 45 files changed, 96 insertions(+), 100 deletions(-) diff --git a/admin/report/security/lib.php b/admin/report/security/lib.php index e17ee8aa5e..82b6f077ce 100644 --- a/admin/report/security/lib.php +++ b/admin/report/security/lib.php @@ -485,7 +485,7 @@ function report_security_check_passwordsaltmain($detailed=false) { $result->details = null; $result->status = null; $result->link = null; - + if (empty($CFG->passwordsaltmain)) { $result->status = REPORT_SECURITY_WARNING; $result->info = get_string('check_passwordsaltmain_warning', 'report_security'); @@ -1127,8 +1127,8 @@ function report_security_check_riskbackup($detailed=false) { $sql = "SELECT DISTINCT r.* FROM {role} r JOIN {role_capabilities} rc ON rc.roleid = r.id - WHERE rc.capability = :capability - AND rc.contextid = :contextid + WHERE rc.capability = :capability + AND rc.contextid = :contextid AND rc.permission = :permission"; $systemroles = $DB->get_records_sql($sql, $params); @@ -1136,8 +1136,8 @@ function report_security_check_riskbackup($detailed=false) { $sql = "SELECT DISTINCT r.*, rc.contextid FROM {role} r JOIN {role_capabilities} rc ON rc.roleid = r.id - WHERE rc.capability = :capability - AND rc.contextid <> :contextid + WHERE rc.capability = :capability + AND rc.contextid <> :contextid AND rc.permission = :permission"; $overriddenroles = $DB->get_records_sql($sql, $params); diff --git a/admin/webservice/service_users.php b/admin/webservice/service_users.php index 0b022d858e..03c8321c01 100644 --- a/admin/webservice/service_users.php +++ b/admin/webservice/service_users.php @@ -150,7 +150,7 @@ if (!empty($allowedusers)) { foreach($allowedusers as $user) { echo print_collapsible_region_start('', 'usersettings'.$user->id,$user->firstname." ".$user->lastname.", ".$user->email,false,true,true); - + //user settings form $contents = "
"; $form = new html_form(); @@ -205,7 +205,7 @@ if (!empty($allowedusers)) { echo $OUTPUT->form($form, $contents); echo print_collapsible_region_end(true); - + } echo ""; diff --git a/backup/lib.php b/backup/lib.php index dfc2b07a61..ab30f7d4b9 100644 --- a/backup/lib.php +++ b/backup/lib.php @@ -615,7 +615,7 @@ // this needs to happen before restore_setup_for_check // which for some reason reads the session $SESSION->restore =& $restore; - // rename the things that are called differently + // rename the things that are called differently $SESSION->restore->restore_course_files = $restore->course_files; $SESSION->restore->restore_site_files = $restore->site_files; $SESSION->restore->backup_version = $restore->info->backup_backup_version; diff --git a/blocks/section_links/settings.php b/blocks/section_links/settings.php index bad7638de9..5a636f0ecb 100755 --- a/blocks/section_links/settings.php +++ b/blocks/section_links/settings.php @@ -12,22 +12,20 @@ for ($i = 1; $i < 11; $i++){ $increments[$i] = $i; } -$selected = array(1 => array(22,2), +$selected = array(1 => array(22,2), 2 => array(40,5)); for($i = 1; $i < 3; $i++){ - $configs[] = new admin_setting_configselect('numsections'.$i, get_string('numsections'.$i, 'block_section_links'), + $configs[] = new admin_setting_configselect('numsections'.$i, get_string('numsections'.$i, 'block_section_links'), get_string('numsectionsdesc'.$i, 'block_section_links'), $selected[$i][0], $numberofsections); - $configs[] = new admin_setting_configselect('incby'.$i, get_string('incby'.$i, 'block_section_links'), + $configs[] = new admin_setting_configselect('incby'.$i, get_string('incby'.$i, 'block_section_links'), get_string('incbydesc'.$i, 'block_section_links'), $selected[$i][1], $increments); } - + foreach ($configs as $config) { $config->plugin = 'blocks/section_links'; $settings->add($config); } - -?> diff --git a/lib/filelib.php b/lib/filelib.php index 24f7e74683..f89fda89de 100644 --- a/lib/filelib.php +++ b/lib/filelib.php @@ -2756,7 +2756,7 @@ class curl_cache { /** * This class is used to parse lib/file/file_types.mm which help get file - * extensions by file types. + * extensions by file types. * The file_types.mm file can be edited by freemind in graphic environment. * * @package moodlecore diff --git a/lib/moodlelib.php b/lib/moodlelib.php index f1ef768993..4930d466db 100644 --- a/lib/moodlelib.php +++ b/lib/moodlelib.php @@ -6972,7 +6972,7 @@ function plugin_supports($type, $name, $feature, $default=null) { return false; } include_once("$CFG->dirroot/mod/$name/lib.php"); - + $function = $name.'_supports'; } else { @@ -6983,12 +6983,12 @@ function plugin_supports($type, $name, $feature, $default=null) { if (!$dir = get_plugin_directory($type, $name)) { throw new coding_exception("Unsupported plugin type or name ($type/$name)"); } - + $libfile = $dir.'/lib.php'; if (file_exists($libfile)) { include_once($libfile); } - + $function = $type.'_'.$name.'_supports'; } diff --git a/lib/navigationlib.php b/lib/navigationlib.php index 997f09f95b..71bb93934d 100644 --- a/lib/navigationlib.php +++ b/lib/navigationlib.php @@ -925,7 +925,7 @@ class global_navigation extends navigation_node { $contextlevel = 10; } $depth = 0; - + /** * We always want to load the front page activities into the tree, these * will appear at the bottom of the opening (site) node. diff --git a/lib/outputlib.php b/lib/outputlib.php index 292d5e414a..ce627ea2c5 100644 --- a/lib/outputlib.php +++ b/lib/outputlib.php @@ -862,7 +862,7 @@ class theme_config { if (!$dir = theme_config::find_theme_location($themename)) { return null; } - + $THEME = new object(); $THEME->name = $themename; $THEME->dir = $dir; @@ -900,7 +900,7 @@ class theme_config { //legacy theme - needs to be upgraded - upgrade info is displayed on the admin settings page return null; } - + return $dir; } diff --git a/login/environment.php b/login/environment.php index cdbd32b13b..0383556e61 100644 --- a/login/environment.php +++ b/login/environment.php @@ -1,5 +1,5 @@ flashversion = $flashversion; } } - -?> diff --git a/mod/chat/report.php b/mod/chat/report.php index 5cd9aa825a..0462f26c4d 100644 --- a/mod/chat/report.php +++ b/mod/chat/report.php @@ -259,7 +259,7 @@ if (!$show_all and $complete_sessions == 0) { - echo $OUTPUT->heading(get_string('no_complete_sessions_found', 'chat') . + echo $OUTPUT->heading(get_string('no_complete_sessions_found', 'chat') . ' ' . get_string('list_all_sessions', 'chat') . ''); diff --git a/mod/data/db/upgrade.php b/mod/data/db/upgrade.php index 1ccd0afb05..10c43edd99 100644 --- a/mod/data/db/upgrade.php +++ b/mod/data/db/upgrade.php @@ -183,7 +183,7 @@ function xmldb_data_upgrade($oldversion) { if ($result && $oldversion < 2009111701) { require_once($CFG->libdir . '/commentlib.php'); upgrade_set_timeout(60*20); - + /// Define table data_comments to be dropped $table = new xmldb_table('data_comments'); diff --git a/mod/feedback/mod_form.php b/mod/feedback/mod_form.php index 02b3604c11..179020330c 100644 --- a/mod/feedback/mod_form.php +++ b/mod/feedback/mod_form.php @@ -76,7 +76,7 @@ class mod_feedback_mod_form extends moodleform_mod { //------------------------------------------------------------------------------- $mform->addElement('header', 'aftersubmithdr', get_string('after_submit', 'feedback')); - + $mform->addElement('editor', 'page_after_submit', get_string("page_after_submit", "feedback"), null, null); $mform->setType('page_after_submit', PARAM_RAW); diff --git a/mod/forum/db/access.php b/mod/forum/db/access.php index 3523b8c19d..e74b1d48a1 100644 --- a/mod/forum/db/access.php +++ b/mod/forum/db/access.php @@ -17,7 +17,7 @@ /** * Capability definitions for the forum module. - * + * * The capabilities are loaded into the database table when the module is * installed or updated. Whenever the capability definitions are updated, * the module version number should be bumped up. diff --git a/mod/forum/lib.php b/mod/forum/lib.php index b337187f0e..6b2106e433 100644 --- a/mod/forum/lib.php +++ b/mod/forum/lib.php @@ -8340,7 +8340,7 @@ class forum_existing_subscriber_selector extends forum_subscriber_selector_base if (!$subscribers = $DB->get_records_sql($fields.$from.' WHERE '.$wherecondition.$order, $params)) { $subscribers = array(); } - + return array(get_string("existingsubscribers", 'forum') => $subscribers); } diff --git a/mod/forum/markposts.php b/mod/forum/markposts.php index 0fcef34594..967ea9e369 100644 --- a/mod/forum/markposts.php +++ b/mod/forum/markposts.php @@ -17,7 +17,7 @@ /** * Set tracking option for the forum. - * + * * @package mod-forum * @copyright 2005 mchurch * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later diff --git a/mod/forum/post.php b/mod/forum/post.php index aad4bf2ec8..b99300be5a 100644 --- a/mod/forum/post.php +++ b/mod/forum/post.php @@ -21,7 +21,7 @@ * @package mod-forum * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later - */ + */ require_once('../../config.php'); require_once('lib.php'); diff --git a/mod/forum/renderer.php b/mod/forum/renderer.php index 7407aed098..cc30b196b9 100644 --- a/mod/forum/renderer.php +++ b/mod/forum/renderer.php @@ -26,7 +26,7 @@ /** * A custom renderer class that extends the moodle_renderer_base and * is used by the forum module. - * + * * @package mod-forum * @copyright 2009 Sam Hemelryk * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later @@ -84,7 +84,7 @@ class moodle_mod_forum_renderer extends moodle_renderer_base { $table->set_classes(array('subscribertable','boxaligncenter')); $table->data = array(html_table_row::make(array($existingcell, $actioncell, $potentialcell))); $output .= $this->output->table($table); - + $output .= $this->output_end_tag('form'); return $output; } @@ -131,6 +131,6 @@ class moodle_mod_forum_renderer extends moodle_renderer_base { $output .= $this->output->box_end(); return $output; } - + } \ No newline at end of file diff --git a/mod/forum/report.php b/mod/forum/report.php index 9b715371c9..289725e140 100644 --- a/mod/forum/report.php +++ b/mod/forum/report.php @@ -21,7 +21,7 @@ * @package mod-forum * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later - */ + */ require_once("../../config.php"); require_once("lib.php"); diff --git a/mod/forum/rsslib.php b/mod/forum/rsslib.php index ecc5276290..b24d79c5fe 100644 --- a/mod/forum/rsslib.php +++ b/mod/forum/rsslib.php @@ -247,7 +247,7 @@ /** * This function returns "items" record array to be used to build the rss feed * for a Type=posts forum - * + * * @param object $forum * @param int $newsince */ diff --git a/mod/forum/settracking.php b/mod/forum/settracking.php index 30189a5574..6cf5b8802e 100644 --- a/mod/forum/settracking.php +++ b/mod/forum/settracking.php @@ -21,7 +21,7 @@ * @package mod-forum * @copyright 2005 mchurch * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later - */ + */ require_once("../../config.php"); require_once("lib.php"); diff --git a/mod/forum/subscribe.php b/mod/forum/subscribe.php index 0c75669a74..c842f89cba 100644 --- a/mod/forum/subscribe.php +++ b/mod/forum/subscribe.php @@ -17,7 +17,7 @@ /** * Subscribe to or unsubscribe from a forum. - * + * * @package mod-forum * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later diff --git a/mod/lesson/db/access.php b/mod/lesson/db/access.php index 96707c07a8..d791763789 100644 --- a/mod/lesson/db/access.php +++ b/mod/lesson/db/access.php @@ -24,7 +24,7 @@ * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or late */ - + $capabilities = array( 'mod/lesson:edit' => array( diff --git a/mod/lesson/db/upgrade.php b/mod/lesson/db/upgrade.php index 6649022d99..dfc5bce0fb 100644 --- a/mod/lesson/db/upgrade.php +++ b/mod/lesson/db/upgrade.php @@ -35,7 +35,7 @@ * * Please do not forget to use upgrade_set_timeout() * before any action that may take longer time to finish. - * + * * @package lesson * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 o @@ -87,7 +87,7 @@ function xmldb_lesson_upgrade($oldversion) { } if ($result && $oldversion < 2009120400) { - + /** * Move any media files associated with the lesson to use the new file * API methods and structures. @@ -112,7 +112,7 @@ function xmldb_lesson_upgrade($oldversion) { $i++; upgrade_set_timeout(60); // set up timeout, may also abort execution $pbar->update($i, $count, "Migrating lesson mediafiles - $i/$count."); - + $filepath = $CFG->dataroot.'/'.$lesson->course.'/'.$CFG->moddata.'/lesson/'.$lesson->mediafile; if (!is_readable($filepath)) { //file missing?? diff --git a/mod/lesson/editpage.php b/mod/lesson/editpage.php index b79b2aa3df..ec40524a1a 100644 --- a/mod/lesson/editpage.php +++ b/mod/lesson/editpage.php @@ -52,7 +52,7 @@ if ($edit) { $qtype = $editpage->qtype; $edit = true; } else { - $edit = false; + $edit = false; } $jumpto = lesson_page::get_jumptooptions($pageid, $lesson); @@ -71,7 +71,7 @@ if ($edit) { // this is used by endofbranch, cluster, and endofcluster to skip the creation form. // IT SHOULD ALWAYS CALL require_sesskey(); $mform->construction_override($pageid, $lesson); - + $defaultpage = new stdClass; $defaultpage->id = $cm->id; $defaultpage->pageid = $pageid; diff --git a/mod/lesson/essay.php b/mod/lesson/essay.php index 45aed8c6ae..6ab45d680b 100644 --- a/mod/lesson/essay.php +++ b/mod/lesson/essay.php @@ -216,7 +216,7 @@ switch ($mode) { // Required for messaging framework $eventdata->component = 'mod_lesson'; $eventdata->name = 'graded_essay'; - + message_send($eventdata); $essayinfo->sent = 1; $attempt->useranswer = serialize($essayinfo); diff --git a/mod/lesson/format.php b/mod/lesson/format.php index 35773ed69c..efa058c2e3 100644 --- a/mod/lesson/format.php +++ b/mod/lesson/format.php @@ -52,7 +52,7 @@ function lesson_save_question_options($question, $lesson) { $lesson = new lesson($lesson); } $manager = lesson_page_type_manager::get($lesson); - + $timenow = time(); switch ($question->qtype) { case LESSON_PAGE_SHORTANSWER: diff --git a/mod/lesson/importppt.php b/mod/lesson/importppt.php index 804089cb12..42e1a6b83c 100644 --- a/mod/lesson/importppt.php +++ b/mod/lesson/importppt.php @@ -78,7 +78,7 @@ if ($data = $mform->get_data()) { // extract package content $packer = get_file_packer('application/zip'); $package->extract_to_storage($packer, $context->id, 'lesson_imported_files', $lesson->id, '/'); - + $fs = get_file_storage(); if ($files = $fs->get_area_files($context->id, 'lesson_imported_files', $lesson->id)) { diff --git a/mod/lesson/lib.php b/mod/lesson/lib.php index 3df506748b..bc35e229e2 100644 --- a/mod/lesson/lib.php +++ b/mod/lesson/lib.php @@ -503,7 +503,7 @@ function lesson_grade_item_update($lesson, $grades=NULL) { */ function lesson_grade_item_delete($lesson) { global $CFG; - + } @@ -908,7 +908,7 @@ function lesson_pluginfile($course, $cminfo, $context, $filearea, $args, $forced if (!$cminfo->uservisible) { return false; } - + $fileareas = lesson_get_file_areas(); if (!array_key_exists($filearea, $fileareas)) { return false; @@ -1195,7 +1195,7 @@ abstract class lesson_base { * These properties are calculated * @property int $firstpageid Id of the first page of this lesson (prevpageid=0) * @property int $lastpageid Id of the last page of this lesson (nextpageid=0) - * + * * @copyright 2009 Sam Hemelryk * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ @@ -1298,7 +1298,7 @@ class lesson extends lesson_base { $messages = $SESSION->lesson_messages[$this->properties->id]; unset($SESSION->lesson_messages[$this->properties->id]); } - + return $messages; } @@ -1390,7 +1390,7 @@ class lesson extends lesson_base { } return $this->firstpageid; } - + /** * Returns the id of the last page of this lesson. (nextpageid = 0) * @return int @@ -1713,7 +1713,7 @@ class lesson extends lesson_base { foreach ($attempts as $attempt) { $seenpages[$attempt->pageid] = $attempt->pageid; } - + } // get the lesson pages @@ -1927,7 +1927,7 @@ abstract class lesson_page extends lesson_base { /** * Creates a new lesson_page within the database and returns the correct pagetype * object to use to interact with the new lesson - * + * * @final * @static * @param object $properties @@ -2386,7 +2386,7 @@ abstract class lesson_page extends lesson_base { } return false; } - + /** * Checks to see if a page has been answered previously * @param int $nretakes @@ -2439,7 +2439,7 @@ abstract class lesson_page extends lesson_base { $this->answers = $answers; return $answers; } - + /** * This method MUST be overriden by all question page types, or page types that * wish to score a page. @@ -2450,7 +2450,7 @@ abstract class lesson_page extends lesson_base { * $result = parent::check_answer(); * * before modifiying it as required. - * + * * @return stdClass */ public function check_answer() { @@ -2470,15 +2470,15 @@ abstract class lesson_page extends lesson_base { /** * True if the page uses a custom option - * + * * Should be override and set to true if the page uses a custom option. - * + * * @return bool */ public function has_option() { return false; } - + /** * Returns the maximum number of answers for this page given the maximum number * of answers permitted by the lesson. @@ -2511,7 +2511,7 @@ abstract class lesson_page extends lesson_base { } return $properties; } - + /** * Returns an array of options to display whn choosing the jumpto for a page/answer * @static @@ -2530,7 +2530,7 @@ abstract class lesson_page extends lesson_base { if ($pageid == 0) { return $jump; } - + $pages = $lesson->load_all_pages(); if ($pages[$pageid]->qtype == LESSON_PAGE_BRANCHTABLE || $lesson->is_sub_page_of_type($pageid, array(LESSON_PAGE_BRANCHTABLE), array(LESSON_PAGE_ENDOFBRANCH, LESSON_PAGE_CLUSTER))) { $jump[LESSON_UNSEENBRANCHPAGE] = get_string("unseenpageinbranch", "lesson"); @@ -2711,7 +2711,7 @@ abstract class lesson_page extends lesson_base { * @property int $timemodified A timestamp of when the answer was modified * @property string $answer The answer itself * @property string $response The response the user sees if selecting this answer - * + * * @copyright 2009 Sam Hemelryk * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ @@ -2785,7 +2785,7 @@ class lesson_page_type_manager { /** * Finds and loads all lesson page types in mod/lesson/pagetypes - * + * * @param lesson $lesson */ public function load_lesson_types(lesson $lesson) { @@ -2803,7 +2803,7 @@ class lesson_page_type_manager { $this->types[$pagetype->typeid] = $pagetype; } } - + } /** diff --git a/mod/lesson/mod_form.php b/mod/lesson/mod_form.php index af7212911a..7140d4f023 100644 --- a/mod/lesson/mod_form.php +++ b/mod/lesson/mod_form.php @@ -35,7 +35,7 @@ class mod_lesson_mod_form extends moodleform_mod { $this->course = $course; parent::moodleform_mod($current, $section, $cm, $course); } - + function definition() { global $CFG, $COURSE, $DB; diff --git a/mod/lesson/pagetypes/branchtable.php b/mod/lesson/pagetypes/branchtable.php index 9c59b1542b..ce8d63a4b4 100644 --- a/mod/lesson/pagetypes/branchtable.php +++ b/mod/lesson/pagetypes/branchtable.php @@ -106,7 +106,7 @@ class lesson_page_type_branchtable extends lesson_page { if ($this->lesson->slideshow) { $output .= $renderer->slideshow_end(); } - + return $output; } diff --git a/mod/lesson/pagetypes/endofbranch.php b/mod/lesson/pagetypes/endofbranch.php index 4dd7c23c00..1a0ede41c7 100644 --- a/mod/lesson/pagetypes/endofbranch.php +++ b/mod/lesson/pagetypes/endofbranch.php @@ -22,7 +22,7 @@ * @copyright 2009 Sam Hemelryk * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later **/ - + /** End of Branch page */ define("LESSON_PAGE_ENDOFBRANCH", "21"); @@ -63,7 +63,7 @@ class lesson_page_type_endofbranch extends lesson_page { $jumpto = lesson_unseen_branch_jump($this->lesson, $USER->id); } elseif ($jumpto == LESSON_CLUSTERJUMP) { - + if (!$canmanage) { $jumpto = $this->lesson->cluster_jump($pageid); } else { @@ -73,7 +73,7 @@ class lesson_page_type_endofbranch extends lesson_page { $jumpto = $this->properties->nextpageid; } } - + } else if ($answer->jumpto == LESSON_NEXTPAGE) { if ($this->properties->nextpageid == 0) { @@ -89,7 +89,7 @@ class lesson_page_type_endofbranch extends lesson_page { } else if ($jumpto == LESSON_PREVIOUSPAGE) { $jumpto = $this->properties->prevpageid; - + } redirect(new moodle_url($CFG->wwwroot.'/mod/lesson/view.php', array('id'=>$PAGE->cm->id,'pageid'=>$jumpto))); } @@ -98,7 +98,7 @@ class lesson_page_type_endofbranch extends lesson_page { } public function update($properties) { global $DB, $PAGE; - + $properties->id = $this->properties->id; $properties->lessonid = $this->lesson->id; if (empty($properties->qoption)) { @@ -196,7 +196,7 @@ class lesson_add_page_form_endofbranch extends lesson_add_page_form_base { print_error('cannotfindpagerecord', 'lesson'); } } - + if ($btpage->qtype == LESSON_PAGE_BRANCHTABLE) { $newpage = new stdClass; $newpage->lessonid = $lesson->id; diff --git a/mod/lesson/pagetypes/essay.php b/mod/lesson/pagetypes/essay.php index 4a0f07cd8c..c2dad99bed 100644 --- a/mod/lesson/pagetypes/essay.php +++ b/mod/lesson/pagetypes/essay.php @@ -97,7 +97,7 @@ class lesson_page_type_essay extends lesson_page { $result->noanswer = true; return $result; } - + $answers = $this->get_answers(); foreach ($answers as $answer) { $result->answerid = $answer->id; diff --git a/mod/lesson/pagetypes/matching.php b/mod/lesson/pagetypes/matching.php index 032114c331..a9ac33db3a 100644 --- a/mod/lesson/pagetypes/matching.php +++ b/mod/lesson/pagetypes/matching.php @@ -138,7 +138,7 @@ class lesson_page_type_matching extends lesson_page { if (!$data) { redirect(new moodle_url($CFG->wwwroot.'/mod/lesson/view.php', array('id'=>$PAGE->cm->id, 'pageid'=>$this->properties->id))); } - + $response = $data->response; if (!is_array($response)) { $result->noanswer = true; @@ -228,7 +228,7 @@ class lesson_page_type_matching extends lesson_page { $options->para = false; $i = 1; $n = 0; - + foreach ($answers as $answer) { if ($n < 2) { if ($answer->answer != NULL) { diff --git a/mod/lesson/pagetypes/multichoice.php b/mod/lesson/pagetypes/multichoice.php index 76499e0ec4..f50a967a8d 100644 --- a/mod/lesson/pagetypes/multichoice.php +++ b/mod/lesson/pagetypes/multichoice.php @@ -83,7 +83,7 @@ class lesson_page_type_multichoice extends lesson_page { if (!$data) { redirect(new moodle_url($CFG->wwwroot.'/mod/lesson/view.php', array('id'=>$PAGE->cm->id, 'pageid'=>$this->properties->id))); } - + if ($this->properties->qoption) { // MULTIANSWER allowed, user's answer is an array @@ -96,7 +96,7 @@ class lesson_page_type_multichoice extends lesson_page { foreach ($studentanswers as $key => $useranswer) { $studentanswers[$key] = clean_param($useranswer, PARAM_INT); } - + // get what the user answered $result->userresponse = implode(",", $studentanswers); @@ -209,7 +209,7 @@ class lesson_page_type_multichoice extends lesson_page { } } else { // only one answer allowed - + if (empty($data->answerid) && !is_int($data->answerid)) { $result->noanswer = true; return $result; @@ -268,7 +268,7 @@ class lesson_page_type_multichoice extends lesson_page { $cells[] = "".get_string("response", "lesson")." $i"; $cells[] = format_text($answer->response, FORMAT_MOODLE, $options); $table->data[] = html_table_row::make($cells); - + $cells = array(); $cells[] = "".get_string("score", "lesson").''; $cells[] = $answer->score; diff --git a/mod/lesson/pagetypes/truefalse.php b/mod/lesson/pagetypes/truefalse.php index 4fc5c6736f..e3210933f4 100644 --- a/mod/lesson/pagetypes/truefalse.php +++ b/mod/lesson/pagetypes/truefalse.php @@ -130,7 +130,7 @@ class lesson_page_type_truefalse extends lesson_page { $cells[] = "".get_string("jump", "lesson").''; $cells[] = $this->get_jump_name($answer->jumpto); $table->data[] = html_table_row::make($cells); - + if ($i === 1){ $table->data[count($table->data)-1]->cells[0]->style = 'width:20%;'; } @@ -313,5 +313,5 @@ class lesson_display_answer_form_truefalse extends moodleform { $this->add_action_buttons(null, get_string("pleasecheckoneanswer", "lesson")); } - + } \ No newline at end of file diff --git a/mod/lesson/renderer.php b/mod/lesson/renderer.php index 6953fbf419..2fb13d4afe 100644 --- a/mod/lesson/renderer.php +++ b/mod/lesson/renderer.php @@ -44,7 +44,7 @@ class moodle_mod_lesson_renderer extends moodle_renderer_base { /** * Magic method used to pass calls otherwise meant for the standard renderer * to it to ensure we don't go causing unnessecary greif. - * + * * @param string $method * @param array $arguments * @return mixed @@ -394,7 +394,7 @@ class moodle_mod_lesson_renderer extends moodle_renderer_base { $addquestionurl = new moodle_url($CFG->wwwroot.'/mod/lesson/editpage.php', array('id'=>$this->page->cm->id, 'pageid'=>$prevpageid)); $links[] = html_link::make($addquestionurl, get_string('addaquestionpagehere', 'lesson')); - + foreach ($links as $key=>$link) { $links[$key] = $this->output->link($link); } @@ -471,7 +471,7 @@ class moodle_mod_lesson_renderer extends moodle_renderer_base { $options[$link->url->param('qtype')] = $link->text; } $options[0] = get_string('question', 'lesson'); - + $addpageurl = new moodle_url($CFG->wwwroot.'/mod/lesson/editpage.php', array('id'=>$this->page->cm->id, 'pageid'=>$page->id, 'sesskey'=>sesskey())); $addpageselect = html_select::make_popup_form($addpageurl, 'qtype', $options, 'addpageafter'.$page->id); $addpageselect->nothinglabel = get_string('addanewpage', 'lesson').'...'; @@ -556,7 +556,7 @@ class moodle_mod_lesson_renderer extends moodle_renderer_base { if (has_capability('mod/lesson:manage', $context)) { return $this->output->notification(get_string('progressbarteacherwarning2', 'lesson')); } - + if (!isset($USER->modattempts[$lesson->id])) { // all of the lesson pages $pages = $lesson->load_all_pages(); @@ -572,7 +572,7 @@ class moodle_mod_lesson_renderer extends moodle_renderer_base { $ntries = 0; // may not be necessary } - + $viewedpageids = array(); if ($attempts = $lesson->get_attempts($ntries, true)) { $viewedpageids = array_merge($viewedpageids, array_keys($attempts)); @@ -613,7 +613,7 @@ class moodle_mod_lesson_renderer extends moodle_renderer_base { $table = new html_table(); $table->set_classes(array('progress_bar_table', 'center')); $table->data = array(html_table_row::make($cells)); - + return $this->output->box($this->output->table($table), 'progress_bar'); } diff --git a/mod/lesson/view.php b/mod/lesson/view.php index 9b0e5f1c95..3f253f5d6c 100644 --- a/mod/lesson/view.php +++ b/mod/lesson/view.php @@ -265,7 +265,7 @@ if ($pageid != LESSON_EOL) { $DB->delete_records('lesson_branch', array('userid' => $USER->id, 'lessonid' => $lesson->id, 'retry' => $retries)); } - $page = $lesson->load_page($pageid); + $page = $lesson->load_page($pageid); // Check if the page is of a special type and if so take any nessecary action $newpageid = $page->callback_on_view($canmanage); if (is_numeric($newpageid)) { diff --git a/question/format/hotpot/format.php b/question/format/hotpot/format.php index 04847adb05..db9d810ce7 100644 --- a/question/format/hotpot/format.php +++ b/question/format/hotpot/format.php @@ -528,7 +528,7 @@ function hotpot_charcode_to_utf8($charcode) { return chr(($charcode >> 0x12) + 0xF0).chr((($charcode >> 0x0C) & 0x3F) + 0x80).chr((($charcode >> 0x06) & 0x3F) + 0x80).chr(($charcode & 0x3F) + 0x80); } // unidentified char code !! - return ' '; + return ' '; } function hotpot_convert_relative_urls($str, $baseurl, $filename) { diff --git a/question/type/questiontype.php b/question/type/questiontype.php index f2442dde43..337ecc3d85 100644 --- a/question/type/questiontype.php +++ b/question/type/questiontype.php @@ -1091,7 +1091,7 @@ class default_questiontype { } else { $eventtest = 'event IN (' . QUESTION_EVENTS_GRADED . ')'; } - $states = $DB->get_records_select('question_states', + $states = $DB->get_records_select('question_states', 'attempt = :aid AND question = :qid AND ' . $eventtest, $params, 'seq_number ASC'); if (count($states) <= 1) { return ''; diff --git a/repository/flickr_public/repository.class.php b/repository/flickr_public/repository.class.php index cca2125c50..8bb57965ca 100644 --- a/repository/flickr_public/repository.class.php +++ b/repository/flickr_public/repository.class.php @@ -248,7 +248,7 @@ class repository_flickr_public extends repository { if (!empty($SESSION->{$this->sess_tag}) // use tag to search or !empty($SESSION->{$this->sess_text}) // use keyword to search - or !empty($this->nsid)/*use pre-defined accound*/) { + or !empty($this->nsid)/*use pre-defined accound*/) { $photos = $this->flickr->photos_search(array( 'tags'=>$SESSION->{$this->sess_tag}, 'page'=>$page, diff --git a/repository/local/repository.class.php b/repository/local/repository.class.php index 2c083dc0fc..d5c0dad27f 100755 --- a/repository/local/repository.class.php +++ b/repository/local/repository.class.php @@ -181,7 +181,7 @@ class repository_local extends repository { /** * Local file don't support to link to external links * - * @return int + * @return int */ public function supported_returntypes() { return FILE_INTERNAL; diff --git a/repository/s3/repository.class.php b/repository/s3/repository.class.php index e6d6948d27..356de104a4 100644 --- a/repository/s3/repository.class.php +++ b/repository/s3/repository.class.php @@ -121,12 +121,12 @@ class repository_s3 extends repository { public function check_login() { return true; } - + /** * S3 doesn't provide search * * @return bool - */ + */ public function global_search() { return false; } @@ -147,7 +147,7 @@ class repository_s3 extends repository { * S3 plugins doesn't support return links of files * * @return int - */ + */ public function supported_returntypes() { return FILE_INTERNAL; } diff --git a/theme/anomaly/header.html b/theme/anomaly/header.html index 7cfd03d7de..6754ecdcc3 100644 --- a/theme/anomaly/header.html +++ b/theme/anomaly/header.html @@ -22,9 +22,9 @@
- + - +
diff --git a/user/selector/lib.php b/user/selector/lib.php index 43192a9a1e..8b1d3b4a81 100644 --- a/user/selector/lib.php +++ b/user/selector/lib.php @@ -65,7 +65,7 @@ abstract class user_selector_base { protected $searchanywhere = false; // This is used by get selected users, protected $validatinguserids = null; - + // Used to ensure we only output the search options for one user selector on // each page. private static $searchoptionsoutput = false; diff --git a/webservice/wsdoc.php b/webservice/wsdoc.php index b51ac5278a..07be2fa154 100644 --- a/webservice/wsdoc.php +++ b/webservice/wsdoc.php @@ -200,7 +200,7 @@ class webservice_documentation_generator { if (!$auth = get_auth_plugin('webservice')) { throw new webservice_access_exception('WS auth missing'); } - + if (!$this->username) { throw new webservice_access_exception('Missing username'); } -- 2.39.5