]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-20700 coding style cleanup - cvs keywords removed, closign php tag removed, trail...
authorPetr Skoda <skodak@moodle.org>
Sun, 1 Nov 2009 16:48:45 +0000 (16:48 +0000)
committerPetr Skoda <skodak@moodle.org>
Sun, 1 Nov 2009 16:48:45 +0000 (16:48 +0000)
51 files changed:
README.txt
TRADEMARK.txt
blog/external_blogs.php
blog/lib.php
comment/admin.js
comment/comment.js
comment/lib.php
error/index.php
group/clientlib.js
group/index.php
group/lib.php
group/members.php
group/simpletest/ broken_testexternal.php
install.php
install/README.txt
iplookup/README.txt
lib/blocklib.php
lib/boxlib.php
lib/csvlib.class.php
lib/customcheckslib.php
lib/db/messages.php
lib/deprecatedlib.php
lib/dropdown.js
lib/dtl/dbdata.xsd
lib/eaccelerator.class.php
lib/evalmath/evalmath.class.php
lib/form/editor.php
lib/form/filemanager.js
lib/form/header.php
lib/form/hidden.php
lib/form/text.php
lib/gdlib.php
lib/htaccess
lib/javascript-navigation.js
lib/javascript-static.js
lib/kses.php
lib/packer/file_packer.php
lib/packer/zip_packer.php
lib/rsslib.php
lib/simplepie/moodle_simplepie.php
local/readme.txt
mod/README.txt
mod/upgrade.txt
pix/smartpix.php
rss/file.php
sso/hive/expired.php
sso/hive/login.php
tag/tag.js
tag/tag_autocomplete.php
webservice/amf/testclient/moodleclient.mxml
webservice/soap/locallib.php

index 4a207c22dfd2459371a01a7ea3ddd7467f7d02a6..82627eb9457179b0639123caf582ad499970f8d6 100644 (file)
@@ -1,18 +1,18 @@
 QUICK INSTALL
 =============
 
-For the impatient, here is a basic outline of the 
-installation process, which normally takes me only 
+For the impatient, here is a basic outline of the
+installation process, which normally takes me only
 a few minutes:
 
-1) Move the Moodle files into your web directory. 
+1) Move the Moodle files into your web directory.
 
 2) Create a single database for Moodle to store all
    it's tables in (or choose an existing database).
 
-3) Visit your Moodle site with a browser, you should 
+3) Visit your Moodle site with a browser, you should
    be taken to the install.php script, which will lead
-   you through creating a config.php file and then 
+   you through creating a config.php file and then
    setting up Moodle, creating an admin account etc.
 
 4) Set up a cron task to call the file admin/cron.php
@@ -21,9 +21,9 @@ a few minutes:
 
 For more information, see the INSTALL DOCUMENTATION:
 
-   http://docs.moodle.org/en/Installing_Moodle 
+   http://docs.moodle.org/en/Installing_Moodle
 
-A local copy can also be found in 
+A local copy can also be found in
 
    lang/en_utf8/help/install.html   (or your language)
 
index f38d588345c07762a88f11a6468947b8d13b35e4..d73a0765b19b37729360780dd2af7f530fc5317c 100644 (file)
@@ -4,29 +4,29 @@ Moodle Trademark License
 
 The name Moodle™ is a registered trademark of the Moodle Trust.
 
-A key part of the business model that allows us to produce and 
-distribute Moodle as completely Free open source software is that 
-we restrict the commercial use of the Moodle trademark to those 
+A key part of the business model that allows us to produce and
+distribute Moodle as completely Free open source software is that
+we restrict the commercial use of the Moodle trademark to those
 who have contracted to support Moodle development (Moodle Partners).
 
-If you are intending to use the name (and/or logo) to advertise 
-generic Moodle™ services (eg Moodle Hosting, Moodle Support, 
-Moodle Certification, Moodle Training, Moodle Consulting, 
-Moodle Customisation, Moodle Courseware Development, Moodle 
-Theme design, Moodle Integrations, Moodle Installations, etc) 
-or as the name of a software package, then you must seek 
-direct permission in writing from the Moodle Trust via the 
-moodle.com helpdesk, in accordance with normal trademark 
+If you are intending to use the name (and/or logo) to advertise
+generic Moodle™ services (eg Moodle Hosting, Moodle Support,
+Moodle Certification, Moodle Training, Moodle Consulting,
+Moodle Customisation, Moodle Courseware Development, Moodle
+Theme design, Moodle Integrations, Moodle Installations, etc)
+or as the name of a software package, then you must seek
+direct permission in writing from the Moodle Trust via the
+moodle.com helpdesk, in accordance with normal trademark
 restrictions.
 
-There are no restrictions on how you use the name in other 
-contexts (for example, if you use Moodle just to provide 
-courses then you can use the name freely to refer to it.) 
+There are no restrictions on how you use the name in other
+contexts (for example, if you use Moodle just to provide
+courses then you can use the name freely to refer to it.)
 
-If you aren't sure of a particular case, please ask us via 
-http://moodle.com/helpdesk: we'll be happy to either provide 
-you with official permission in writing or help you fix 
-your wording. 
+If you aren't sure of a particular case, please ask us via
+http://moodle.com/helpdesk: we'll be happy to either provide
+you with official permission in writing or help you fix
+your wording.
 
 Martin Dougiamas
 Executive Director
index f789d0c873b262d1d3616f051ce223c495c293d8..796f970a91c1c77c7c6be900eb486cdbdc433ec5 100644 (file)
@@ -45,7 +45,7 @@ if ($delete && confirm_sesskey()) {
     if ($externalbloguserid == $USER->id) {
         $DB->delete_records('blog_external', array('id' => $delete));
         $message = get_string('externalblogdeleted', 'blog');
-    } 
+    }
 }
 
 $blogs = $DB->get_records('blog_external', array('userid' => $USER->id));
index 14f8b108c44729c392b9fb897e92d588dcc7335c..85f1b9cf1bbd8032af7fdb2621a53b757d8a5996 100755 (executable)
@@ -316,7 +316,7 @@ function blog_get_headers() {
     $blogurl = new moodle_url($CFG->wwwroot . '/blog/index.php');
 
     // If the title is not yet set, it's likely that the context isn't set either, so skip this part
-    $pagetitle = $PAGE->title; 
+    $pagetitle = $PAGE->title;
     if (!empty($pagetitle)) {
         $contexturl = blog_get_context_url();
 
index 6e25f5923e638ed2f036cee5f1f427fa8c33a468..dc29ba930e14b738d055cfa410d4fddbf3089064 100644 (file)
@@ -1,4 +1,4 @@
-YAHOO.util.Event.onDOMReady(init); 
+YAHOO.util.Event.onDOMReady(init);
 function init() {
     var select_all = document.getElementById('comment_select_all');
     select_all.onclick = function() {
@@ -37,7 +37,7 @@ function delete_comments() {
     }
     var data = {
         'commentids': list,
-        'sesskey': moodle_cfg.sesskey 
+        'sesskey': moodle_cfg.sesskey
     }
     var trans = YAHOO.util.Connect.asyncRequest('POST',
         url+'?action=delete', cb, build_querystring(data));
index 13430641d315d7befc525e9015d7c37c985f760d..7d4feeb3cc6ce2f6c7759e0c2858c02d4f3ea0fd 100644 (file)
@@ -86,7 +86,7 @@ function post_comment(cid) {
                         backgroundColor: { to: '#FFE390' }
                     };
                     var anim = new YAHOO.util.ColorAnim(ids[i], attributes);
-                    anim.animate(); 
+                    anim.animate();
                 }
             }
         }
@@ -102,7 +102,7 @@ function post_comment(cid) {
             backgroundColor: { from: '#FFE390', to:'#FFFFFF' }
         };
         var anim = new YAHOO.util.ColorAnim('dlg-content-'+cid, attributes);
-        anim.animate(); 
+        anim.animate();
     }
 }
 function delete_comment(client_id, comment_id) {
@@ -128,11 +128,11 @@ function delete_comment(client_id, comment_id) {
                 height:{to:0}
             };
             var anim = new YAHOO.util.Anim(htmlid, attributes, 1, YAHOO.util.Easing.easeOut);
-            anim.onComplete.subscribe(this.remove_dom, [], this); 
-            anim.animate(); 
+            anim.onComplete.subscribe(this.remove_dom, [], this);
+            anim.animate();
         },
         remove_dom: function() {
-            this.el.parentNode.removeChild(this.el); 
+            this.el.parentNode.removeChild(this.el);
         }
     }
     var trans = YAHOO.util.Connect.asyncRequest('POST',
index 48187c69f55ecb54c969143b7a08f7a273352509..6ebabeb9200a51459561c9a389bfa403d0ed588d 100644 (file)
@@ -11,7 +11,7 @@ class comment_manager {
 
     /**
      * Return comments by pages
-     * @param int $page 
+     * @param int $page
      * @return mixed
      */
     function get_comments($page) {
@@ -22,7 +22,7 @@ class comment_manager {
         } else {
             $start = $page*$this->perpage;
         }
-        $sql = "SELECT c.id, c.contextid, c.itemid, c.commentarea, c.userid, c.content, u.username, u.firstname, u.lastname, c.timecreated 
+        $sql = "SELECT c.id, c.contextid, c.itemid, c.commentarea, c.userid, c.content, u.username, u.firstname, u.lastname, c.timecreated
             FROM {comments} c, {user} u
             WHERE u.id=c.userid ORDER BY c.timecreated ASC";
 
@@ -75,7 +75,7 @@ class comment_manager {
 
     /**
      * Print comments
-     * @param int $page 
+     * @param int $page
      */
     function print_comments($page=0) {
         global $CFG, $OUTPUT, $DB;
@@ -100,14 +100,14 @@ class comment_manager {
                 $action .= "<a target='_blank' href='{$url}'>".get_string('commentincontext').'</a>';
             }
             $table->data[] = array($checkbox, $c->username, $c->content, $action);
-        } 
+        }
         echo $OUTPUT->table($table);
         echo $OUTPUT->paging_bar(moodle_paging_bar::make($count, $page, $this->perpage, $CFG->wwwroot.'/comment/index.php'));
     }
 
     /**
      * delete a comment
-     * @param int $commentid 
+     * @param int $commentid
      */
     public function delete_comment($commentid) {
         global $DB;
@@ -118,7 +118,7 @@ class comment_manager {
     }
     /**
      * delete comments
-     * @param int $commentid 
+     * @param int $commentid
      */
     public function delete_comments($list) {
         global $DB;
index 9dac9675631b2823358ba8e6c676f95eeb3215f6..bf7f1c93c86afd93e8ffd52101040f6f7a983697 100644 (file)
@@ -6,7 +6,7 @@
     if ($form = data_submitted()) { // form submitted, do not check referer (original page unknown)!
 
     /// Only deal with real users
-        if (!isloggedin()) { 
+        if (!isloggedin()) {
             redirect($CFG->wwwroot);
         }
 
@@ -32,7 +32,7 @@
         $eventdata->fullmessagehtml   = '';
         $eventdata->smallmessage      = '';
         events_trigger('message_send', $eventdata);
-        
+
         redirect($CFG->wwwroot .'/course/', 'Message sent, thanks', 3);
         exit;
     }
@@ -41,7 +41,7 @@
     $redirecturl = empty($_SERVER['REDIRECT_URL']) ? '' : $_SERVER['REDIRECT_URL'];
     $httpreferer = empty($_SERVER['HTTP_REFERER']) ? '' : $_SERVER['HTTP_REFERER'];
     $requesturi  = empty($_SERVER['REQUEST_URI'])  ? '' : $_SERVER['REQUEST_URI'];
-    
+
     header("HTTP/1.0 404 Not Found");
     header("Status: 404 Not Found");
 
index f074ec1afb1bd0f0147a1d6d12fa515a788272e8..2ab972424f078826364630c6d11a4c0455471ca2 100644 (file)
@@ -1,6 +1,6 @@
 /**
  * Client-side JavaScript for group management interface.
- * @author vy-shane AT moodle.com 
+ * @author vy-shane AT moodle.com
  * @license http://www.gnu.org/copyleft/gpl.html GNU Public License
  * @package groups
  */
@@ -144,7 +144,7 @@ UpdatableMembersCombo.prototype.refreshMembers = function () {
     if(singleSelection) {
         createLoaderImg("membersloader", "memberslabel", this.wwwRoot);
     }
+
     // Update the label.
     var spanEl = document.getElementById("thegroup");
     if (singleSelection) {
@@ -160,7 +160,7 @@ UpdatableMembersCombo.prototype.refreshMembers = function () {
             selectEl.removeChild(selectEl.firstChild);
         }
     }
-    
+
     document.getElementById("showaddmembersform").disabled = !singleSelection;
     document.getElementById("showeditgroupsettingsform").disabled = !singleSelection;
     document.getElementById("deletegroup").disabled = selectionCount == 0;
index 6e3f62963ecb2e48f8750862de113194348e71e3..7c33cf8a6df341d300f7863edc2800cf9d94fa24 100644 (file)
@@ -197,7 +197,7 @@ if ($groups) {
                 $selectedname = $groupname;
             }
         }
-        
+
         echo "<option value=\"{$group->id}\"$select title=\"$groupname\">$groupname</option>\n";
     }
 } else {
index 9abacf49a4522e3c79b6b57705013e05a8562d5d..0dc59a461f2441f854970e2be86150e87cdc60c2 100644 (file)
@@ -119,7 +119,7 @@ function groups_remove_member($grouporid, $userorid) {
 function groups_create_group($data, $editform=false) {
     global $CFG, $DB;
     require_once("$CFG->libdir/gdlib.php");
-    
+
     //check that courseid exists
     $course = $DB->get_record('course', array('id' => $data->courseid), '*', MUST_EXIST);
 
@@ -413,7 +413,7 @@ function groups_delete_groupings($courseid, $showfeedback=false) {
 
 /**
  * Obtains a list of the possible roles that group members might come from,
- * on a course. Generally this includes all the roles who would have 
+ * on a course. Generally this includes all the roles who would have
  * course:view on that course, except the doanything roles.
  * @param object $context Context of course
  * @return Array of role ID integers, or false if error/none.
@@ -450,7 +450,7 @@ function groups_get_possible_roles($context) {
         return $validroleids;
     } else {
         return false;  // No need to continue, since no roles have this capability set
-    }    
+    }
 }
 
 
@@ -579,7 +579,7 @@ function groups_unassign_grouping($groupingid, $groupid) {
 
 /**
  * Lists users in a group based on their role on the course.
- * Returns false if there's an error or there are no users in the group. 
+ * Returns false if there's an error or there are no users in the group.
  * Otherwise returns an array of role ID => role data, where role data includes:
  * (role) $id, $shortname, $name
  * $users: array of objects for each user which include the specified fields
@@ -600,7 +600,7 @@ function groups_get_members_by_role($groupid, $courseid, $fields='u.*',
     global $CFG, $DB;
 
     // Retrieve information about all users and their roles on the course or
-    // parent ('related') contexts 
+    // parent ('related') contexts
     $context = get_context_instance(CONTEXT_COURSE, $courseid);
 
     if ($extrawheretest) {
@@ -611,7 +611,7 @@ function groups_get_members_by_role($groupid, $courseid, $fields='u.*',
                    u.id AS userid, $fields
               FROM {groups_members} gm
               JOIN {user} u ON u.id = gm.userid
-              JOIN {role_assignments} ra ON ra.userid = u.id 
+              JOIN {role_assignments} ra ON ra.userid = u.id
               JOIN {role} r ON r.id = ra.roleid
              WHERE gm.groupid=?
                    AND ra.contextid ".get_related_contexts_string($context).
@@ -630,7 +630,7 @@ function groups_get_members_by_role($groupid, $courseid, $fields='u.*',
  *
  * @param object $rs The record set (may be false)
  * @param int $contextid ID of course context
- * @return array As described in groups_get_members_by_role 
+ * @return array As described in groups_get_members_by_role
  */
 function groups_calculate_role_people($rs, $context) {
     global $CFG, $DB;
index 98fbaa60881da3202c8ab46f5939deb35b65aa76..c95164fc030f01a1cbbb19cc3d304fb543bbc484 100644 (file)
@@ -42,7 +42,7 @@ $groupmembersselector->set_extra_fields(array());
 $potentialmembersselector = new group_non_members_selector('addselect',
         array('groupid' => $groupid, 'courseid' => $course->id));
 $potentialmembersselector->set_extra_fields(array());
-        
+
 if (optional_param('add', false, PARAM_BOOL) && confirm_sesskey()) {
     $userstoadd = $potentialmembersselector->get_selected_users();
     if (!empty($userstoadd)) {
index 9794c7326ab39de0232136473d5aabf8bc38b769..50c67cb1b629c02c6d81e58220ea65357d1a90e2 100644 (file)
@@ -237,11 +237,11 @@ class group_external_test extends UnitTestCase {
     }
 
     function test_add_group_members3() {
-        //the user is not a participant  
+        //the user is not a participant
         $params = array(array("groupid" => $this->group->id, "userid" => $this->userid5));
         $this->expectException(new moodle_exception('userisnotaparticipant'));
         $result = group_external::add_groupmembers($params);
-       
+
     }
 
     function test_get_groupmembers() {
@@ -249,7 +249,7 @@ class group_external_test extends UnitTestCase {
         $groups = group_external::get_groupmembers($params);
         $this->assertEqual(sizeof($groups), 2);
         $this->assertEqual(sizeof($groups[0]['members']), 2);
-        $this->assertEqual(sizeof($groups[1]['members']), 1);      
+        $this->assertEqual(sizeof($groups[1]['members']), 1);
     }
 
     function test_delete_group_members() {
index 283140b00f43c124e826a6fb0e0d0e92022b8607..d12826dbf643ef93dc8efe498c2095d183a357f6 100644 (file)
@@ -158,7 +158,7 @@ require_once($CFG->libdir.'/componentlib.class.php');
     ini_set('include_path', $CFG->libdir.'/pear' . PATH_SEPARATOR . ini_get('include_path'));
     //point zend include path to moodles lib/zend so that includes and requires will search there for files before anywhere else
     ini_set('include_path', $CFG->libdir.'/zend' . PATH_SEPARATOR . ini_get('include_path'));
-    
+
 require('version.php');
 $CFG->target_release = $release;
 
index c2eead85c520572c44f8979e663797985b9307a2..b72d8142779428fca81fcb724f8c3aeb5d88282a 100644 (file)
@@ -1,6 +1,6 @@
 The file stringnames.txt contains a list of all the strings used during the install process.
 
-A daily cron job will pick up the changes to this file and update all the language files 
+A daily cron job will pick up the changes to this file and update all the language files
 (ie those in install/lang/*/install.php) automatically.
 
 
index 4295eb20772b96341e2034ad710ef7bfe1506672..f68a610052d6b17b73cd4fc960f483d4d245c8ac 100644 (file)
@@ -20,4 +20,4 @@ original Earth map from:
 marker.gif
   custom made in Inkscape
 
-Petr Skoda (skodak), January 2008  
+Petr Skoda (skodak), January 2008
index 6f6aa04a6159658a59395f48a2f389eced6fe289..e7e01e5abbb5adf141aacf0ea054b69dd8eaf384 100644 (file)
@@ -1273,7 +1273,7 @@ class block_manager {
             }
             $this->reposition_block($block->instance->id, $newregion, $newweight);
         }
-        
+
         $this->page->ensure_param_not_in_url('bui_moveid');
         $this->page->ensure_param_not_in_url('bui_newregion');
         $this->page->ensure_param_not_in_url('bui_newweight');
index a412cbb26ec0234426c5531aa3cd014ce470968b..a647223209906a191ae364a23b43bc9a28224017 100755 (executable)
@@ -56,13 +56,13 @@ class boxclient {
         } else {
             $this->debug = false;
         }
-    } 
+    }
     /**
      * Setup for Functions
      *
      * @param string $method
      * @param array $params
-     * @return array 
+     * @return array
      */
     function makeRequest($method, $params = array()) {
         $this->_clearErrors();
@@ -88,7 +88,7 @@ class boxclient {
     }
     /**
      * @param array $params
-     * @return array 
+     * @return array
      */
     function getTicket($params = array()) {
         $params['api_key'] = $this->api_key;
@@ -217,7 +217,7 @@ class boxclient {
                     $tmp = array('title'=>(string)$file->attributes()->file_name,
                         'size'=>display_size((int)$file->attributes()->size),
                         'thumbnail'=>$thumbnail,
-                        'date'=>userdate((int)$file->attributes()->updated), 
+                        'date'=>userdate((int)$file->attributes()->updated),
                         'source'=>'http://box.net/api/1.0/download/'
                             .$this->auth_token.'/'.(string)$file->attributes()->id,
                         'url'=>(string)$file->attributes()->shared_link);
@@ -333,7 +333,7 @@ class boxclient {
         return $ret_array;
     }
 
-    /** 
+    /**
      * Upload a File
      * @param array $params the file MUST be present in key 'file' and be a moodle stored_file object.
      * @return array|bool Array or false
index 8ef0878395ff2ac1c6b24b8202572512ca29ad65..5bf1d4f2d5994b55cd3bd0cd0c57114d621bec6e 100644 (file)
@@ -1,6 +1,6 @@
 <?php
-// This file is part of Moodle - http://moodle.org/ 
-// 
+// This file is part of Moodle - http://moodle.org/
+//
 // Moodle is free software: you can redistribute it and/or modify
 // it under the terms of the GNU General Public License as published by
 // the Free Software Foundation, either version 3 of the License, or
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 // GNU General Public License for more details.
-// 
+//
 // You should have received a copy of the GNU General Public License
 // along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
 
 /**
  * This is a one-line short description of the file
  *
- * You can have a rather longer description of the file as well, 
+ * You can have a rather longer description of the file as well,
  * if you like, and it can span multiple lines.
- * 
+ *
  * @copyright Petr Skoda
  * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  * @package   moodlecore
index 5d860b27e7f97102e48e39aa3e78ff00f0c85d54..38eee30baaf79499e092eb257f1b43513d38e26b 100644 (file)
@@ -1,6 +1,6 @@
 <?php
-// This file is part of Moodle - http://moodle.org/ 
-// 
+// This file is part of Moodle - http://moodle.org/
+//
 // Moodle is free software: you can redistribute it and/or modify
 // it under the terms of the GNU General Public License as published by
 // the Free Software Foundation, either version 3 of the License, or
@@ -10,7 +10,7 @@
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 // GNU General Public License for more details.
-// 
+//
 // You should have received a copy of the GNU General Public License
 // along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
 
index 2a4f2d6b164b49f63a1a197cba4f863b30a84a22..2b1e4dc2f444757cac15da1d2b1712f61cde9269 100644 (file)
@@ -29,7 +29,7 @@
 $messageproviders = array (
 
 /// Notices that an admin might be interested in
-    'notices' => array ( 
+    'notices' => array (
          'capability'  => 'moodle/site:config'
     ),
 
@@ -40,5 +40,5 @@ $messageproviders = array (
 
     'instantmessage' => array (
     ),
-    
+
 );
index 233d68452240ba520cb7e12c747e2faaed26d7f4..04377c204066d8847e5a62f35fd515eaa36ed543 100644 (file)
@@ -3678,7 +3678,7 @@ function build_navigation($extranavlinks, $cm = null) {
             }
         }
     }
-    
+
     return(array('newnav' => true, 'navlinks' => array()));
 }
 
index c922db52b469896cd63a3c31b91edb09b7c4fbc5..617693f23b5321aed59642e0de5c8250c0fe2da5 100644 (file)
@@ -9,14 +9,14 @@ These functions fix this problem.
 global variables
 
 Note:
-if I didn't use global variables, we would need to pass them as parameter:  
-=> in initSelect(): 
+if I didn't use global variables, we would need to pass them as parameter:
+=> in initSelect():
    I would write "theSelect.onchange = selectChanged(...);"
    This code causes a javascript error on IE. (not firefox)
 so I had to write theSelect.onchange = selectChanged; It's why I use global variables .
 Because I use global variables, I didn't put this code in javascript-static.js.
 This file is loaded in javascript.php.
-*/ 
+*/
 var select_formid;
 var select_targetwindow;
 
@@ -37,14 +37,14 @@ function initSelect(formId,targetWindow)
     theSelect.onchange = selectChanged;
     theSelect.onkeydown = selectKeyed;
     theSelect.onclick = selectClicked;
-    
+
     return true;
 }
 
 function selectChanged(theElement)
 {
     var theSelect;
-    
+
     if (theElement && theElement.value)
     {
         theSelect = theElement;
@@ -53,15 +53,15 @@ function selectChanged(theElement)
     {
         theSelect = this;
     }
-    
+
     if (!theSelect.changed)
     {
         return false;
     }
 
     //here is the onchange redirection
-    select_targetwindow.location=document.getElementById(select_formid).jump.options[document.getElementById(select_formid).jump.selectedIndex].value;                                
-    
+    select_targetwindow.location=document.getElementById(select_formid).jump.options[document.getElementById(select_formid).jump.selectedIndex].value;
+
     return true;
 }
 
@@ -73,7 +73,7 @@ function selectClicked()
 function selectFocussed()
 {
     this.initValue = this.value;
-    
+
     return true;
 }
 
@@ -85,7 +85,7 @@ function selectKeyed(e)
     var keyCodeTab = "9";
     var keyCodeEnter = "13";
     var keyCodeEsc = "27";
-    
+
     if (e)
     {
         theEvent = e;
@@ -108,6 +108,6 @@ function selectKeyed(e)
     {
         this.changed = false;
     }
-    
+
     return true;
 }
\ No newline at end of file
index 174aaba022fe62f66c2c04628c3930f49953d48d..745e2b154f3b2cb543ad76e15fe53269b95bd0ae 100644 (file)
@@ -1,6 +1,6 @@
-<?xml version="1.0" encoding="utf-8" ?> 
-<xs:schema elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema"> 
-    <xs:element name="moodle_database" type="databaseType" /> 
+<?xml version="1.0" encoding="utf-8" ?>
+<xs:schema elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+    <xs:element name="moodle_database" type="databaseType" />
     <xs:complexType name="databaseType">
        <xs:sequence>
                <xs:element maxOccurs="unbounded" name="table"
                use="required" />
        <xs:attribute name="comment" type="xs:string" />
     </xs:complexType>
-    <xs:complexType name="tableType"> 
-        <xs:sequence> 
-            <xs:element maxOccurs="unbounded" name="record" type="recordType" /> 
-        </xs:sequence> 
-        <xs:attribute name="name" type="xs:NCName" use="required" /> 
-        <xs:attribute name="schemaHash" type="xs:string" use="required" /> 
-    </xs:complexType> 
-    <xs:complexType name="recordType"> 
-        <xs:sequence> 
-            <xs:element maxOccurs="unbounded" name="field" type="fieldType" /> 
-        </xs:sequence> 
-    </xs:complexType> 
-    <xs:complexType name="fieldType"> 
-        <xs:simpleContent> 
-            <xs:extension base="xs:string"> 
-                <xs:attribute name="name" type="xs:string" use="required" /> 
-                <xs:attribute default="content" name="value" use="optional"> 
-                    <xs:simpleType> 
-                    <xs:restriction base="xs:string"> 
-                        <xs:enumeration value="content" /> 
-                        <xs:enumeration value="null" /> 
-                    </xs:restriction> 
-                    </xs:simpleType> 
-                </xs:attribute> 
-            </xs:extension> 
-        </xs:simpleContent> 
-    </xs:complexType> 
+    <xs:complexType name="tableType">
+        <xs:sequence>
+            <xs:element maxOccurs="unbounded" name="record" type="recordType" />
+        </xs:sequence>
+        <xs:attribute name="name" type="xs:NCName" use="required" />
+        <xs:attribute name="schemaHash" type="xs:string" use="required" />
+    </xs:complexType>
+    <xs:complexType name="recordType">
+        <xs:sequence>
+            <xs:element maxOccurs="unbounded" name="field" type="fieldType" />
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="fieldType">
+        <xs:simpleContent>
+            <xs:extension base="xs:string">
+                <xs:attribute name="name" type="xs:string" use="required" />
+                <xs:attribute default="content" name="value" use="optional">
+                    <xs:simpleType>
+                    <xs:restriction base="xs:string">
+                        <xs:enumeration value="content" />
+                        <xs:enumeration value="null" />
+                    </xs:restriction>
+                    </xs:simpleType>
+                </xs:attribute>
+            </xs:extension>
+        </xs:simpleContent>
+    </xs:complexType>
 </xs:schema>
index 44b7fc59563c56f955670ef155f6a85ff0e0eee4..9636308e3d9f3d4e2c8878b83cb8c3eb971ff22d 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 
-// This file is part of Moodle - http://moodle.org/ 
-// 
+// This file is part of Moodle - http://moodle.org/
+//
 // Moodle is free software: you can redistribute it and/or modify
 // it under the terms of the GNU General Public License as published by
 // the Free Software Foundation, either version 3 of the License, or
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 // GNU General Public License for more details.
-// 
+//
 // You should have received a copy of the GNU General Public License
 // along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
 
 /**
  * This class abstracts eaccelerator/turckmmcache
  * API to provide
- * 
+ *
  * - get()
  * - set()
  * - delete()
@@ -26,7 +26,7 @@
  * - releaseforfill()
  *
  * Note: do NOT store booleans here. For compatibility with
- * memcached, a false value is indistinguisable from a 
+ * memcached, a false value is indistinguisable from a
  * "not found in cache" response.
  *
  * @copyright Martin Langhoff <martin@catalyst.net.nz>
@@ -105,38 +105,38 @@ class eaccelerator {
             return false;
         }
         return unserialize($rec);
-    } 
-    
+    }
+
     /**
      * @todo Document this function
      *
      * @param string $key
      * @return mixed
-     */    
+     */
     function delete($key) {
         $fn = $this->mode . '_rm';
         return $fn($this->prefix . $key);
     }
 
     /**
-     * In the simple case, this function will 
+     * In the simple case, this function will
      * get the cached value if available. If the entry
      * is not cached, it will try to get an exclusive
      * lock that announces that this process will
      * populate the cache.
      *
      * If we fail to get the lock -- this means another
-     * process is doing it. 
+     * process is doing it.
      * so we wait (block) for a few microseconds while we wait for
      * the cache to be filled or the lock to timeout.
-     * 
+     *
      * If you get a false from this call, you _must_
      * populate the cache ASAP or indicate that
      * you won't by calling releaseforfill().
      *
-     * This technique forces serialisation and so helps deal 
-     * with thundering herd scenarios where a lot of clients 
-     * ask the for the same idempotent (and costly) operation. 
+     * This technique forces serialisation and so helps deal
+     * with thundering herd scenarios where a lot of clients
+     * ask the for the same idempotent (and costly) operation.
      * The implementation is based on suggestions in this message
      * http://marc.theaimsgroup.com/?l=git&m=116562052506776&w=2
      *
@@ -146,7 +146,7 @@ class eaccelerator {
     function getforfill ($key) {
         $get    = $this->mode . '_get';
         $lock   = $this->mode . '_lock';
-        
+
         $rec = $get($this->prefix . $key);
         if (!is_null($rec)) {
             return unserialize($rec);
@@ -170,7 +170,7 @@ class eaccelerator {
     }
 
     /**
-     * Release the exclusive lock obtained by 
+     * Release the exclusive lock obtained by
      * getforfill(). See getforfill()
      * for more details.
      *
index 5af83986bccc711c8c049553d553f440500deb15..c4cfdcea73a2729eee2c7a27bb3c69179823c196 100644 (file)
@@ -10,7 +10,7 @@ Copyright (C) 2005 Miles Kaufmann <http://www.twmagic.com/>
 
 NAME
     EvalMath - safely evaluate math expressions
-    
+
 SYNOPSIS
     <?
       include('evalmath.class.php');
@@ -26,9 +26,9 @@ SYNOPSIS
       // and then use them
       $result = $m->evaluate('3*f(42,a)');
     ?>
-      
+
 DESCRIPTION
-    Use the EvalMath class when you want to evaluate mathematical expressions 
+    Use the EvalMath class when you want to evaluate mathematical expressions
     from untrusted sources.  You can define your own variables and functions,
     which are stored in the object.  Try it, it's fun!
 
@@ -37,13 +37,13 @@ METHODS
         Evaluates the expression and returns the result.  If an error occurs,
         prints a warning and returns false.  If $expr is a function assignment,
         returns true on success.
-    
+
     $m->e($expr)
         A synonym for $m->evaluate().
-    
+
     $m->vars()
         Returns an associative array of all user-defined variables and values.
-        
+
     $m->funcs()
         Returns an array of all user-defined functions.
 
@@ -62,7 +62,7 @@ LICENSE
     Redistribution and use in source and binary forms, with or without
     modification, are permitted provided that the following conditions are
     met:
-    
+
     1   Redistributions of source code must retain the above copyright
         notice, this list of conditions and the following disclaimer.
     2.  Redistributions in binary form must reproduce the above copyright
@@ -71,7 +71,7 @@ LICENSE
     3.  The name of the author may not be used to endorse or promote
         products derived from this software without specific prior written
         permission.
-    
+
     THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
     IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
     WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -89,14 +89,14 @@ LICENSE
 /**
  * This class was heavily modified in order to get usefull spreadsheet emulation ;-)
  * skodak
- * 
+ *
  */
 
 class EvalMath {
 
     var $suppress_errors = false;
     var $last_error = null;
-    
+
     var $v = array(); // variables (and constants)
     var $f = array(); // user-defined functions
     var $vb = array(); // constants
@@ -110,14 +110,14 @@ class EvalMath {
         'average'=>array(-1), 'max'=>array(-1),  'min'=>array(-1),
         'mod'=>array(2),      'pi'=>array(0),    'power'=>array(2),
         'round'=>array(1, 2), 'sum'=>array(-1));
-    
+
     function EvalMath() {
     }
-    
+
     function e($expr) {
         return $this->evaluate($expr);
     }
-    
+
     function evaluate($expr) {
         $this->last_error = null;
         $expr = trim($expr);
@@ -157,11 +157,11 @@ class EvalMath {
             return $this->pfx($this->nfx($expr)); // straight up evaluation, woo
         }
     }
-    
+
     function vars() {
         return $this->v;
     }
-    
+
     function funcs() {
         $output = array();
         foreach ($this->f as $fnn=>$dat)
@@ -173,23 +173,23 @@ class EvalMath {
 
     // Convert infix to postfix notation
     function nfx($expr) {
-    
+
         $index = 0;
         $stack = new EvalMathStack;
         $output = array(); // postfix form of expression, to be passed to pfx()
         $expr = trim(strtolower($expr));
-        
+
         $ops   = array('+', '-', '*', '/', '^', '_');
-        $ops_r = array('+'=>0,'-'=>0,'*'=>0,'/'=>0,'^'=>1); // right-associative operator?  
+        $ops_r = array('+'=>0,'-'=>0,'*'=>0,'/'=>0,'^'=>1); // right-associative operator?
         $ops_p = array('+'=>0,'-'=>0,'*'=>1,'/'=>1,'_'=>1,'^'=>2); // operator precedence
-        
+
         $expecting_op = false; // we use this in syntax-checking the expression
                                // and determining when a - is a negation
-    
+
         if (preg_match("/[^\w\s+*^\/()\.,-]/", $expr, $matches)) { // make sure the characters are all good
             return $this->trigger("illegal character '{$matches[0]}'");
         }
-    
+
         while(1) { // 1 Infinite Loop ;)
             $op = substr($expr, $index, 1); // get the first character at the current index
             // find out if we're currently at the beginning of a number/variable/function/parenthesis/operand
@@ -198,7 +198,7 @@ class EvalMath {
             if ($op == '-' and !$expecting_op) { // is it a negation instead of a minus?
                 $stack->push('_'); // put a negation on the stack
                 $index++;
-            } elseif ($op == '_') { // we have to explicitly deny this, because it's legal on the stack 
+            } elseif ($op == '_') { // we have to explicitly deny this, because it's legal on the stack
                 return $this->trigger("illegal character '_'"); // but not in the input expression
             //===============
             } elseif ((in_array($op, $ops) or $ex) and $expecting_op) { // are we putting an operator on the stack?
@@ -243,7 +243,7 @@ class EvalMath {
                 $index++;
             //===============
             } elseif ($op == ',' and $expecting_op) { // did we just finish a function argument?
-                while (($o2 = $stack->pop()) != '(') { 
+                while (($o2 = $stack->pop()) != '(') {
                     if (is_null($o2)) return $this->trigger("unexpected ','"); // oops, never had a (
                     else $output[] = $o2; // pop the argument expression stuff and push onto the output
                 }
@@ -307,11 +307,11 @@ class EvalMath {
                     break;
                 }
             }
-            while (substr($expr, $index, 1) == ' ') { // step the index past whitespace (pretty much turns whitespace 
+            while (substr($expr, $index, 1) == ' ') { // step the index past whitespace (pretty much turns whitespace
                 $index++;                             // into implicit multiplication if no operator is there)
             }
-        
-        } 
+
+        }
         while (!is_null($op = $stack->pop())) { // pop everything off the stack and push onto output
             if ($op == '(') return $this->trigger("expecting ')'"); // if there are (s on the stack, ()s were unbalanced
             $output[] = $op;
@@ -321,11 +321,11 @@ class EvalMath {
 
     // evaluate postfix notation
     function pfx($tokens, $vars = array()) {
-        
+
         if ($tokens == false) return false;
-    
+
         $stack = new EvalMathStack;
-        
+
         foreach ($tokens as $token) { // nice and easy
 
             // if the token is a function, pop arguments off the stack, hand them to the function, and push the result back on
@@ -393,7 +393,7 @@ class EvalMath {
         if ($stack->count != 1) return $this->trigger("internal error");
         return $stack->pop();
     }
-    
+
     // trigger an error, but nicely, if need be
     function trigger($msg) {
         $this->last_error = $msg;
@@ -407,12 +407,12 @@ class EvalMathStack {
 
     var $stack = array();
     var $count = 0;
-    
+
     function push($val) {
         $this->stack[$this->count] = $val;
         $this->count++;
     }
-    
+
     function pop() {
         if ($this->count > 0) {
             $this->count--;
@@ -420,7 +420,7 @@ class EvalMathStack {
         }
         return null;
     }
-    
+
     function last($n=1) {
         if ($this->count - $n >= 0) {
             return $this->stack[$this->count-$n];
index 271895aa9124e1dffe1951db9ec820d4b044850d..0eae06bb1a4cf917d2a0e65142ceabf42757324c 100644 (file)
@@ -189,7 +189,7 @@ class MoodleQuickForm_editor extends HTML_QuickForm_element {
                 $str .= $PAGE->requires->js_function_call('destroy_item', array("{$id}_filemanager"))->asap();
             }
         } else {
-            // should disable file picker 
+            // should disable file picker
             $str .= 'No file allowed';
         }
 
index 958adfd9196cc52a39bdc53a5c795d176cb2c6ed..6dbab8ff0025821c5c88434b9bbffcec8929c4e5 100644 (file)
@@ -163,12 +163,12 @@ function html_compiler(client_id, options) {
         // hide file browser and breadcrumb
         container.style.display='none';
         if (options.path.length <= 1) {
-            breadcrumb.style.display='none'; 
+            breadcrumb.style.display='none';
         }
         return;
     } else {
         container.style.display='block';
-        breadcrumb.style.display='block'; 
+        breadcrumb.style.display='block';
     }
     count = 0;
     for(var i in list) {
@@ -211,7 +211,7 @@ function html_compiler(client_id, options) {
                 }
             break;
         }
-        var fullname = list[i].fullname; 
+        var fullname = list[i].fullname;
         if (ismainfile) {
             fullname = "<strong>"+list[i].fullname+"</strong> <img src='"+moodle_cfg.wwwroot+"/pix/i/tick_green_small.gif"+"' />";
         }
@@ -567,7 +567,7 @@ function create_menu(ev, menuid, menuitems, file, options) {
 
             var rootNode = tree.getRoot();
             tree.setDynamicLoad(this.loadDataForNode);
-            tree.removeChildren(rootNode); 
+            tree.removeChildren(rootNode);
             var textnode = {label: "Files", path: '/', itemid: obj.itemid};
             var tmpNode = new YAHOO.widget.TextNode(textnode, rootNode, true);
             tree.draw();
@@ -614,10 +614,10 @@ function setup_filebrowser(client_id, options) {
     fm_cfg[client_id] = options;
     fm_cfg[client_id].mainfile = options.mainfile;
     fm_cfg[client_id].currentpath = '/';
-    fm_cfg[client_id].currentfiles = 0; 
+    fm_cfg[client_id].currentfiles = 0;
     // XXX: When editing existing folder, currentfiles shouldn't
     // be 0
-    fm_cfg[client_id].maxfiles = options.maxfiles; 
+    fm_cfg[client_id].maxfiles = options.maxfiles;
     if (options.mainfile) {
         var mainfilename = document.getElementById(options.mainfile+'-id');
         if (mainfilename.value) {
@@ -683,7 +683,7 @@ function setup_buttons(client_id, options) {
             success:function(o) {
                 var result = json_decode(o.responseText);
                 refresh_filemanager(result.filepath, fm_cfg[this.client_id]);
-                var win = window.open(result.fileurl, 'fm-download-folder'); 
+                var win = window.open(result.fileurl, 'fm-download-folder');
                 if (!win) {
                     alert(mstr.repository.popupblockeddownload);
                 }
index 4825c2337d19bc999128c5142cf3232d3dde8405..86bef4db58183b5632f68db405fd25e0d6f4f91f 100644 (file)
@@ -18,7 +18,7 @@ class MoodleQuickForm_header extends HTML_QuickForm_header
     function MoodleQuickForm_header($elementName = null, $text = null) {
         parent::HTML_QuickForm_header($elementName, $text);
     }
-    
+
     // {{{ accept()
 
    /**
index 4aa14a7a04d25dd4a3d4f086f108769f8c05b3e5..70014cb78466fc055b22dec59fa1bfb8ad3dd9ee 100644 (file)
@@ -18,7 +18,7 @@ class MoodleQuickForm_hidden extends HTML_QuickForm_hidden{
     function MoodleQuickForm_hidden($elementName=null, $value='', $attributes=null) {
         parent::HTML_QuickForm_hidden($elementName, $value, $attributes);
     }
-    
+
     /**
      * set html for help button
      *
index 5b9a20d315df8e2bbaf385172351158c425a1ea5..9c650a719fd277632938217a9424f0c55655c509 100644 (file)
@@ -19,7 +19,7 @@ class MoodleQuickForm_text extends HTML_QuickForm_text{
     function MoodleQuickForm_text($elementName=null, $elementLabel=null, $attributes=null) {
         parent::HTML_QuickForm_text($elementName, $elementLabel, $attributes);
     }
-    
+
     function setHiddenLabel($hiddenLabel){
         $this->_hiddenLabel = $hiddenLabel;
     }
index 26a2cceb3d021d59c4ed4560a1996d4194867019..1982a94ebccf2de3e0b265db9cfd446ba38e9110 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 
-// This file is part of Moodle - http://moodle.org/ 
-// 
+// This file is part of Moodle - http://moodle.org/
+//
 // Moodle is free software: you can redistribute it and/or modify
 // it under the terms of the GNU General Public License as published by
 // the Free Software Foundation, either version 3 of the License, or
@@ -11,7 +11,7 @@
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 // GNU General Public License for more details.
-// 
+//
 // You should have received a copy of the GNU General Public License
 // along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
 
  * @global object
  * @param object $dst_img
  * @param object $src_img
- * @param int $dst_x 
- * @param int $dst_y 
- * @param int $src_x 
- * @param int $src_y 
- * @param int $dst_w 
- * @param int $dst_h 
- * @param int $src_w 
- * @param int $src_h 
+ * @param int $dst_x
+ * @param int $dst_y
+ * @param int $src_x
+ * @param int $src_y
+ * @param int $dst_w
+ * @param int $dst_h
+ * @param int $src_w
+ * @param int $src_h
  * @return bool
  * @todo Finish documenting this function
  */
@@ -124,7 +124,7 @@ function create_profile_image_destination($id, $dir='user') {
             return false;
         }
     }
-    
+
     if ($dir == 'user') {
         $destination = make_user_directory($id, true);
     } else {
index 380fc541ef7730d330049527ba2a0e7bb1ac550b..d0597fcd8105591e91f52cb6754d8f3f7d4457c6 100644 (file)
@@ -1,19 +1,19 @@
 # On some PHP servers it may help if this file is copied
 # to the main moodle directory and renamed .htaccess
 #
-# As soon as you do this, check your web site.  Is it 
+# As soon as you do this, check your web site.  Is it
 # still working OK?  If you are getting a "configuration
 # error" then you may need to enable overrides by editing
 # the main httpd.conf for Apache and in the main server
 # or virtual server area, adding something like:
 #
 # <Directory /web/moodle>
-#     AllowOverride All 
+#     AllowOverride All
 # </Directory>
 #
 
 ### Firstly, if you are using Apache 2, you need the following
-### three lines to allow Apache to pass a PATH_INFO variable 
+### three lines to allow Apache to pass a PATH_INFO variable
 ### correctly for URLs like http://server/file.php/arg1/arg2
 
 <IfDefine APACHE2>
@@ -42,7 +42,7 @@ php_flag session.bug_compat_warn 0
 LimitRequestBody 0
 
 
-### These are optional - you may not want to override php.ini 
+### These are optional - you may not want to override php.ini
 ### To enable them, remove the leading hash (#)
 
 #php_value upload_max_filesize 2M
@@ -50,9 +50,9 @@ LimitRequestBody 0
 #php_value session.gc_maxlifetime 7200
 
 
-### You can change the following line to point to the 
-### error/index.php file in your Moodle distribution.  
-### It provides a form which emails you (the admin) 
+### You can change the following line to point to the
+### error/index.php file in your Moodle distribution.
+### It provides a form which emails you (the admin)
 ### about 404 errors (URL not found).
 
 #ErrorDocument 404 http://example.org/moodle/error/index.php
index b4e67f89ade41a4abe959a7fdeb030c109943ba9..fa5e3d3e2367a0a56dda72286cb18f64ec7c253e 100644 (file)
@@ -422,7 +422,7 @@ navigation_tree.prototype.move_to_block_position = function(e) {
     }
 
     YAHOO.moodle.navigation.tabpanel.remove_from_tab_panel(this.name);
-    
+
     var block = this.cachedcontent;
     while (!YAHOO.util.Dom.hasClass(block, 'sideblock')) {
         block = block.parentNode;
index 7e09d1a666383e96216005a42bfda3bef5be2f5c..196a3d52ef74e25a16704eaaf09ba0128b9b8231 100644 (file)
@@ -762,10 +762,10 @@ function addonload(fn) {
 }
 /**
  * Replacement for getElementsByClassName in browsers that aren't cool enough
- * 
+ *
  * Relying on the built-in getElementsByClassName is far, far faster than
  * using YUI.
- * 
+ *
  * Note: the third argument used to be an object with odd behaviour. It now
  * acts like the 'name' in the HTML5 spec, though the old behaviour is still
  * mimicked if you pass an object.
index 582582398053042377fd46778f4c34704699be1f..5824fa0062ba3abcbd8c7b9a68ac81f5f5322ecf 100644 (file)
@@ -470,7 +470,7 @@ function kses_bad_protocol($string, $allowed_protocols)
 ###############################################################################
 {
   $string = kses_no_null($string);
-  $string = preg_replace('/([^\xc3-\xcf])\xad+/', '\\1', $string); # deals with Opera "feature" -- moodle utf8 fix 
+  $string = preg_replace('/([^\xc3-\xcf])\xad+/', '\\1', $string); # deals with Opera "feature" -- moodle utf8 fix
   $string2 = $string.'a';
 
   while ($string != $string2)
index 38b8b5a12a846dd164716240bf76775bc0b1b55b..4936737d5c8aef0474519f90a3d31192dfcca86d 100644 (file)
@@ -32,7 +32,7 @@ abstract class file_packer {
 
     /**
      * Archive files and store the result in file storage
-     * @param array $files array with zip paths as keys (archivepath=>ospathname or archivepath=>stored_file) 
+     * @param array $files array with zip paths as keys (archivepath=>ospathname or archivepath=>stored_file)
      * @param int $contextid
      * @param string $filearea
      * @param int $itemid
@@ -44,7 +44,7 @@ abstract class file_packer {
 
     /**
      * Archive files and store the result in os file
-     * @param array $files array with zip paths as keys (archivepath=>ospathname or archivepath=>stored_file) 
+     * @param array $files array with zip paths as keys (archivepath=>ospathname or archivepath=>stored_file)
      * @param string $archivefile path to target zip file
      * @return bool success
      */
index 6ea044e7f8b1777dd8f13ef6bbd97a8b88ce13d9..b6aa7545209585bdd74734496a51d1ced80b7b05 100644 (file)
@@ -35,7 +35,7 @@ class zip_packer extends file_packer {
 
     /**
      * Zip files and store the result in file storage
-     * @param array $files array with full zip paths (including directory information) as keys (archivepath=>ospathname or archivepath/subdir=>stored_file) 
+     * @param array $files array with full zip paths (including directory information) as keys (archivepath=>ospathname or archivepath/subdir=>stored_file)
      * @param int $contextid
      * @param string $filearea
      * @param int $itemid
@@ -75,7 +75,7 @@ class zip_packer extends file_packer {
 
     /**
      * Zip files and store the result in os file
-     * @param array $files array with zip paths as keys (archivepath=>ospathname or archivepath=>stored_file) 
+     * @param array $files array with zip paths as keys (archivepath=>ospathname or archivepath=>stored_file)
      * @param string $archivefile path to target zip file
      * @return bool success
      */
index ea9e6ab0a9fcc3778278f4fa9374d87116fc8b08..b9858b309d8b1b1bb0b0ae3f4a9016e55d3a351a 100644 (file)
@@ -264,7 +264,7 @@ function rss_add_items($items) {
             $result .= rss_full_tag('link',3,false,$item->link);
             $result .= rss_add_enclosures($item);
             $result .= rss_full_tag('pubDate',3,false,gmdate('D, d M Y H:i:s',$item->pubdate).' GMT');  # MDL-12563
-            //Include the author if exists 
+            //Include the author if exists
             if (isset($item->author)) {
                 //$result .= rss_full_tag('author',3,false,$item->author);
                 //We put it in the description instead because it's more important
index 3ea8e9580439a7a9d10f735cc2a1c09b3f0276ac..deef6c5fa641d8443a20e44803c58b9e9c662031 100644 (file)
@@ -48,11 +48,11 @@ require_once($CFG->libdir.'/simplepie/simplepie.inc');
  */
 class moodle_simplepie extends SimplePie
 {
-    /** 
+    /**
      * Constructor - creates an instance of the SimplePie class
      * with Moodle defaults.
      *
-     * @param string $feedurl optional URL of the feed 
+     * @param string $feedurl optional URL of the feed
      */
     function __construct($feedurl = null) {
 
@@ -91,7 +91,7 @@ class moodle_simplepie extends SimplePie
     }
 
     /**
-     * Reset RSS cache 
+     * Reset RSS cache
      *
      * @return boolean success if cache clear or didn't exist
      */
@@ -124,7 +124,7 @@ class moodle_simplepie_file extends SimplePie_File
         $this->method = SIMPLEPIE_FILE_SOURCE_REMOTE | SIMPLEPIE_FILE_SOURCE_CURL;
 
         $curl = new curl();
-        $curl->setopt( array( 
+        $curl->setopt( array(
                 'CURLOPT_HEADER' => true,
                 'CURLOPT_TIMEOUT' => $timeout,
                 'CURLOPT_CONNECTTIMEOUT' => $timeout ));
index b4cb65185d97ccbe7e652106fa7d54e367170b19..b1c4923fc246adf8cf32001f89e04a38a0321a6e 100644 (file)
@@ -23,7 +23,7 @@
 
 Local customisations directory
 ==============================
-This directory is the recommended place for local customisations. 
+This directory is the recommended place for local customisations.
 
 Wherever possible, customisations should be written using one of the
 standard plug-in points like modules, blocks, auth plugins, themes, etc.
@@ -94,7 +94,7 @@ $ADMIN->add('tweaks', new admin_externalpage('nicehackery', 'Tweak something',
 Custom event handlers
 ---------------------
 Events intended primarily for communication "core --> plugins". (It should not
-be use in opposite direction!) In theory it could be also used for 
+be use in opposite direction!) In theory it could be also used for
 "plugin --> plugin" communication too. The list of core events is documented
 in lib/db/events.php
 
@@ -103,7 +103,7 @@ sample files
 $handlers = array (
     'user_deleted' => array (
          'handlerfile'      => '/local/nicehack/lib.php',
-         'handlerfunction'  => 'nicehack_userdeleted_handler', 
+         'handlerfunction'  => 'nicehack_userdeleted_handler',
          'schedule'         => 'instant'
      ),
 );
index 85288a94e4cd1e89c429272a5c0077c70ea83437..b7e9d22f2d0e32ce782a7b343d53213e79304c23 100644 (file)
@@ -13,7 +13,7 @@ Each of these modules contains a number of expected components:
   icon.gif: a 16x16 icon for the module
 
   db/install.xml: an SQL dump of all the required db tables and data
+
   index.php: a page to list all instances in a course
 
   view.php: a page to view a particular instance
@@ -37,6 +37,6 @@ Each of these modules contains a number of expected components:
 
 
 If you are a developer and interested in developing new Modules see:
-  
+
    Moodle Documentation:  http://moodle.org/doc
    Moodle Community:      http://moodle.org/community
index 939a79ff7c480015068e152861bdea3bbb69e0f5..b6611812d8a79ab6ade8ceca44f5f60139c5b039 100644 (file)
@@ -14,7 +14,7 @@ required changes in code:
 * rewrite trusstext support - new db table columns needed
 * migrade all module features from mod_edit.php form to lib.php/modulename_supports() function
 * implement new gradebook support (legacy 1.8.x grading not supported anymore)
-* migrate custom resource module subtypes into separate modules 
+* migrate custom resource module subtypes into separate modules
 
 optional - no changes needed in older code:
 * portfolio support
index 9e84124e2fdb9326e891520e6dd33d44c312b36d..dcebbefd9b2483dcd0408b00db25fefeb5e94d2e 100644 (file)
@@ -1,13 +1,13 @@
-<?php 
+<?php
 // Outputs pictures from theme or core pix folder. Only used if $CFG->smartpix is
 // turned on.
 
 $matches=array(); // Reusable array variable for preg_match
+
 // This does NOT use config.php. This is because doing that makes database requests
 // which cause this to take longer (I benchmarked this at 16ms, 256ms with config.php)
 // A version using normal Moodle functions is included in comment at end in case we
-// want to switch to it in future. 
+// want to switch to it in future.
 
 function error($text,$notfound=false) {
     header($notfound ? 'HTTP/1.0 404 Not Found' : 'HTTP/1.0 500 Internal Server Error');
@@ -44,7 +44,7 @@ function strip_querystring($url) {
         return $url;
     }
 }
+
 // get query string
 function get_query($name) {
     if (!empty($_SERVER['REQUEST_URI'])) {
@@ -57,7 +57,7 @@ function get_query($name) {
 }
 // Nicked from weblib then cutdown
 /**
- * Extracts file argument either from file parameter or PATH_INFO. 
+ * Extracts file argument either from file parameter or PATH_INFO.
  * @param string $scriptname name of the calling script
  * @return string file path (only safe characters)
  */
@@ -84,10 +84,10 @@ function get_file_argument_limited($scriptname) {
     if (!empty($arr[1])) {
         return makesafe(rawurldecode(strip_querystring($arr[1])));
     }
-    
+
     error('Unexpected PHP set up. Turn off the smartpix config option.');
-} 
+}
+
 // We do need to get dirroot from config.php
 if(!$config=@file_get_contents(dirname(__FILE__).'/../config.php')) {
     error("Can't open config.php");
@@ -138,17 +138,17 @@ if(file_exists($possibility="$dirroot/theme/$theme/pix/$path")) {
     $file=$possibility;
 } else {
     // Is there a parent theme?
-    while(true) {        
+    while(true) {
         require("$dirroot/theme/$theme/config.php"); // Sets up $THEME
         if(!$THEME->parent) {
             break;
-        }        
+        }
         $theme=$THEME->parent;
         if(file_exists($possibility="$dirroot/theme/$theme/pix/$path")) {
             $file=$possibility;
             // Found in parent theme
             break;
-        }    
+        }
     }
     if(!$file) {
         if(preg_match('|^mod/|',$path)) {
@@ -176,11 +176,11 @@ if($ifmodifiedsince && strtotime($ifmodifiedsince)>=$filedate) {
 }
 header('Last-Modified: '.gmdate('D, d M Y H:i:s',$filedate).' GMT');
 
-// As I'm not loading config table from DB, this is hardcoded here; expiry 
+// As I'm not loading config table from DB, this is hardcoded here; expiry
 // 4 hours, unless the hacky file reduceimagecache.dat exists in dataroot
 if(file_exists($reducefile=$dataroot.'/reduceimagecache.dat')) {
     $lifetime=file_read_contents($reducefile);
-} else {   
+} else {
     $lifetime=4*60*60;
 }
 
@@ -198,7 +198,7 @@ fpassthru($handle);
 fclose($handle);
 
 // Slower Moodle-style version follows:
+
 //// Outputs pictures from theme or core pix folder. Only used if $CFG->smartpix is
 //// turned on.
 //
@@ -208,7 +208,7 @@ fclose($handle);
 //global $CFG;
 //
 //$matches=array(); // Reusable array variable for preg_match
-// 
+//
 //// Split path - starts with theme name, then actual image path inside pix
 //$path=get_file_argument('smartpix.php');
 //$match=array();
@@ -237,17 +237,17 @@ fclose($handle);
 //    $file=$possibility;
 //} else {
 //    // Is there a parent theme?
-//    while(true) {        
+//    while(true) {
 //        require("$CFG->dirroot/theme/$theme/config.php"); // Sets up $THEME
 //        if(!$THEME->parent) {
 //            break;
-//        }        
+//        }
 //        $theme=$THEME->parent;
 //        if(file_exists($possibility="$CFG->dirroot/theme/$theme/pix/$path")) {
 //            $file=$possibility;
 //            // Found in parent theme
 //            break;
-//        }    
+//        }
 //    }
 //    if(!$file) {
 //        if(preg_match('|^mod/|',$path)) {
index e13d664e13ef807b84561c4cbeb3e982d5828d17..e986e55cb7efde7e2089bc014a9530a7c20e0700 100644 (file)
@@ -24,7 +24,7 @@ define('NO_MOODLE_COOKIES', true); // session not used here
     $lifetime = 3600;  // Seconds for files to remain in caches - 1 hour
 
     // this is a big one big hack - NO_MOODLE_COOKIES is not compatible with capabilities MDL-7243
-    // it should be replaced once we get to codes in urls 
+    // it should be replaced once we get to codes in urls
 
     $relativepath = get_file_argument();
 
@@ -79,7 +79,7 @@ define('NO_MOODLE_COOKIES', true); // session not used here
         $context = get_context_instance(CONTEXT_COURSE, $course->id);
         $isuser = has_capability('moodle/course:view', $context, $userid);
     }
-    
+
     //Check for "security" if !course->guest or course->password
     if ($course->id != SITEID) {
         if ((!$course->guest || $course->password) && (!$isuser)) {
index 689cadf9da429ba1cc7bb6cf80f06a2029ffd602..e635db8131c9a62294f1db0f7ecb96e205bee0c1 100644 (file)
@@ -11,7 +11,7 @@
     // It's a security risk to carry that in $SESSION so we put up login form.
     $PAGE->set_url(new moodle_url($CFG->wwwroot.'/sso/hive/expired.php'));
     echo $OUTPUT->header();
-    echo $OUTPUT->notification('Your session has expired. Please log in again.'); 
+    echo $OUTPUT->notification('Your session has expired. Please log in again.');
 ?>
       <form action="login.php" method="post" id="login">
         <table border="0" align="center">
index c1e105494e27bec2d9068d9d69caf090d64a1b63..465612976d3c9c15f5adc6e8ac4859ec853d018f 100644 (file)
@@ -7,11 +7,11 @@
 
     require_login();
 
-    // get the login data 
+    // get the login data
     $frm = data_submitted();
 
     // log back into Hive
-    if (sso_user_login($frm->username, $frm->password)) {  
+    if (sso_user_login($frm->username, $frm->password)) {
 
         /// reopen Hive
         redirect($CFG->wwwroot.'/mod/resource/type/repository/hive/openlitebrowse.php');
index 0031dce0e1c5608436e45ec6e106f81be30644c1..e7251ee12a768de5861c21828ab07f5911f12e82 100644 (file)
@@ -17,7 +17,7 @@ function init_tag_autocomplete() {
     document.getElementById('id_relatedtags').style.width = '30%';
     myAutoComp.allowBrowserAutocomplete = false;
     myAutoComp.maxResultsDisplayed = 20;
-    myAutoComp.delimChar = [","," "]; 
+    myAutoComp.delimChar = [","," "];
     myAutoComp.formatResult = function(oResultData, sQuery, sResultMatch) {
         return (sResultMatch);
     };
index ef87e09d0e1ff3dace28bcb62e57b23078e9aa06..33fef4bccd3a8c80f4c69e0531be0d2b6564a803 100644 (file)
@@ -9,7 +9,7 @@ if (empty($CFG->usetags)) {
     print_error('tagsaredisabled', 'tag');
 }
 
-$query = optional_param('query', '', PARAM_RAW);  
+$query = optional_param('query', '', PARAM_RAW);
 
 if ($similar_tags = tag_autocomplete($query)) {
     foreach ($similar_tags as $tag) {
index 77b8483499ab14dfde216d64b81ec9e779f45cbb..8ee787f90dd77e6f24fa3ad1110e569376f57369 100644 (file)
 
         public function initApp():void{
             moodleWebServices = new RemoteObject();
-            var cs:ChannelSet = new ChannelSet(); 
+            var cs:ChannelSet = new ChannelSet();
             cs.addChannel(new AMFChannel("myAmf", Application.application.parameters.amfurl));
-            moodleWebServices.destination = "Dest"; 
+            moodleWebServices.destination = "Dest";
             moodleWebServices.channelSet = cs;
             moodleWebServices.showBusyCursor = true;
 
             moodleWebServices.get_users.addEventListener('result', handleReturnGetUsers);
             moodleWebServices.update_users.addEventListener('result', handleReturn);
             moodleWebServices.create_users.addEventListener('result', handleReturn);
-             
+
             moodleWebServices.addEventListener('fault', handleFault);
             moodleWebServices.addEventListener('result', handleReturn);
-            
+
             print_props('Application.application.parameters.amfurl', Application.application.parameters.amfurl);
             print_props('moodleWebServices', moodleWebServices);
             getUsers('');
         import mx.events.DataGridEvent;
         private function itemEditEndEvent(event:DataGridEvent):void {
             print_props('event:DataGridEvent', event);
-            var newData:String= 
+            var newData:String=
                     TextInput(event.currentTarget.itemEditorInstance).text;
             if (newData!=userlist.editedItemRenderer.data[event.dataField])
             {
 
          var invalid:Boolean = false;
          vResult = usernameValidator.validate();
-         if (vResult.type==ValidationResultEvent.INVALID) 
+         if (vResult.type==ValidationResultEvent.INVALID)
              invalid=true;
          vResult = passwordValidator.validate();
-         if (vResult.type==ValidationResultEvent.INVALID) 
+         if (vResult.type==ValidationResultEvent.INVALID)
              invalid=true;
          vResult = firstnameValidator.validate();
-         if (vResult.type==ValidationResultEvent.INVALID) 
+         if (vResult.type==ValidationResultEvent.INVALID)
              invalid=true;
          vResult = lastnameValidator.validate();
-         if (vResult.type==ValidationResultEvent.INVALID) 
+         if (vResult.type==ValidationResultEvent.INVALID)
              invalid=true;
          vResult = emailValidator.validate();
-         if (vResult.type==ValidationResultEvent.INVALID) 
+         if (vResult.type==ValidationResultEvent.INVALID)
              invalid=true;
          if (invalid){
             return;
          }
          var itemToAdd:Object=
             {status:'to insert',
-             username : username.text, 
-             idnumber : idnumber.text, 
-             firstname : firstname.text, 
-             lastname : lastname.text, 
-             email : email.text, 
-             password : password.text, 
-             auth : auth.text, 
-             confirmed : confirmed.text, 
-             timezone : timezone.text, 
-             country : country.text, 
-             emailstop : emailstop.text, 
-             theme : theme.text, 
-             lang : lang.text, 
+             username : username.text,
+             idnumber : idnumber.text,
+             firstname : firstname.text,
+             lastname : lastname.text,
+             email : email.text,
+             password : password.text,
+             auth : auth.text,
+             confirmed : confirmed.text,
+             timezone : timezone.text,
+             country : country.text,
+             emailstop : emailstop.text,
+             theme : theme.text,
+             lang : lang.text,
              mailformat : mailformat.text};
          if (initDG==null){
             initData(new Array(itemToAdd))
@@ -206,8 +206,8 @@ The text area below displays some debug messages.
 
 
 
-   <mx:DataGrid id ="userlist" itemEditEnd="itemEditEndEvent(event);" editable="true" width="100%" height="400" 
-      dataProvider="{initDG}" > 
+   <mx:DataGrid id ="userlist" itemEditEnd="itemEditEndEvent(event);" editable="true" width="100%" height="400"
+      dataProvider="{initDG}" >
 
       <mx:columns>
 
@@ -233,7 +233,7 @@ The text area below displays some debug messages.
 <mx:Button id="button_update_users" label="Call update_users" click="updateUsers();true;"/>
 <mx:Button id="button_create_users" label="Call create_users" click="createUsers();true;"/>
 </mx:HBox>
+
 
 </mx:VBox>
 <mx:Form width="500" defaultButton="{create_users}" label="Add A User">
index ae439601fe9834688f21f6c2d23fa4ded26d34da..114b16a6e7ce7b744dae2717ad8aa343f1aa09d8 100644 (file)
@@ -39,7 +39,7 @@ class webservice_soap_server extends webservice_zend_server {
         ini_set('soap.wsdl_cache_enabled', '0');
         require_once 'Zend/Soap/Server.php';
         require_once 'Zend/Soap/AutoDiscover.php';
-        
+
         if (optional_param('wsdl', 0, PARAM_BOOL)) {
             parent::__construct($simple, 'Zend_Soap_AutoDiscover');
         } else {
@@ -114,7 +114,7 @@ class webservice_soap_server extends webservice_zend_server {
         } else {
             $info = 'Unknown error';
         }
-        
+
         $xml = '<?xml version="1.0" encoding="UTF-8"?>
 <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
 <SOAP-ENV:Body><SOAP-ENV:Fault>