]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-20700 whitespace terror returns yet again
authorPetr Skoda <skodak@moodle.org>
Wed, 16 Dec 2009 22:22:37 +0000 (22:22 +0000)
committerPetr Skoda <skodak@moodle.org>
Wed, 16 Dec 2009 22:22:37 +0000 (22:22 +0000)
45 files changed:
admin/report/security/lib.php
admin/webservice/service_users.php
backup/lib.php
blocks/section_links/settings.php
lib/filelib.php
lib/moodlelib.php
lib/navigationlib.php
lib/outputlib.php
login/environment.php
mod/chat/report.php
mod/data/db/upgrade.php
mod/feedback/mod_form.php
mod/forum/db/access.php
mod/forum/lib.php
mod/forum/markposts.php
mod/forum/post.php
mod/forum/renderer.php
mod/forum/report.php
mod/forum/rsslib.php
mod/forum/settracking.php
mod/forum/subscribe.php
mod/lesson/db/access.php
mod/lesson/db/upgrade.php
mod/lesson/editpage.php
mod/lesson/essay.php
mod/lesson/format.php
mod/lesson/importppt.php
mod/lesson/lib.php
mod/lesson/mod_form.php
mod/lesson/pagetypes/branchtable.php
mod/lesson/pagetypes/endofbranch.php
mod/lesson/pagetypes/essay.php
mod/lesson/pagetypes/matching.php
mod/lesson/pagetypes/multichoice.php
mod/lesson/pagetypes/truefalse.php
mod/lesson/renderer.php
mod/lesson/view.php
question/format/hotpot/format.php
question/type/questiontype.php
repository/flickr_public/repository.class.php
repository/local/repository.class.php
repository/s3/repository.class.php
theme/anomaly/header.html
user/selector/lib.php
webservice/wsdoc.php

index e17ee8aa5e5bde059fbd1fdf76052465bbe6af9b..82b6f077cebf0f1899e5f1cb632de168605a8652 100644 (file)
@@ -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);
 
index 0b022d858e22d0a6e3fc43055c8f507d7b52c59c..03c8321c0143a19f17e202fb260439262266c3cd 100644 (file)
@@ -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 = "<div class=\"fcontainer clearfix\">";
         $form = new html_form();
@@ -205,7 +205,7 @@ if (!empty($allowedusers)) {
         echo $OUTPUT->form($form, $contents);
 
         echo print_collapsible_region_end(true);
-        
+
 
     }
     echo "</span>";
index dfc2b07a617dc704600d4170c2adc6be5daa3bd1..ab30f7d4b998e6e3b4ffbb92f64a74cc45a887ad 100644 (file)
         // 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;
index bad7638de9ee8223ab30e622b562985ee9fbbee1..5a636f0ecbc8dbf9b47a10973a70f9060658e682 100755 (executable)
@@ -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);
 }
-
-?>
index 24f7e74683c41ae296aeabc2ccad487f825195a1..f89fda89de40d35d1efbcdb421118737a047bdb6 100644 (file)
@@ -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
index f1ef768993149c05967c78e4ed563dd20ab96966..4930d466db66026e9627306883aba1a99a23a1b6 100644 (file)
@@ -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';
     }
 
index 997f09f95bafe580b83c15dd5455a3f71674db87..71bb93934d98e05e756675d0d293fdb409858e7b 100644 (file)
@@ -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.
index 292d5e414a6a53329635b2b08c6dbd8465d278f2..ce627ea2c5b7dfb2325c9adab9d1fc56a729da19 100644 (file)
@@ -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;
     }
 
index cdbd32b13b99feb0b91145e2f5244e8897a68232..0383556e61c32da42940ab2c2811e3648ca71e7c 100644 (file)
@@ -1,5 +1,5 @@
 <?php
-/* 
+/*
  * This script can set environment variables in the current session
  */
 
@@ -12,5 +12,3 @@ if (!empty($SESSION)) {
         $SESSION->flashversion = $flashversion;
     }
 }
-
-?>
index 5cd9aa825acc09c3fda0c074d9b5ac8af3c0f401..0462f26c4d01cd68dbdbd7f7f63646dcfc6f73ef 100644 (file)
 
 
     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') .
                       '&nbsp;<a href="report.php?id='.$cm->id.'&amp;show_all=1">' .
                       get_string('list_all_sessions', 'chat') .
                       '</a>');
index 1ccd0afb05f63076c0ab713783d220f1877d755e..10c43edd998783492d7de11553de406f96aadbf3 100644 (file)
@@ -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');
 
index 02b3604c11c2cbcd826808469d63682677c940ae..179020330cad5c8c495c300be12e438736de6288 100644 (file)
@@ -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);
 
index 3523b8c19d705a75e6eb0b828434a07cb1bd9fe2..e74b1d48a10f019b36b5cea3cbee4c918e9664cd 100644 (file)
@@ -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.
index b337187f0efa8c0847530aa5f61e09a6e66b6e6f..6b2106e433660f099db206c0c34883ab6a60a5d3 100644 (file)
@@ -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);
     }
 
index 0fcef34594af15956471a4387756bb67daa160f4..967ea9e369b6e34df5b59ddfd908920cab1ac270 100644 (file)
@@ -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
index aad4bf2ec8bdb207a6b4aaded79c36251a61e4c7..b99300be5aea625c2b2474a4eb40e6ead360ad61 100644 (file)
@@ -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');
index 7407aed09858b13f9d4bf0d331e5c48a8d9ae451..cc30b196b9a8c2f640114a704e104bd89b40a1d4 100644 (file)
@@ -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
index 9b715371c92d10f28b260e9ee665e15632606f92..289725e140e3383fbf42b92b179c93811a94ad46 100644 (file)
@@ -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");
index ecc5276290931514528ed8c1bdeb05d7f40bf579..b24d79c5fef916605b3c24ac356362bf0f1dbf13 100644 (file)
     /**
      * 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
      */
index 30189a55741db92f5fe750c25ce58803411a2918..6cf5b8802e6c6483568faa34079ed1c26faa63c0 100644 (file)
@@ -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");
index 0c75669a74cd5f892ffb175e6075a5d713fc088a..c842f89cba4a01b9809f1f4854ea74a1271622ea 100644 (file)
@@ -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
index 96707c07a87b24953fe5340261dcb53135cc82e6..d791763789dfac25587ca9061d68ebceb815aef3 100644 (file)
@@ -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(
index 6649022d99aa3fc4bc85403c179ced0626713e3c..dfc5bce0fbf1ebd390fa6cdfa1cd62cf1e373de0 100644 (file)
@@ -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??
index b79b2aa3df3832c5f8ffc98b7557e21f83b231a7..ec40524a1a23a46238942d741e60405ea24df322 100644 (file)
@@ -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;
index 45aed8c6aef9c9dcdf43bd0a313e4a6aa036c273..6ab45d680b6b5e53a6ef2143e61c89bc5ef29ee5 100644 (file)
@@ -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);
index 35773ed69c1c0b4376c399a2f6ded087f49071cd..efa058c2e306b6cc7a4b2a290b15823244009933 100644 (file)
@@ -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:
index 804089cb127cf5966e93056b840c277ecfa59a13..42e1a6b83c46a9f87e50ad0b439e0c9bbc46c738 100644 (file)
@@ -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)) {
 
index 3df506748bcc707691e44dcf3dfe6b23406deb72..bc35e229e2b9fb7793f840f93e97214ce4d70113 100644 (file)
@@ -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();
      * </code>
      * 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;
             }
         }
-        
+
     }
 
     /**
index af7212911a7c960e81d77452857ce5ea44000abd..7140d4f023f846dc6d21fb83d099058debd24af9 100644 (file)
@@ -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;
 
index 9c59b1542b6b3c99b8e0fbeb36cadb28686ab608..ce8d63a4b40f8f35996775641c5d8d40daaeaf58 100644 (file)
@@ -106,7 +106,7 @@ class lesson_page_type_branchtable extends lesson_page {
         if ($this->lesson->slideshow) {
             $output .= $renderer->slideshow_end();
         }
-        
+
         return $output;
     }
 
index 4dd7c23c0016b583b1783f3665d2936180449f00..1a0ede41c7dd5f3a1c01e1db3cbdfb46ea2759ab 100644 (file)
@@ -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;
index 4a0f07cd8cfeacca996df642b31e0e7d24dbc86b..c2dad99bed5659b9be09539a918051424c113f91 100644 (file)
@@ -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;
index 032114c331cdfc2e2fe67d8f201de501fb818401..a9ac33db3a8fbd710a07727da3b9ed27a245d996 100644 (file)
@@ -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) {
index 76499e0ec4f4b91374b82f7297aa8e932057dd22..f50a967a8d48a93a2cc85c85d827e8ecf6273bd7 100644 (file)
@@ -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[] = "<span class=\"label\">".get_string("response", "lesson")." $i</span>";
             $cells[] = format_text($answer->response, FORMAT_MOODLE, $options);
             $table->data[] = html_table_row::make($cells);
-            
+
             $cells = array();
             $cells[] = "<span class=\"label\">".get_string("score", "lesson").'</span>';
             $cells[] = $answer->score;
index 4fc5c6736f9287c8017c1b8e6d120cda1ea9bf41..e3210933f48df0c2ccd5c0370e17fbe217086d0f 100644 (file)
@@ -130,7 +130,7 @@ class lesson_page_type_truefalse extends lesson_page {
             $cells[] = "<span class=\"label\">".get_string("jump", "lesson").'</span>';
             $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
index 6953fbf4196386f2d3f83319123fa66101753637..2fb13d4afee333b5496ed6488ae619f03e012774 100644 (file)
@@ -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');
     }
 
index 9b0e5f1c951062702728efa790fb6267d7aba47b..3f253f5d6c177b1890777714017f38d08b40d484 100644 (file)
@@ -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)) {
index 04847adb052f0288e2a30eccbe1f20245c3ff27a..db9d810ce704a534a783542ae29636c9e3417fc6 100644 (file)
@@ -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) {
index f2442dde4354f6a8e61f246e3eb66ba015dc28f4..337ecc3d8503eaf405188cf35988a26271470724 100644 (file)
@@ -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 '';
index cca2125c5034f1699b1a74c0c689773ad3523dfe..8bb57965cabb5c9d5676da4fb3bdd386267524aa 100644 (file)
@@ -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,
index 2c083dc0fc7f1ca7364d37f282d70fc8981e4339..d5c0dad27fcaae78fe155c8dee4258a018aebb96 100755 (executable)
@@ -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;
index e6d6948d27207b7fc142db822fc76e2502ff5be2..356de104a46814d0f3257edefcea6e60627c86d9 100644 (file)
@@ -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;
     }
index 7cfd03d7de17713c4919dc14e2ea654d992f2eca..6754ecdcc39d07438b1186a220b90816390a007a 100644 (file)
@@ -22,9 +22,9 @@
         <div id="wrapper-l">
             <div id="wrapper-r">
                 <div id="wrapper-b">
-                
+
                 <!-- Now, let's cap the corners -->
-                
+
                     <div id="wrapper-tl">
                         <div id="wrapper-tr">
                             <div id="wrapper-bl">
index 43192a9a1e6da0e09e18850e81ad7fca70cd9f8a..8b1d3b4a8130fbc07988bbe138ea13ffd53c2c3c 100644 (file)
@@ -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;
index b51ac5278a59925629bfdb9d18ccf3dc999e5cf0..07be2fa1547559228c2038f112b4030f1334b52b 100644 (file)
@@ -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');
         }