]> 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 12:51:40 +0000 (12:51 +0000)
committerPetr Skoda <skodak@moodle.org>
Sun, 1 Nov 2009 12:51:40 +0000 (12:51 +0000)
106 files changed:
enrol/README.txt
enrol/authorize/authorizenet.class.php
enrol/authorize/config_form.php
enrol/authorize/const.php
enrol/authorize/db/access.php
enrol/authorize/db/upgrade.php
enrol/authorize/enrol.php
enrol/authorize/enrol_form.php
enrol/authorize/index.php
enrol/authorize/localfuncs.php
enrol/authorize/locallib.php
enrol/authorize/uploadcsv.php
enrol/authorize/version.php
enrol/database/config.html
enrol/database/enrol.php
enrol/database/enrol_database_sync.php
enrol/flatfile/enrol.php
enrol/imsenterprise/README.txt
enrol/imsenterprise/TODO.txt
enrol/imsenterprise/config.html
enrol/imsenterprise/enrol.php
enrol/imsenterprise/entv1p1_conformance_summary.html
enrol/imsenterprise/examples/example-grouped.xml
enrol/imsenterprise/examples/example.xml
enrol/index.html
enrol/ldap/config.html
enrol/ldap/enrol.php
enrol/ldap/enrol_ldap_sync.php
enrol/manual/config.html
enrol/manual/enrol.php
enrol/mnet/allowed_courses.php
enrol/mnet/enrol.php
enrol/paypal/config.html
enrol/paypal/db/upgrade.php
enrol/paypal/enrol.php
enrol/paypal/ipn.php
enrol/paypal/return.php
enrol/paypal/version.php
filter/activitynames/filter.php
filter/algebra/algebradebug.php
filter/algebra/filter.php
filter/algebra/pix.php
filter/censor/README.txt
filter/censor/filter.php
filter/censor/filtersettings.php
filter/emailprotect/filter.php
filter/local_settings_form.php
filter/manage.php
filter/mediaplugin/eolas_fix.js
filter/mediaplugin/filter.php
filter/mediaplugin/filtersettings.php
filter/mediaplugin/flvplayer.README.txt
filter/multilang/README.txt
filter/multilang/filter.php
filter/multilang/filtersettings.php
filter/tex/displaytex.php
filter/tex/filter.php
filter/tex/filtersettings.php
filter/tex/latex.php
filter/tex/lib.php
filter/tex/texdebug.php
filter/tex/texed.php
filter/tidy/filter.php
portfolio/add.php
portfolio/already.php
portfolio/file.php
portfolio/type/boxnet/simpletest/testportfoliopluginboxnet.php
portfolio/type/boxnet/version.php
portfolio/type/download/file.php
portfolio/type/download/simpletest/testportfolioplugindownload.php
portfolio/type/download/version.php
portfolio/type/flickr/version.php
portfolio/type/googledocs/db/events.php
portfolio/type/googledocs/lib.php
portfolio/type/googledocs/version.php
portfolio/type/mahara/db/upgrade.php
portfolio/type/mahara/lib.php
portfolio/type/mahara/preconfig.php
portfolio/type/mahara/version.php
portfolio/type/picasa/db/events.php
portfolio/type/picasa/lib.php
portfolio/type/picasa/version.php
repository/alfresco/repository.class.php
repository/boxnet/repository.class.php
repository/draft/repository.class.php
repository/filesystem/repository.class.php
repository/flickr/repository.class.php
repository/flickr_public/image.php
repository/flickr_public/repository.class.php
repository/googledocs/repository.class.php
repository/local/repository.class.php
repository/mahara/repository.class.php
repository/manage_instances.php
repository/picasa/repository.class.php
repository/remotemoodle/repository.class.php
repository/repository.css
repository/repository.src.js
repository/s3/S3.php
repository/s3/repository.class.php
repository/upload/repository.class.php
repository/url/lib.php
repository/url/repository.class.php
repository/webdav/repository.class.php
repository/wikimedia/repository.class.php
repository/ws.php
repository/youtube/repository.class.php

index 83609d322debe7b9e6065ada13be0dcba200f928..cf4ddef282845b8b196f5f4a4a721242b43e42d8 100644 (file)
@@ -9,7 +9,7 @@ of a complete class, take a look at the 'manual' class.
 
 Each plugin is in a subfolder here.
 
-Except for the configuration methods, most methods 
+Except for the configuration methods, most methods
 defined in the API are optional -- callers will use
 method_exists() to determine whether your plugin offers
 the functionality they are after.
@@ -30,40 +30,40 @@ Login-time methods
 
       get_student_courses()
       get_teacher_courses()
-  
+
   You probably will want to offer at least get_student_courses().
-  
+
   These methods are triggered when a user logs in successfully,
-  and they are expected to populate $USER->student and 
+  and they are expected to populate $USER->student and
   $USER->teacher arrays and maintain (add/delete) entries from
   user_students and user_teachers.
-  
+
   These methods are relevant for most plugins, and are the main
   interest for plugins that work with a read-only backend such
   as LDAP or a database.
-  
-  Note that with the multi-enrol infrastructure two things have 
-  changed. We now have an 'enrol' field in those tables, and 
-  each plugin must maintain only its own enrolment records. 
+
+  Note that with the multi-enrol infrastructure two things have
+  changed. We now have an 'enrol' field in those tables, and
+  each plugin must maintain only its own enrolment records.
   Conversely, the $USER->student and ->teacher arrays have the
   enrolment type as value, like
-  
+
      $USER->student = array ( $courseid => $plugintype );
-  
+
 
   Moodle 1.7 and later
   --------------------
 
       setup_enrolments()
 
-  With the advent of roles, there could well not be students and 
+  With the advent of roles, there could well not be students and
   teachers any more, so enrolment plugins have to be more flexible
   about how they map outside data to the internal roles.
-  
-  This one method should do everything, calling functions from 
+
+  This one method should do everything, calling functions from
   lib/accesslib.php as necessary to set up relationships.
-  
-  
+
+
 Interactive enrolment methods
 =============================
 
@@ -73,9 +73,9 @@ Interactive enrolment methods
   get_access_icons()
 
 These methods are for enrolment plugins that allow for user
-driven enrolment. These methods are relevant for plugins 
+driven enrolment. These methods are relevant for plugins
 that implement payment gateways (credit card, paypal),
-as well as "magic password" schemes. 
+as well as "magic password" schemes.
 
 Only one interactive enrolment method can be active for
 a given course. The site default can be set from
@@ -93,7 +93,7 @@ execute, perhaps offering a config option.
 
 For really heavy cron processing, an alternative is to have
 a separate script to be called separately. Currently the LDAP
-and DB plugins have external scripts. 
+and DB plugins have external scripts.
 
 
 Guilty Parties
index 18a7ae80ff25e5ea9763f23019700019d848c687..1f17a35f76da2fe203e80d46fe397627e0a5ee8c 100644 (file)
@@ -1,4 +1,4 @@
-<?php // $Id$
+<?php
 
 if (!defined('MOODLE_INTERNAL')) {
     die('Direct access to this script is forbidden.');
@@ -397,4 +397,4 @@ class AuthorizeNet
     }
 }
 
-?>
+
index b0da0f807b1f670669634001a2bf998c8f37631b..26d6bc7e2db334cfacfe6e2c326b62ef02d578c6 100755 (executable)
@@ -1,4 +1,4 @@
-<?php //  $Id$
+<?php
 
 if (!isset($frm->enrol_cost)) $frm->enrol_cost = '5';
 if (!isset($frm->enrol_currency)) $frm->enrol_currency = 'USD';
@@ -64,7 +64,7 @@ if (!isset($frm->acceptechecktypes)) {
 
 <tr valign="top">
     <td align="right">enrol_currency:</td>
-    <td><?php 
+    <td><?php
         $select = html_select::make(get_list_of_currencies(), "enrol_currency", $frm->enrol_currency, false);
         $select->nothingvalue = '';
         echo $OUTPUT->select($select);
index 650dbbeb8c228dfd03de704d07b97e3121487d84..16030df37dd9894f1eb15e73a7ba718e16fe03f0 100644 (file)
@@ -1,4 +1,4 @@
-<?php // $Id$
+<?php
 
 /**#@+
  * Authorize.net payment methods.
@@ -89,4 +89,4 @@ define('AN_ERROR',      3);
 define('AN_REVIEW',     4);
 /**#@-*/
 
-?>
+
index 084cbcbc1a32d28351e75285d3b0ee8432d359dc..954bf74f066d3a9ebe305d66428d790c38cfb38b 100644 (file)
@@ -1,4 +1,4 @@
-<?php // $Id$
+<?php
 
 $enrol_authorize_capabilities = array(
 
@@ -22,4 +22,4 @@ $enrol_authorize_capabilities = array(
 
 );
 
-?>
+
index 592ec1b3f7d71aba39e2922f891e4654eab2fb2e..424a71bc6baf31b94e1972fa95b9f1e0324b69d5 100644 (file)
@@ -1,4 +1,4 @@
-<?php  //$Id$
+<?php
 
 // This file keeps track of upgrades to
 // the authorize enrol plugin
@@ -97,4 +97,4 @@ function xmldb_enrol_authorize_upgrade($oldversion) {
     return $result;
 }
 
-?>
+
index c74f05ea98388c61606e45a889a5e28d1a3a4405..c2afaea55f1fde8768605a231b5a15557dd8b4f5 100755 (executable)
@@ -1,4 +1,4 @@
-<?php // $Id$
+<?php
 
 require_once($CFG->dirroot.'/enrol/enrol.class.php');
 require_once($CFG->dirroot.'/enrol/authorize/const.php');
@@ -902,4 +902,4 @@ class enrolment_plugin_authorize
         $rs->close();
     }
 }
-?>
+
index e60d5bc4249c11d3d7577ff693ec426bd65617a1..60567f42f643a4bdf76ed57b874979898aa0ae96 100755 (executable)
@@ -1,4 +1,4 @@
-<?php // $Id$
+<?php
 
 require_once($CFG->libdir.'/formslib.php');
 
@@ -74,13 +74,13 @@ class enrol_authorize_form extends moodleform
             $mform->setType('ccexpireyyyy', PARAM_INT);
             $mform->setDefault('ccexpiremm', '');
             $mform->setDefault('ccexpireyyyy', '');
-            
+
             $creditcardsmenu = array('' => get_string('choose')) + get_list_of_creditcards();
             $mform->addElement('select', 'cctype', get_string('cctype', 'enrol_authorize'), $creditcardsmenu);
             $mform->setType('cctype', PARAM_ALPHA);
             $mform->addRule('cctype', get_string('missingcctype', 'enrol_authorize'), 'required', null, 'client');
             $mform->setDefault('cctype', '');
-            
+
             $mform->addElement('text', 'cvv', get_string('ccvv', 'enrol_authorize'), 'size="4"');
             $mform->setHelpButton('cvv', array('authorize/cvv',get_string('ccvv', 'enrol_authorize'),'enrol'), true);
             $mform->setType('cvv', PARAM_ALPHANUM);
@@ -95,7 +95,7 @@ class enrol_authorize_form extends moodleform
                 $ccauthgrp[] = &$mform->createElement('text', 'ccauthcode', '', 'size="8"');
                 $mform->addGroup($ccauthgrp, 'ccauthgrp', get_string('authcode', 'enrol_authorize'), '&nbsp;', false);
                 $mform->setHelpButton('ccauthgrp', array('authorize/authcode',get_string('authcode', 'enrol_authorize'),'enrol'), true);
-                
+
                 $ccauthgrprules = array();
                 $ccauthgrprules['ccauthcode'][] = array(get_string('missingccauthcode', 'enrol_authorize'), 'numeric', null, 'client');
                 $mform->addGroupRule('ccauthgrp', $ccauthgrprules);
@@ -345,4 +345,4 @@ class enrol_authorize_form extends moodleform
     }
 
 }
-?>
+
index 8f2bf5bbe6869ed36e63f3d05d3789598e6726dc..986579f31ba7e7de58d99d61fc5ac45c11a6e243 100644 (file)
@@ -50,4 +50,4 @@
     else {
         authorize_print_order($orderid);
     }
-?>
+
index be4b7a17ef6e0a8e45f9fea03cb2bcb871c72400..29870c508cdaef82e42a0b71e33ee97249c4c3d6 100644 (file)
@@ -1,4 +1,4 @@
-<?php // $Id$
+<?php
 
 require_once($CFG->libdir.'/eventslib.php');
 
@@ -261,4 +261,4 @@ function authorize_verify_account()
     return $ret;
 }
 
-?>
+
index 2da6dd27f5c0730d157d0dd08f537ead64d78c62..1e11fb555f2d059311ba14b08aaed461fc91465f 100644 (file)
@@ -1,4 +1,4 @@
-<?php // $Id$
+<?php
 
 if (!defined('MOODLE_INTERNAL')) {
     die('Direct access to this script is forbidden.');
@@ -67,7 +67,7 @@ function authorize_print_orders($courseid, $userid) {
         AN_STATUS_REVIEWFAILED => $authstrs->reviewfailed,
         AN_STATUS_TEST => $authstrs->tested
     );
-    
+
     $popupmenu .= $OUTPUT->select(html_select::make_popup_form($baseurl.'&course='.$courseid, 'status', $statusmenu, 'statusmenu', $status));
     if ($canmanagepayments) {
         $popupmenu .= '<br />';
@@ -682,4 +682,4 @@ function authorize_print_action_button($orderid, $do, $suborderid=0, $confirm=fa
     }
     return $ret;
 }
-?>
+
index de3219ee76bdad3f2c2752d804119c8c91ffd23a..dfa0617613449d38045e8192e8b2c1dfe6392b77 100644 (file)
@@ -231,7 +231,7 @@ function authorize_process_csv($filename)
 /// Send email to admin
     if (!empty($ignoredlines)) {
         $admin = get_admin();
-        
+
         $eventdata = new object();
         $eventdata->modulename        = 'moodle';
         $eventdata->userfrom          = $admin;
@@ -240,7 +240,7 @@ function authorize_process_csv($filename)
         $eventdata->fullmessage       = $ignoredlines;
         $eventdata->fullmessageformat = FORMAT_PLAIN;
         $eventdata->fullmessagehtml   = '';
-        $eventdata->smallmessage      = '';                        
+        $eventdata->smallmessage      = '';                    
         events_trigger('message_send', $eventdata);
     }
 
@@ -253,4 +253,4 @@ function authorize_process_csv($filename)
     notice("<b>Done...</b><br />Imported: $imported<br />Updated: $updated<br />Ignored: $ignored");
 }
 
-?>
+
index d5270fd7d1aa0c47b485c4754d93ee070701e75e..933bb1663fab21a283f87a3947d0480dfdaeffbb 100755 (executable)
@@ -1,6 +1,6 @@
-<?php // $Id$
+<?php
 
 $plugin->version  = 2009042700;
 $plugin->requires = 2007101507;
 
-?>
+
index 3391f0bc40eff231a499fdfbda9ac33ee424688a..aa838ddeb8887431d0ff2ce42058ffd9faff5b29 100644 (file)
@@ -11,7 +11,7 @@
 <tr>
     <td align="right">enrol_dbtype:</td>
     <td>
-    <?php  
+    <?php
        $dbtypes = array("access","ado_access", "ado", "ado_mssql", "borland_ibase", "csv", "db2", "fbsql", "firebird", "ibase", "informix72", "informix", "mssql", "mssql_n", "mysql", "mysqlt", "oci805", "oci8", "oci8po", "odbc", "odbc_mssql", "odbc_oracle", "oracle", "postgres64", "postgres7", "postgres", "proxy", "sqlanywhere", "sybase", "vfp");
        foreach ($dbtypes as $dbtype) {
            $dboptions[$dbtype] = $dbtype;
@@ -23,7 +23,7 @@
        $select->nothingvalue = '';
        echo $OUTPUT->select($select);
     ?>
-      
+
     </td>
     <td>
     <?php  print_string("dbtype","enrol_database") ?>
 <tr>
     <td align="right">enrol_dbhost:</td>
     <td>
-    <?php 
+    <?php
         if (!isset($frm->enrol_dbhost)) {
             $frm->enrol_dbhost = '';
-        } 
+        }
     ?>
         <input size="15" type="text" name="enrol_dbhost" value="<?php p($frm->enrol_dbhost) ?>" />
     </td>
         $sitecontext = get_context_instance(CONTEXT_SYSTEM);
         $assignableroles = get_assignable_roles($sitecontext);
         $assignableroles = array('' => get_string('default')) + $assignableroles;
-    
+
         echo $OUTPUT->select(html_select::make($assignableroles, 'enrol_db_defaultcourseroleid', $frm->enrol_db_defaultcourseroleid, false));
-        if (isset($err['enrol_db_defaultcourseroleid'])) echo $OUTPUT->error_text($err['enrol_db_defaultcourseroleid']); 
+        if (isset($err['enrol_db_defaultcourseroleid'])) echo $OUTPUT->error_text($err['enrol_db_defaultcourseroleid']);
     ?>
     </td>
     <td>
     <td>
     <?php
        echo $OUTPUT->select(html_select::make($yesno, "enrol_db_autocreate", $frm->enrol_db_autocreate, false));
-           if (isset($err["enrol_db_autocreate"])) echo $OUTPUT->error_text($err["enrol_db_autocreate"]); 
+           if (isset($err["enrol_db_autocreate"])) echo $OUTPUT->error_text($err["enrol_db_autocreate"]);
     ?>
     </td>
     <td>
            $parentlist = array();
            make_categories_list($displaylist, $parentlist);
            echo $OUTPUT->select(html_select::make($displaylist, "enrol_db_category", $frm->enrol_db_category, false));
-           
+
     ?>
     <?php  if (isset($err["enrol_db_category"])) echo $OUTPUT->error_text($err["enrol_db_category"]); ?>
     </td><td>
index 78271630dad8553e37495cbdb13ac6bfc9eb8b5c..0665ab713b40080ea1dd36f3cbcd4559fbea835c 100644 (file)
@@ -1,4 +1,4 @@
-<?php  // $Id$
+<?php
 
 require_once($CFG->dirroot.'/enrol/enrol.class.php');
 
@@ -276,7 +276,7 @@ function sync_enrolments($role = null) {
             continue;
         }
 
-        // slurp results into an array       
+        // slurp results into an array
         while ($crs_obj = (object)$crs->FetchRow()) {
             $crs_obj = (object)array_change_key_case((array)$crs_obj , CASE_LOWER);
             array_push($extenrolments, $crs_obj->{strtolower($CFG->enrol_remoteuserfield)});
@@ -675,4 +675,4 @@ function role_fields($enroldb, $role) {
 
 } // end of class
 
-?>
+
index df599c8fa9d7a92c1e6bd24c4717f4a5823873af..8e2fa82ac9f171df441823cf8d9eae83b5b37003 100644 (file)
@@ -1,11 +1,11 @@
-<?php // $Id$
+<?php
 
     if(!empty($_SERVER['GATEWAY_INTERFACE'])){
         error_log("should not be called from apache!");
         exit;
     }
     error_reporting(E_ALL);
-    
+
     require_once(dirname(dirname(dirname(__FILE__))).'/config.php'); // global moodle config file.
 
     require_once($CFG->dirroot . '/course/lib.php');
     $roles = !empty($CFG->enrol_db_remoterolefield) && !empty($CFG->enrol_db_localrolefield)
         ? get_all_roles()
         : array(null);
-        
+
     foreach ($roles as $role) {
         $enrol->sync_enrolments($role);
     }
-    
+
     // sync metacourses
     if (function_exists('sync_metacourses')) {
         sync_metacourses();
     }
-    
-?>
+
+
index e68230d50d8f022a1685afff0e9885880c93a9d8..a34d219b9e4d82196ea00b3a8fd9a9cc22bfd0cb 100644 (file)
@@ -10,7 +10,7 @@ require_once($CFG->libdir.'/eventslib.php');
 
 class enrolment_plugin_flatfile {
 
-    var $log;    
+    var $log;
 
 /// Override the base config_form() function
 function config_form($frm) {
@@ -20,7 +20,7 @@ function config_form($frm) {
     foreach ($vars as $var) {
         if (!isset($frm->$var)) {
             $frm->$var = '';
-        } 
+        }
     }
 
     $roles = $DB->get_records('role', null, '', 'id, name, shortname');
@@ -34,8 +34,8 @@ function config_form($frm) {
             isset($ffconfig->{"map_{$record->shortname}"}) ? $ffconfig->{"map_{$record->shortname}"} : $record->shortname
         );
     }
-    
-    include ("$CFG->dirroot/enrol/flatfile/config.html");    
+
+    include ("$CFG->dirroot/enrol/flatfile/config.html");
 }
 
 
@@ -102,17 +102,17 @@ function get_access_icons($course) {
         }
 
         if ( file_exists($filename) ) {
-            
+
             $this->log  = userdate(time()) . "\n";
             $this->log .= "Flatfile enrol cron found file: $filename\n\n";
 
             if (($fh = fopen($filename, "r")) != false) {
 
                 list($roles, $rolemap) = $this->get_roles();
-                
+
                 $line = 0;
                 while (!feof($fh)) {
-                
+
                     $line++;
                     $fields = explode( ",", str_replace( "\r", "", fgets($fh) ) );
 
@@ -124,15 +124,15 @@ function get_access_icons($course) {
                         }
                         continue;
                     }
-                    
+
 
                     $fields[0] = trim(strtolower($fields[0]));
                     $fields[1] = trim(strtolower($fields[1]));
                     $fields[2] = trim($fields[2]);
                     $fields[3] = trim($fields[3]);
-                    
+
                     $this->log .= "$line: $fields[0] $fields[1] $fields[2] $fields[3] ";
-                    
+
                     if (!empty($fields[5])) {
                         $fields[4] = (int)trim($fields[4]);
                         $fields[5] = (int)trim($fields[5]);
@@ -140,7 +140,7 @@ function get_access_icons($course) {
                     } else {
                         $fields[4] = 0;
                         $fields[5] = 0;
-                    } 
+                    }
 
                     $this->log .= ":";
 
@@ -185,16 +185,16 @@ function get_access_icons($course) {
 
                     // Create/resurrect a context object
                     $context = get_context_instance(CONTEXT_COURSE, $course->id);
-                    
+
                     if ($fields[0] == 'add') {
                         role_assign($roleid, $user->id, null, $context->id, $fields[4], $fields[5], 0, 'flatfile');
                     } else {
                         role_unassign($roleid, $user->id, null, $context->id);
                     }
-                    
+
 
                     if ( empty($elog) and ($fields[0] == "add") ) {
-   
+
                         if ($fields[1] == "student") {
 
                             if ($teachers = get_users_by_capability($context, 'moodle/course:update', 'u.*,ra.hidden', 'ra.sortorder ASC')) {
@@ -213,11 +213,11 @@ function get_access_icons($course) {
                             $teacher = get_admin();
                         }
 
-                        
+
                         if (!empty($CFG->enrol_mailstudents)) {
                             $a->coursename = "$course->fullname";
                             $a->profileurl = "$CFG->wwwroot/user/view.php?id=$user->id&amp;course=$course->id";
-                            
+
                             $eventdata = new object();
                             $eventdata->modulename        = 'moodle';
                             $eventdata->userfrom          = $teacher;
@@ -233,11 +233,11 @@ function get_access_icons($course) {
                         if (!empty($CFG->enrol_mailteachers) && $teachers) {
 
                             foreach($teachers as $teacher) {
-                            
+
                                 if (!$u->hidden || has_capability('moodle/role:viewhiddenassigns', $context)) {
                                     $a->course = "$course->fullname";
                                     $a->user = fullname($user);
-                                    
+
                                     $eventdata = new object();
                                     $eventdata->modulename        = 'moodle';
                                     $eventdata->userfrom          = $user;
@@ -246,7 +246,7 @@ function get_access_icons($course) {
                                     $eventdata->fullmessage       = get_string('enrolmentnewuser', '', $a);
                                     $eventdata->fullmessageformat = FORMAT_PLAIN;
                                     $eventdata->fullmessagehtml   = '';
-                                    $eventdata->smallmessage      = '';                            
+                                    $eventdata->smallmessage      = '';                        
                                     events_trigger('message_send', $eventdata);
                                 }
                             }
@@ -323,4 +323,4 @@ function get_access_icons($course) {
 
 } // end of class
 
-?>
+
index 2f88dc144d9d146b7b78f45698c10007d4f0892c..ff5ae8c1fcdb8a5721282204fcd0352432e6bcb4 100644 (file)
@@ -12,16 +12,16 @@ Please see INSTALL.txt.
 
 DESCRIPTION
 
-This enrolment script will repeatedly read an XML file from a 
+This enrolment script will repeatedly read an XML file from a
 specified location. The XML file should conform to the IMS Enterprise
-1.1 specification, containing <person>, <group>, and <membership> 
-elements to specify which students/teachers should be added/removed 
-from the course. User accounts and/or Moodle courses can be created 
-by the script if they aren't yet registered (this is an option which 
+1.1 specification, containing <person>, <group>, and <membership>
+elements to specify which students/teachers should be added/removed
+from the course. User accounts and/or Moodle courses can be created
+by the script if they aren't yet registered (this is an option which
 can be turned on/off).
 
 (The IMS 1.0 specification is significantly different from the 1.1
-spec. This code has been made flexible so it should in theory be 
+spec. This code has been made flexible so it should in theory be
 able to handle IMS 1.0 as well, but I haven't directly tested it
 with v1.0 Enterprise data.
 The one restriction that may be important is that the plugin assumes
@@ -31,27 +31,27 @@ demands this, but the 1.0 spec does not make this restriction.)
 
 HOW USERS/COURSES ARE MATCHED AGAINST MOODLE'S DATABASE
 
-IMS Enterprise data typically contains a "sourcedid" for each person 
-or group (course) record, which represents the canonical identifier 
-used by the source system. This is separate from the "userid" for a 
-person, which is also present in the data and should represent the 
-login userid which a person is intended to use in Moodle. (In some 
+IMS Enterprise data typically contains a "sourcedid" for each person
+or group (course) record, which represents the canonical identifier
+used by the source system. This is separate from the "userid" for a
+person, which is also present in the data and should represent the
+login userid which a person is intended to use in Moodle. (In some
 systems these may have the same value.)
 
-This script uses the "sourcedid" as the lookup to determine if the 
-user/course exists in the database, in both cases looking at the 
-"idnumber" field. This "idnumber" is not typically displayed in 
-Moodle. When creating a user, the "userid" field must not be blank, 
+This script uses the "sourcedid" as the lookup to determine if the
+user/course exists in the database, in both cases looking at the
+"idnumber" field. This "idnumber" is not typically displayed in
+Moodle. When creating a user, the "userid" field must not be blank,
 because it is stored as the user's Moodle login ID.
 
 
 TECHNICAL NOTE
 
-The script uses an optimised pattern-matching (regex) method for 
+The script uses an optimised pattern-matching (regex) method for
 processing the XML, rather than any built-in XML handling. This is for
-two reasons: firstly, because some systems produce very sloppy 
-(even invalid) XML and we'd like to be able to process it anyway; and 
-secondly, because PHP 4 and PHP 5 handle XML differently, and we'd 
+two reasons: firstly, because some systems produce very sloppy
+(even invalid) XML and we'd like to be able to process it anyway; and
+secondly, because PHP 4 and PHP 5 handle XML differently, and we'd
 like to be independent of that changeover.
 
 
index d4b56d8def5f6a3ae397d41cadbf5df341164f39..f7f890e3328a3be810835cfc0cad8b960174ec3b 100644 (file)
@@ -8,12 +8,12 @@ TO DO:
 
 - Support for enrolling using multiple files? At present only one filename
      is supported. Some systems may wish/need to do multiple. This may be tricky
-     since multiple filepaths may be too long for a single moodle config 
+     since multiple filepaths may be too long for a single moodle config
      variable (255 chars max)
 
 - Process group's "relationship"?
 
-- Activate <photo> handling, dependent upon acceptance of 
+- Activate <photo> handling, dependent upon acceptance of
      modification to Moodle's gdlib.php
 
 
@@ -22,7 +22,7 @@ DONE:
 
 v0.6:
 
-- Reduce processing from two passes to one pass (dependent on <membership> tags 
+- Reduce processing from two passes to one pass (dependent on <membership> tags
      coming after any person/group tags to which they refer)
 
 - The log data should NOT contain any personal information! NO STUDENT NAMES
index f53c7162208c75731d23ac7e4d6cc91104bb2051..c0fc8461081e42e1b145db6188c30736039dc4fa 100644 (file)
@@ -24,7 +24,7 @@
         <input type="checkbox" value="1" name="enrol_mailadmins" <?php if ($frm->enrol_mailadmins) echo "checked=\"checked\"" ?> />
     </td>
     <td>
-    
+
     </td>
 </tr>
 
@@ -58,7 +58,7 @@
         <input type="checkbox" value="1" name="enrol_fixcaseusernames" <?php if ($frm->enrol_fixcaseusernames) echo "checked=\"checked\"" ?> />
     </td>
     <td>
-    
+
     </td>
 </tr>
 
@@ -68,7 +68,7 @@
         <input type="checkbox" value="1" name="enrol_fixcasepersonalnames" <?php if ($frm->enrol_fixcasepersonalnames) echo "checked=\"checked\"" ?> />
     </td>
     <td>
-    
+
     </td>
 </tr>
 
@@ -78,7 +78,7 @@
         <input type="checkbox" value="1" name="enrol_imssourcedidfallback" <?php if ($frm->enrol_imssourcedidfallback) echo "checked=\"checked\"" ?> />
     </td>
     <td>
-    <?php echo $OUTPUT->help_icon(moodle_help_icon::make('sourceddidfallback', 'More detail about this option', 'enrol/imsenterprise')); ?>    
+    <?php echo $OUTPUT->help_icon(moodle_help_icon::make('sourceddidfallback', 'More detail about this option', 'enrol/imsenterprise')); ?>
     </td>
 </tr>
 <!--
@@ -114,10 +114,10 @@ foreach($this->imsroles as $imsrolenum=>$imsrolename){
     <td align="right">&quot;<?php echo $imsrolename ?>&quot;&nbsp;(<?php echo $imsrolenum ?>):</td>
     <td>
     <?php
-        
+
         $configref = "enrol_imse_imsrolemap" . $imsrolenum;
-        
-        echo $OUTPUT->select(html_select::make($assignableroles, 'enrol_imse_imsrolemap'.$imsrolenum, 
+
+        echo $OUTPUT->select(html_select::make($assignableroles, 'enrol_imse_imsrolemap'.$imsrolenum,
            strlen($frm->$configref) ? $frm->$configref : $this->determine_default_rolemapping($imsrolenum), false));
     ?>
     </td>
index af064cdbf1a6917ab1325169ee051e73d37e1393..4c15a88dd11b7f83d440dd1491d50c84dfa3bdf0 100644 (file)
@@ -379,7 +379,7 @@ function cron() {
         }else{
             $msg .= "Logging is currently not active.";
         }
-        
+
         $eventdata = new object();
         $eventdata->modulename        = 'moodle';
         $eventdata->userfrom          = get_admin();
@@ -388,7 +388,7 @@ function cron() {
         $eventdata->fullmessage       = $msg;
         $eventdata->fullmessageformat = FORMAT_PLAIN;
         $eventdata->fullmessagehtml   = '';
-        $eventdata->smallmessage      = '';                        
+        $eventdata->smallmessage      = '';                    
         events_trigger('message_send', $eventdata);
 
         $this->log_line('Notification email sent to administrator.');
@@ -876,4 +876,4 @@ function load_role_mappings() {
 
 } // end of class
 
-?>
+
index 2fd97fa080947925a5e680fc0e154e674f9db84e..6d125e7253425c577f6f2acbafb2842e8ae16f00 100644 (file)
@@ -19,7 +19,7 @@ td.n {background-color: rgb(255, 230, 230);}
 <dl>
 <dt><a name="Enterprise Conformance Summary for v1.1"></a>Enterprise Conformance Summary for v1.1</dt>
 <dd>
-  <p>This table gives a summmary of the elements that may be found in an IMS Enterprise 1.1 data file, 
+  <p>This table gives a summmary of the elements that may be found in an IMS Enterprise 1.1 data file,
      and Moodle's suppport for those elements via this enrolment plugin.</p>
   <table border='1' cellspacing='0' cellpadding='2'>
     <tr>
@@ -85,7 +85,7 @@ td.n {background-color: rgb(255, 230, 230);}
     <tr>
       <td>&nbsp;&nbsp;photo</td>
       <td>Y?</td>
-      <td>This currently is possible but requires a small modification to one of Moodle's 
+      <td>This currently is possible but requires a small modification to one of Moodle's
         library files, so for a standard simple installation, the import of user photos is
         not supported.</td>
     </tr>
index c879c11eb856d0fbda0db9ec8869153fd6bb6198..ff6c959bd7797e742ea7f97deb09f81d2dd9a2de 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<enterprise> 
+<enterprise>
   <properties lang="EN"><!-- ccc -->
     <datasource>sits:vision</datasource>
     <datetime>28/Oct/2005</datetime>
@@ -26,7 +26,7 @@
     <sourcedid>
       <source>sits:vision</source>
       <id>90078058</id>
-    </sourcedid>   
+    </sourcedid>
     <userid>IMGBY26</userid>
     <name>
       <fn>Chloe Eva Piotrowska </fn>
         <id> 90078058  </id>
       </sourcedid>
       <idtype idtype="1"/>
-      <role roletype="01" recstatus="3">    
+      <role roletype="01" recstatus="3">
         <userid>IMGBY26</userid>
         <status>1</status>
         <extension><cohort>green team</cohort></extension>
index a66cf07eba4c64ec0414b3a031d5c0eee253b2c3..7397b0c06795b789e1d9f31999a6f09a46942461 100644 (file)
@@ -1,5 +1,5 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>     
-<enterprise> 
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<enterprise>
   <properties lang="EN"><!-- c -->
     <datasource>sits:vision</datasource>
     <datetime>28/Oct/2005</datetime>
index 8d1c8b69c3fce7bea45c73efd06983e3c419a92f..8b137891791fe96927ad78e64b0aad7bded08bdc 100644 (file)
@@ -1 +1 @@
+
index f0ec3bbb21820e693b359d7203741d96d84cc902..0dc63920b72692b3380f50d5b56598fff4245905 100755 (executable)
@@ -75,13 +75,13 @@ foreach($roles as $role) {
 
 // autocreate
 if (!isset($frm->enrol_ldap_autocreate)) {
-    $frm->enrol_ldap_autocreate = false;   
+    $frm->enrol_ldap_autocreate = false;
 }
 if (!isset($frm->enrol_ldap_category)) {
-    $frm->enrol_ldap_category = 1;   
+    $frm->enrol_ldap_category = 1;
 }
 if (!isset($frm->enrol_ldap_template)) {
-    $frm->enrol_ldap_template = '';   
+    $frm->enrol_ldap_template = '';
 }
 
 ?>
@@ -109,7 +109,7 @@ if (!isset($frm->enrol_ldap_template)) {
        $versions[2] = "2";
        $versions[3] = "3";
        echo $OUTPUT->select(html_select::make($versions, "enrol_ldap_version", $frm->enrol_ldap_version, false));
-        if (isset($err["enrol_ldap_version"])) echo $OUTPUT->error_text($err["enrol_ldap_version"]); 
+        if (isset($err["enrol_ldap_version"])) echo $OUTPUT->error_text($err["enrol_ldap_version"]);
     ?>
     </td>
     <td>
@@ -219,9 +219,9 @@ if (!isset($frm->enrol_ldap_template)) {
             </tr>
 <?php foreach ($roles as $role) { ?>
             <tr>
-                <td><?php echo htmlspecialchars($role->name, ENT_COMPAT, 'UTF-8'); ?></td> 
-                <td><input type="text" size="30" name="enrol_ldap_contexts_role<?php echo $role->id; ?>" value="<?php echo htmlspecialchars($frm->{'enrol_ldap_contexts_role'.$role->id}); ?>" /></td> 
-                <td><input type="text" size="30" name="enrol_ldap_memberattribute_role<?php echo $role->id; ?>" value="<?php echo htmlspecialchars($frm->{'enrol_ldap_memberattribute_role'.$role->id}); ?>" /></td> 
+                <td><?php echo htmlspecialchars($role->name, ENT_COMPAT, 'UTF-8'); ?></td>
+                <td><input type="text" size="30" name="enrol_ldap_contexts_role<?php echo $role->id; ?>" value="<?php echo htmlspecialchars($frm->{'enrol_ldap_contexts_role'.$role->id}); ?>" /></td>
+                <td><input type="text" size="30" name="enrol_ldap_memberattribute_role<?php echo $role->id; ?>" value="<?php echo htmlspecialchars($frm->{'enrol_ldap_memberattribute_role'.$role->id}); ?>" /></td>
             </tr>
 <?php } ?>
         </table>
@@ -262,7 +262,7 @@ if (!isset($frm->enrol_ldap_template)) {
             <?php  print_string("no")  ?></option>
         <option value="1" <?php echo ($frm->enrol_ldap_course_idnumber_editlock ? 'selected="selected"' : '') ?> >
             <?php  print_string("yes") ?></option>
-    </select></div>  
+    </select></div>
     </td><td>
     <?php  print_string("enrol_ldap_course_idnumber","enrol_ldap") ?>
     </td>
@@ -320,7 +320,7 @@ if (!isset($frm->enrol_ldap_template)) {
 <tr>
         <td align="right">enrol_ldap_course_summary:</td>
         <td>
-    <input name="enrol_ldap_course_summary" type="text" size="30" value="<?php echo $frm->enrol_ldap_course_summary?>"/>    
+    <input name="enrol_ldap_course_summary" type="text" size="30" value="<?php echo $frm->enrol_ldap_course_summary?>"/>
     <?php  if (isset($err["enrol_ldap_course_summary"])) echo $OUTPUT->error_text($err["enrol_ldap_course_summary"]); ?>
     <div style="text-align:right;margin-left:auto;margin-right:0">
     <?php  print_string("enrol_ldap_updatelocal", "enrol_ldap") ?>
@@ -352,7 +352,7 @@ if (!isset($frm->enrol_ldap_template)) {
     <td>
     <?php
        echo $OUTPUT->select(html_select::make(array('0'=>'no','1'=>'yes'), "enrol_ldap_autocreate", $frm->enrol_ldap_autocreate, false));
-           if (isset($err["enrol_ldap_autocreate"])) echo $OUTPUT->error_text($err["enrol_ldap_autocreate"]); 
+           if (isset($err["enrol_ldap_autocreate"])) echo $OUTPUT->error_text($err["enrol_ldap_autocreate"]);
     ?>
     </td>
     <td>
@@ -367,7 +367,7 @@ if (!isset($frm->enrol_ldap_template)) {
            $parentlist = array();
            make_categories_list($displaylist, $parentlist);
            echo $OUTPUT->select(html_select::make($displaylist, "enrol_ldap_category", $frm->enrol_ldap_category, false));
-           
+
     ?>
     <?php  if (isset($err["enrol_ldap_category"])) echo $OUTPUT->error_text($err["enrol_ldap_category"]); ?>
     </td><td>
index 7a1d6e815bc0eae8a68ee52c6d1bea189c683558..1b3fde09f2f3dcbc88a55ff1ec91e47e1895e956 100755 (executable)
@@ -4,8 +4,8 @@ require_once("$CFG->dirroot/enrol/enrol.class.php");
 
 class enrolment_plugin_ldap {
 
-    var $log;    
-    
+    var $log;
+
     var $enrol_localcoursefield = 'idnumber';
 
 /**
@@ -23,7 +23,7 @@ function setup_enrolments(&$user) {
         echo $OUTPUT->notification("[ENROL_LDAP] LDAP-module cannot connect to server: {$CFG->enrol_ldap_host_url}");
         return false;
     }
-    
+
     // we are connected OK, continue...
 
     // Get all the possible roles
@@ -37,7 +37,7 @@ function setup_enrolments(&$user) {
     if (!$roleassignments) {
         $roleassignments = array();
     }
-    
+
     // Get the ones that came from LDAP
     $ldap_assignments = array_filter($roleassignments, create_function('$x', 'return $x->enrol == \'ldap\';'));
 
@@ -46,20 +46,20 @@ function setup_enrolments(&$user) {
     // Get enrolments for each type of role from LDAP.
     foreach($roles as $role) {
         $enrolments = $this->find_ext_enrolments(
-            $ldap_connection, 
-            $user->idnumber , 
+            $ldap_connection,
+            $user->idnumber ,
             $role);
 
         //error_log('[ENROL_LDAP] LDAP reports ' . count($enrolments) . ' enrolments of type ' . $role->shortname . '.');
 
         foreach ($enrolments as $enrol){
-    
+
             $course_ext_id = $enrol[$CFG->enrol_ldap_course_idnumber][0];
             if(empty($course_ext_id)){
                 error_log("[ENROL_LDAP] The course external id is invalid!\n");
                 continue; // next; skip this one!
             }
-            
+
             // create the course  ir required
             $course_obj = $DB->get_record('course', array($this->enrol_localcoursefield, $course_ext_id));
 
@@ -72,18 +72,18 @@ function setup_enrolments(&$user) {
                     error_log("[ENROL_LDAP] User $user->username enrolled to a nonexistant course $course_ext_id \n");
                 }
             }
-            
+
             // deal with enrolment in the moodle db
-            if (!empty($course_obj)) { // does course exist now?     
-        
+            if (!empty($course_obj)) { // does course exist now?
+
                 $context = get_context_instance(CONTEXT_COURSE, $course_obj->id);
                 //$courseroles = get_user_roles($context, $user->id);
-            
+
                 if (!$DB->get_record('role_assignments', array('roleid'=>$role->id, 'userid'=>$user->id, 'contextid'=>$context->id))) {
                     //error_log("[ENROL_LDAP] Assigning role '{$role->name}' to {$user->id} ({$user->username}) in course {$course_obj->id} ({$course_obj->shortname})");
                     if (!role_assign($role->id, $user->id, 0, $context->id, 0, 0, 0, 'ldap')){
                         error_log("[ENROL_LDAP] Failed to assign role '{$role->name}' to $user->id ($user->username) into course $course_obj->id ($course_obj->shortname)");
-                    } 
+                    }
                 } else {
                     //error_log("[ENROL_LDAP] Role '{$role->name}' already assigned to {$user->id} ({$user->username}) in course {$course_obj->id} ({$course_obj->shortname})");
                 }
@@ -113,7 +113,7 @@ function setup_enrolments(&$user) {
     @ldap_close($ldap_connection);
 
     //error_log('[ENROL_LDAP] finished with setup_enrolments');
-    
+
     return true;
 }
 
@@ -135,7 +135,7 @@ function sync_enrolments($type, $enrol = false) {
         echo $OUTPUT->notification("LDAP-module cannot connect to server: $CFG->ldap_host_url");
         return false;
     }
-    
+
     // we are connected OK, continue...
     $this->enrol_ldap_bind($ldap_connection);
 
@@ -143,7 +143,7 @@ function sync_enrolments($type, $enrol = false) {
     $ldap_contexts = explode(";",$CFG->{'enrol_ldap_contexts_role'.$role->id});
 
     // get all the fields we will want for the potential course creation
-    // as they are light. don't get membership -- potentially a lot of data. 
+    // as they are light. don't get membership -- potentially a lot of data.
     $ldap_fields_wanted = array( 'dn', $CFG->enrol_ldap_course_idnumber);
     if (!empty($CFG->enrol_ldap_course_fullname)){
         array_push($ldap_fields_wanted, $CFG->enrol_ldap_course_fullname);
@@ -159,11 +159,11 @@ function sync_enrolments($type, $enrol = false) {
     }
 
     // define the search pattern
-    if (!empty($CFG->enrol_ldap_objectclass)){ 
+    if (!empty($CFG->enrol_ldap_objectclass)){
         $ldap_search_pattern='(objectclass='.$CFG->enrol_ldap_objectclass.')';
     } else {
        $ldap_search_pattern="(objectclass=*)";
-        
+
     }
 
     // first, pack the sortorder...
@@ -174,19 +174,19 @@ function sync_enrolments($type, $enrol = false) {
         $context = trim($context);
         if ($CFG->enrol_ldap_search_sub){
             //use ldap_search to find first user from subtree
-            $ldap_result = @ldap_search($ldap_connection, 
-                                        $context, 
+            $ldap_result = @ldap_search($ldap_connection,
+                                        $context,
                                         $ldap_search_pattern,
                                         $ldap_fields_wanted);
 
         } else {
             //search only in this context
-            $ldap_result = @ldap_list($ldap_connection, 
-                                        $context, 
+            $ldap_result = @ldap_list($ldap_connection,
+                                        $context,
                                         $ldap_search_pattern,
                                         $ldap_fields_wanted,0,0);
         }
+
         // check and push results
         $records = $ldap_result
             ? ldap_get_entries($ldap_connection,$ldap_result)
@@ -195,9 +195,9 @@ function sync_enrolments($type, $enrol = false) {
         // ldap libraries return an odd array, really. fix it:
         $flat_records=array();
         for ($c=0;$c<$records['count'];$c++) {
-            array_push($flat_records, $records["$c"]); 
+            array_push($flat_records, $records["$c"]);
         }
-        // free mem -- is there a leak? 
+        // free mem -- is there a leak?
         $records=0; $ldap_result=0;
 
         if (count($flat_records)) {
@@ -206,7 +206,7 @@ function sync_enrolments($type, $enrol = false) {
             foreach($flat_records as $course){
                 $idnumber = $course{$CFG->enrol_ldap_course_idnumber}[0];
                 print "== Synching $idnumber\n";
-                // does the course exist in moodle already? 
+                // does the course exist in moodle already?
                 $course_obj = false;
                 $course_obj = $DB->get_record('course', array($this->enrol_localcoursefield=>$idnumber));
                 if (!is_object($course_obj)) {
@@ -228,17 +228,17 @@ function sync_enrolments($type, $enrol = false) {
                     $context = get_context_instance(CONTEXT_COURSE, $course_obj->id);
 
                     // pull the ldap membership into a nice array
-                    // this is an odd array -- mix of hash and array -- 
+                    // this is an odd array -- mix of hash and array --
                     $ldapmembers=array();
 
                     if(array_key_exists('enrol_ldap_memberattribute_role'.$role->id, $CFG)
                      && !empty($CFG->{'enrol_ldap_memberattribute_role'.$role->id})
                      && !empty($course[strtolower($CFG->{'enrol_ldap_memberattribute_role'.$role->id} ) ])){ // may have no membership!
 
-                        $ldapmembers = $course[strtolower($CFG->{'enrol_ldap_memberattribute_role'.$role->id} )]; 
+                        $ldapmembers = $course[strtolower($CFG->{'enrol_ldap_memberattribute_role'.$role->id} )];
                         unset($ldapmembers['count']); // remove oddity ;)
                     }
-                    
+
                     // prune old ldap enrolments
                     // hopefully they'll fit in the max buffer size for the RDBMS
                     $sql = '
@@ -267,20 +267,20 @@ function sync_enrolments($type, $enrol = false) {
                             }
                         }
                     }
-                    
-                    // insert current enrolments 
+
+                    // insert current enrolments
                     // bad we can't do INSERT IGNORE with postgres...
                     foreach ($ldapmembers as $ldapmember) {
                         $sql = 'SELECT id,1 FROM {user} '
                                 ." WHERE idnumber=?";
-                        $member = $DB->get_record_sql($sql, array($ldapmember)); 
-//                        print "sql: $sql \nidnumber = ".$ldapmember." \n".var_dump($member); 
+                        $member = $DB->get_record_sql($sql, array($ldapmember));
+//                        print "sql: $sql \nidnumber = ".$ldapmember." \n".var_dump($member);
                         if(empty($member) || empty($member->id)){
                             print "Could not find user $ldapmember, skipping\n";
                             continue;
                         }
                         $member = $member->id;
-                        if (!$DB->get_record('role_assignments', array('roleid'=>$role->id, 
+                        if (!$DB->get_record('role_assignments', array('roleid'=>$role->id,
                                              'contextid'=>$context->id, 'userid'=>$member, 'enrol'=>'ldap'))){
                             if (role_assign($role->id, $member, 0, $context->id, 0, 0, 0, 'ldap')){
                                 print "Assigned role $type to $member ($ldapmember) for course $course_obj->id ($course_obj->shortname)\n";
@@ -293,10 +293,10 @@ function sync_enrolments($type, $enrol = false) {
             }
         }
     }
-    
+
     // we are done now, a bit of housekeeping
     fix_course_sortorder();
-    
+
     @ldap_close($ldap_connection);
     return true;
 }
@@ -312,7 +312,7 @@ function config_form($frm) {
     global $CFG;
 
     $this->check_legacy_config();
-    
+
     include("$CFG->dirroot/enrol/ldap/config.html");
 }
 
@@ -331,7 +331,7 @@ function process_config($config) {
         $config->enrol_ldap_version = '';
     }
     set_config('enrol_ldap_version', $config->enrol_ldap_version);
-    
+
     if (!isset ($config->enrol_ldap_bind_dn)) {
         $config->enrol_ldap_bind_dn = '';
     }
@@ -340,58 +340,58 @@ function process_config($config) {
     if (!isset ($config->enrol_ldap_bind_pw)) {
         $config->enrol_ldap_bind_pw = '';
     }
-    set_config('enrol_ldap_bind_pw', $config->enrol_ldap_bind_pw);    
-    
+    set_config('enrol_ldap_bind_pw', $config->enrol_ldap_bind_pw);
+
     if (!isset ($config->enrol_ldap_objectclass)) {
         $config->enrol_ldap_objectclass = '';
     }
-    set_config('enrol_ldap_objectclass', $config->enrol_ldap_objectclass);    
-    
+    set_config('enrol_ldap_objectclass', $config->enrol_ldap_objectclass);
+
     if (!isset ($config->enrol_ldap_category)) {
         $config->enrol_ldap_category  = '';
     }
-    set_config('enrol_ldap_category', $config->enrol_ldap_category);    
-    
+    set_config('enrol_ldap_category', $config->enrol_ldap_category);
+
     if (!isset ($config->enrol_ldap_template)) {
         $config->enrol_ldap_template = '';
     }
-    set_config('enrol_ldap_template', $config->enrol_ldap_template);    
-    
+    set_config('enrol_ldap_template', $config->enrol_ldap_template);
+
     if (!isset ($config->enrol_ldap_course_fullname)) {
         $config->enrol_ldap_course_fullname = '';
     }
-    set_config('enrol_ldap_course_fullname', $config->enrol_ldap_course_fullname);    
+    set_config('enrol_ldap_course_fullname', $config->enrol_ldap_course_fullname);
 
     if (!isset ($config->enrol_ldap_course_shortname)) {
         $config->enrol_ldap_course_shortname = '';
     }
-    set_config('enrol_ldap_course_shortname', $config->enrol_ldap_course_shortname);    
-    
+    set_config('enrol_ldap_course_shortname', $config->enrol_ldap_course_shortname);
+
     if (!isset ($config->enrol_ldap_course_summary)) {
         $config->enrol_ldap_course_summary = '';
     }
-    set_config('enrol_ldap_course_summary', $config->enrol_ldap_course_summary);    
-    
+    set_config('enrol_ldap_course_summary', $config->enrol_ldap_course_summary);
+
     if (!isset ($config->enrol_ldap_course_idnumber)) {
         $config->enrol_ldap_course_idnumber = '';
     }
-    set_config('enrol_ldap_course_idnumber', $config->enrol_ldap_course_idnumber); 
-    
+    set_config('enrol_ldap_course_idnumber', $config->enrol_ldap_course_idnumber);
+
     if (!isset ($config->enrol_localcoursefield)) {
         $config->enrol_localcoursefield = '';
     }
     set_config('enrol_localcoursefield', $config->enrol_localcoursefield);
-    
+
     if (!isset ($config->enrol_ldap_user_memberfield)) {
         $config->enrol_ldap_user_memberfield = '';
     }
-    set_config('enrol_ldap_user_memberfield', $config->enrol_ldap_user_memberfield); 
-    
+    set_config('enrol_ldap_user_memberfield', $config->enrol_ldap_user_memberfield);
+
     if (!isset ($config->enrol_ldap_search_sub)) {
         $config->enrol_ldap_search_sub = '0';
     }
-    set_config('enrol_ldap_search_sub', $config->enrol_ldap_search_sub); 
-    
+    set_config('enrol_ldap_search_sub', $config->enrol_ldap_search_sub);
+
     if (!isset ($config->enrol_ldap_autocreate)) {
         $config->enrol_ldap_autocreate = '0';
     }
@@ -402,11 +402,11 @@ function process_config($config) {
         if (!isset($config->{'enrol_ldap_contexts_role'.$role->id})) {
             $config->{'enrol_ldap_contexts_role'.$role->id} = '';
         }
-        
+
         if (!isset($config->{'enrol_ldap_memberattribute_role'.$role->id})) {
             $config->{'enrol_ldap_memberattribute_role'.$role->id} = '';
         }
-        
+
         set_config('enrol_ldap_contexts_role'.$role->id, $config->{'enrol_ldap_contexts_role'.$role->id});
         set_config('enrol_ldap_memberattribute_role'.$role->id, $config->{'enrol_ldap_memberattribute_role'.$role->id});
     }
@@ -427,7 +427,7 @@ function enrol_ldap_connect(){
 
         if (!empty($CFG->enrol_ldap_bind_dn)) {
             $bind = ldap_bind( $result,
-                                 $CFG->enrol_ldap_bind_dn, 
+                                 $CFG->enrol_ldap_bind_dn,
                                  $CFG->enrol_ldap_bind_pw );
             if (!$bind) {
                 echo $OUTPUT->notification("Error in binding to LDAP server");
@@ -456,11 +456,11 @@ function enrol_ldap_bind($ldap_connection){
         }
 
     } else {
-        //bind anonymously 
+        //bind anonymously
         if ( !ldap_bind($ldap_connection)){
             echo $OUTPUT->notification("Error: could not bind ldap anonymously");
             return false;
-        }  
+        }
     }
 
     return true;
@@ -469,13 +469,13 @@ function enrol_ldap_bind($ldap_connection){
 function find_ext_enrolments ($ldap_connection, $memberuid, $role){
 /// role is a record from the mdl_role table
 /// return multidimentional array array with of courses (at least dn and idnumber)
-/// 
+///
 
     global $CFG;
 
     if(empty($memberuid)) { // No "idnumber" stored for this user, so no LDAP enrolments
         return array();
-    } 
+    }
 
     //default return value
     $courses = array();
@@ -485,7 +485,7 @@ function find_ext_enrolments ($ldap_connection, $memberuid, $role){
     $ldap_contexts = explode(";",$CFG->{'enrol_ldap_contexts_role'.$role->id});
 
     // get all the fields we will want for the potential course creation
-    // as they are light. don't get membership -- potentially a lot of data. 
+    // as they are light. don't get membership -- potentially a lot of data.
     $ldap_fields_wanted = array( 'dn', $CFG->enrol_ldap_course_idnumber);
     if (!empty($CFG->enrol_ldap_course_fullname)){
         array_push($ldap_fields_wanted, $CFG->enrol_ldap_course_fullname);
@@ -499,7 +499,7 @@ function find_ext_enrolments ($ldap_connection, $memberuid, $role){
 
     // define the search pattern
     $ldap_search_pattern = "(".$CFG->{'enrol_ldap_memberattribute_role'.$role->id}."=".$memberuid.")";
-    if (!empty($CFG->enrol_ldap_objectclass)){ 
+    if (!empty($CFG->enrol_ldap_objectclass)){
         $ldap_search_pattern='(&(objectclass='.$CFG->enrol_ldap_objectclass.')'.$ldap_search_pattern.')';
     }
 
@@ -508,31 +508,31 @@ function find_ext_enrolments ($ldap_connection, $memberuid, $role){
         if (empty($context)) {
             continue; // next;
         }
-        
+
         if ($CFG->enrol_ldap_search_sub){
             //use ldap_search to find first user from subtree
-            $ldap_result = ldap_search($ldap_connection, 
-                                        $context, 
+            $ldap_result = ldap_search($ldap_connection,
+                                        $context,
                                         $ldap_search_pattern,
                                         $ldap_fields_wanted);
 
         } else {
             //search only in this context
-            $ldap_result = ldap_list($ldap_connection, 
-                                        $context, 
+            $ldap_result = ldap_list($ldap_connection,
+                                        $context,
                                         $ldap_search_pattern,
                                         $ldap_fields_wanted);
         }
+
         // check and push results
-        $records = ldap_get_entries($ldap_connection,$ldap_result);        
+        $records = ldap_get_entries($ldap_connection,$ldap_result);
 
         // ldap libraries return an odd array, really. fix it:
         $flat_records=array();
         for ($c=0;$c<$records['count'];$c++) {
-            array_push($flat_records, $records["$c"]); 
+            array_push($flat_records, $records["$c"]);
         }
-        
+
         if (count($flat_records)) {
             $courses = array_merge($courses, $flat_records);
         }
@@ -543,7 +543,7 @@ function find_ext_enrolments ($ldap_connection, $memberuid, $role){
 
 // will create the moodle course from the template
 // course_ext is an array as obtained from ldap -- flattened somewhat
-// NOTE: if you pass true for $skip_fix_course_sortorder 
+// NOTE: if you pass true for $skip_fix_course_sortorder
 // you will want to call fix_course_sortorder() after your are done
 // with course creation
 function create_course ($course_ext,$skip_fix_course_sortorder=0){
@@ -566,7 +566,7 @@ function create_course ($course_ext,$skip_fix_course_sortorder=0){
     $course->shortname = $course_ext[$CFG->enrol_ldap_course_shortname][0];
     if (   empty($course->idnumber)
         || empty($course->fullname)
-        || empty($course->shortname) ) { 
+        || empty($course->shortname) ) {
         // we are in trouble!
         error_log("Cannot create course: missing required data from the LDAP record!");
          error_log(var_export($course, true));
@@ -596,8 +596,8 @@ function create_course ($course_ext,$skip_fix_course_sortorder=0){
         $course = $DB->get_record('course', array('id' => $newcourseid));
         blocks_add_default_course_blocks($course);
 
-        if (!$skip_fix_course_sortorder){ 
-            fix_course_sortorder(); 
+        if (!$skip_fix_course_sortorder){
+            fix_course_sortorder();
         }
         add_to_log($newcourseid, "course", "new", "view.php?id=$newcourseid", "enrol/ldap auto-creation");
     } else {
@@ -605,7 +605,7 @@ function create_course ($course_ext,$skip_fix_course_sortorder=0){
         echo $OUTPUT->notification("Serious Error! Could not create the new course!");
         return false;
     }
-    
+
     return $newcourseid;
 }
 
@@ -642,7 +642,7 @@ function check_legacy_config () {
 
         unset_config('enrol_ldap_teacher_contexts');
     }
-    
+
     if (isset($CFG->enrol_ldap_teacher_memberattribute)) {
         if (isset($teacher_role)
          or $teacher_role = $DB->get_record('role', array('shortname'=>'teacher'))) {
index 4d516941c71d2d132db30345e7802ab5a8389261..c49995f329ba9e6c2b1a46c0ae337b58539da760 100755 (executable)
@@ -5,7 +5,7 @@
         exit;
     }
     error_reporting(E_ALL);
-    
+
     require_once(dirname(dirname(dirname(__FILE__))).'/config.php'); // global moodle config file.
 
     require_once($CFG->dirroot . '/course/lib.php');
     foreach ($roles as $role) {
         $enrol->sync_enrolments($role->shortname, true);
     }
-    
+
     // sync metacourses
     if (function_exists('sync_metacourses')) {
         sync_metacourses();
     }
-    
-?>
+
+
index cd6d6e5569656c1944a93afc8b8c70e0bda67997..d116442fd492a99a951935446ac925ac31d952be 100644 (file)
@@ -3,13 +3,13 @@
 <tr valign="top">
     <td align="right">enrol_manual_keyholderrole:</td>
     <td>
-    <?php 
+    <?php
         $roles = get_all_roles();
         $rolenames = array();
         foreach ($roles as $id=>$role) {
             $rolenames[$id]=$role->name;
         }
-        echo $OUTPUT->select(html_select::make($rolenames, 'enrol_manual_keyholderrole', $frm->enrol_manual_keyholderrole)); 
+        echo $OUTPUT->select(html_select::make($rolenames, 'enrol_manual_keyholderrole', $frm->enrol_manual_keyholderrole));
     ?>
     </td>
     <td>
index 08fc51d57e912395841e325c09af497eaf9c4f99..98300e277dd74dbe282c1d6cde46176c9ba96070 100644 (file)
@@ -1,4 +1,4 @@
-<?php   /// $Id$
+<?php
 ///////////////////////////////////////////////////////////////////////////
 //                                                                       //
 // NOTICE OF COPYRIGHT                                                   //
@@ -329,7 +329,7 @@ function cron() {
                             $eventdata->fullmessage       = $strexpirynotifystudentsemail;
                             $eventdata->fullmessageformat = FORMAT_PLAIN;
                             $eventdata->fullmessagehtml   = '';
-                            $eventdata->smallmessage      = '';                            
+                            $eventdata->smallmessage      = '';                        
                             events_trigger('message_send', $eventdata);
                         }
                     }
@@ -354,7 +354,7 @@ function cron() {
                         $eventdata->fullmessage       = $strexpirynotifyemail;
                         $eventdata->fullmessageformat = FORMAT_PLAIN;
                         $eventdata->fullmessagehtml   = '';
-                        $eventdata->smallmessage      = '';                        
+                        $eventdata->smallmessage      = '';                    
                         events_trigger('message_send', $eventdata);
                     }
                 }
@@ -455,4 +455,4 @@ function print_enrolmentkeyfrom($course) {
 
 } /// end of class
 
-?>
+
index 5781c89eb8aad1c22cdfb6e5c848ceb090edb38e..244f891482508b414d66810cc0f4546b04bd4350 100644 (file)
@@ -124,7 +124,7 @@ if ($courses = $DB->get_records('course', null, 'shortname', 'id, shortname')) {
 echo $OUTPUT->box_start();
 
 ?>
- <div class="allowedcoursesdiv"> 
+ <div class="allowedcoursesdiv">
   <form id="allowedcoursesform" method="post">
     <input type="hidden" name="sesskey" value="<?php echo $sesskey; ?>" />
 <?php
index aa7efe00e5253f0857f079e01508a55bcf6f3ea4..58c57eda6892ed30a6e1a4b9e4879a2e14c21809 100644 (file)
@@ -66,7 +66,7 @@ class enrolment_plugin_mnet {
      ***
      ***/
     function mnet_publishes() {
-        
+
         $enrol = array();
         $enrol['name']        = 'mnet_enrol'; // Name & Description go in lang file
         $enrol['apiversion']  = 1;
@@ -102,7 +102,7 @@ class enrolment_plugin_mnet {
                 co.cost,
                 co.currency,
                 co.defaultrole AS defaultroleid,
-                r.name         AS defaultrolename 
+                r.name         AS defaultrolename
             FROM
                 {course_categories} ca
             JOIN
@@ -225,7 +225,7 @@ class enrolment_plugin_mnet {
     }
 
     /**
-     * 
+     *
      */
     function user_enrolments($userid) {
         return array();
@@ -236,7 +236,7 @@ class enrolment_plugin_mnet {
      *
      * @param   int     $courseid   The Course ID
      * @param   string  $roles      Comma-separated list of role shortnames
-     * @return  array               Array of usernames who are homed on the 
+     * @return  array               Array of usernames who are homed on the
      *                              client machine
      */
     function course_enrolments($courseid, $roles = '') {
@@ -272,15 +272,15 @@ class enrolment_plugin_mnet {
             // $default_role = get_default_course_role($course); ???
             $sql .= " AND
                     a.roleid in ('".str_replace(',',  "', '",  $roles)."')";
-        } 
+        }
 
         $enrolments = $DB->get_records_sql($sql);
 
         $returnarray = array();
         foreach($enrolments as $user) {
-            $returnarray[$user->username] = array('enrol' => $user->enrol, 
-                                                  'timemodified' => $user->timemodified, 
-                                                  'shortname' => $user->shortname, 
+            $returnarray[$user->username] = array('enrol' => $user->enrol,
+                                                  'timemodified' => $user->timemodified,
+                                                  'shortname' => $user->shortname,
                                                   'username' => $user->username,
                                                   'name' => $user->name);
         }
@@ -385,10 +385,10 @@ class enrolment_plugin_mnet {
         global $CFG, $DB;
 
         $sql = "
-            SELECT DISTINCT 
-                h.id, 
+            SELECT DISTINCT
+                h.id,
                 h.name
-            FROM 
+            FROM
                 {mnet_host} h,
                 {mnet_host2service} h2s,
                 {mnet_service} s
@@ -443,7 +443,7 @@ class enrolment_plugin_mnet {
                 $course = &$courses[$n];
 
                 // add/update cached data in mnet_enrol_courses
-                // sanitise data 
+                // sanitise data
                 $course = (object)$course;
                 $course->remoteid        = (int)$course->remoteid;
                 $course->hostid          = $mnethostid;
@@ -592,4 +592,4 @@ class enrolment_plugin_mnet {
 
 } // end of class
 
-?>
+
index 20ae584b7f7d195303b62db3772a8960abffaa50..aca9a54c2afdbb8bab6f2569c20beffe074a1f59 100644 (file)
@@ -13,7 +13,7 @@
 <tr valign="top">
     <td align="right">enrol_currency:</td>
     <td>
-    <?php 
+    <?php
         global $OUTPUT;
         $select = html_select::make($paypalcurrencies, "enrol_currency", $frm->enrol_currency, false);
         $select->nothingvalue = '';
index 8a0aa93eb3071956dd8f3695499f00140ed74d79..fa6c3c491b88ead7ec6c16641f23de6b3d0d4bac 100644 (file)
@@ -1,6 +1,6 @@
-<?php  //$Id$
+<?php
 
-// This file keeps track of upgrades to 
+// This file keeps track of upgrades to
 // the paypal enrol plugin
 //
 // Sometimes, changes between versions involve
@@ -26,8 +26,8 @@ function xmldb_enrol_paypal_upgrade($oldversion) {
     $dbman = $DB->get_manager();
     $result = true;
 
-/// And upgrade begins here. For each one, you'll need one 
-/// block of code similar to the next one. Please, delete 
+/// And upgrade begins here. For each one, you'll need one
+/// block of code similar to the next one. Please, delete
 /// this comment lines once this file start handling proper
 /// upgrade code.
 
@@ -38,4 +38,4 @@ function xmldb_enrol_paypal_upgrade($oldversion) {
     return $result;
 }
 
-?>
+
index f08de8eeb9b2dce5e2bdde48de7b0bdfcb355030..12b67156599b4ed546a8242c878a2cff99e4b6b0 100644 (file)
@@ -1,4 +1,4 @@
-<?php  // $Id$
+<?php
        // Implements all the main code for the PayPal plugin
 
 require_once("$CFG->dirroot/enrol/enrol.class.php");
@@ -218,4 +218,4 @@ function print_enrolmentkeyfrom($course) {
 
 } // end of class definition
 
-?>
+
index ce2bf3f599a13b1da411d1ba4cfada8cec275f38..5cc24f3fa6cfaf628401dadaf262474730aa0607 100644 (file)
@@ -1,4 +1,4 @@
-<?php  // $Id$
+<?php
 
 /**
 * Listens for Instant Payment Notification from PayPal
@@ -98,7 +98,7 @@
                 die;
             }
 
-            // If currency is incorrectly set then someone maybe trying to cheat the system 
+            // If currency is incorrectly set then someone maybe trying to cheat the system
 
             if ($data->mc_currency != $course->currency) {
                 email_paypal_error_to_admin("Currency does not match course settings, received: ".addslashes($data->mc_currency), $data);
                 if (!empty($CFG->enrol_mailstudents)) {
                     $a->coursename = $course->fullname;
                     $a->profileurl = "$CFG->wwwroot/user/view.php?id=$user->id";
-                    
+
                     $eventdata = new object();
                     $eventdata->modulename        = 'moodle';
                     $eventdata->userfrom          = $teacher;
                     $eventdata->fullmessagehtml   = '';
                     $eventdata->smallmessage      = '';
                     events_trigger('message_send', $eventdata);
-                    
+
                 }
 
                 if (!empty($CFG->enrol_mailteachers)) {
                     $a->course = $course->fullname;
                     $a->user = fullname($user);
-                    
+
                     $eventdata = new object();
                     $eventdata->modulename        = 'moodle';
                     $eventdata->userfrom          = $user;
                     $eventdata->fullmessage       = get_string('enrolmentnewuser', '', $a);
                     $eventdata->fullmessageformat = FORMAT_PLAIN;
                     $eventdata->fullmessagehtml   = '';
-                    $eventdata->smallmessage      = '';                            
-                    events_trigger('message_send', $eventdata); 
+                    $eventdata->smallmessage      = '';                        
+                    events_trigger('message_send', $eventdata);
                 }
 
                 if (!empty($CFG->enrol_mailadmins)) {
                     $a->course = $course->fullname;
                     $a->user = fullname($user);
                     $admins = get_admins();
-                    foreach ($admins as $admin) {                        
+                    foreach ($admins as $admin) {
                         $eventdata = new object();
                         $eventdata->modulename        = 'moodle';
                         $eventdata->userfrom          = $user;
@@ -280,4 +280,4 @@ function message_paypal_error_to_admin($subject, $data) {
     events_trigger('message_send', $eventdata);
 }
 
-?>
+
index c5157e5e2596a2ed352edc86c3bf701f62b6fe65..e4dc86bd89cb19f7881c48257c6f6cde2d7c6bfb 100644 (file)
@@ -1,4 +1,4 @@
-<?php  // $Id$
+<?php
 
     require("../../config.php");
     require_once("$CFG->dirroot/enrol/paypal/enrol.php");
@@ -24,7 +24,7 @@
     } else {
         $destination = "$CFG->wwwroot/course/view.php?id=$course->id";
     }
-    
+
     if (has_capability('moodle/course:view', $context)) {
         redirect($destination, get_string('paymentthanks', '', $course->fullname));
 
@@ -34,4 +34,4 @@
         notice(get_string('paymentsorry', '', get_string('defaultcourseteacher')), $destination);
     }
 
-?>
+
index 6be8fd71a0354f19932f6f0bc5c80b160ba336b0..5efaf03b3de0653e71c672f348bd5b55eaa9c7ac 100644 (file)
@@ -1,4 +1,4 @@
-<?PHP // $Id$
+<?php
 
 /////////////////////////////////////////////////////////////////////////////////
 ///  Code fragment to define the version of this enrolment module
@@ -9,4 +9,4 @@ $plugin->version  = 2006092200;   // This module's version
 
 $plugin->requires = 2007101000;   // Requires this Moodle version
 
-?>
+
index 67923a2f49f1320d0ce07570b893774f6ad88182..83583841e6106fd4b3c7ffb3945aa1aee6aa9e41 100644 (file)
@@ -1,4 +1,4 @@
-<?php // $Id$
+<?php
     //This function provides automatic linking to
     //activities when its name (title) is found inside every Moodle text
     //It's based in the glosssary filter by Williams Castillo
@@ -18,7 +18,7 @@ class activitynames_filter extends moodle_text_filter {
         // Initialise/invalidate our trivial cache if dealing with a different course
         if (!isset($this->cachedcourseid) || $this->cachedcourseid !== (int)$this->courseid) {
             $this->activitylist = null;
-        } 
+        }
         $this->cachedcourseid = (int)$this->courseid;
 
         /// It may be cached
@@ -47,7 +47,7 @@ class activitynames_filter extends moodle_text_filter {
                 usort($modinfo, 'comparemodulenamesbylength');
 
                 foreach ($modinfo as $activity) {
-                    //Exclude labels, hidden activities and activities for group members only 
+                    //Exclude labels, hidden activities and activities for group members only
                     if ($activity->mod != "label" and $activity->visible and empty($activity->groupmembersonly)) {
                         $title = s(trim(strip_tags(urldecode($activity->name))));
                         $currentname = trim(urldecode($activity->name));
@@ -82,4 +82,4 @@ function comparemodulenamesbylength($a, $b)  {
     }
     return (strlen($a->name) < strlen($b->name)) ? 1 : -1;
 }
-?>
+
index 7635f8c076a1dfcb00e9e9631cf2101c0a53c0da..5f2c195c08015b65129e2a98bbab0857423d124e 100644 (file)
@@ -300,7 +300,7 @@ function slasharguments($texexp, $md5) {
           </form> <br /> <br />
        <center>
           <iframe name="inlineframe" align="middle" width="80%" height="200">
-          &lt;p&gt;Something is wrong...&lt;/p&gt; 
+          &lt;p&gt;Something is wrong...&lt;/p&gt;
           </iframe>
        </center> <br />
 <hr />
@@ -340,7 +340,7 @@ C sources downloaded from <a href="http://www.forkosh.com/mimetex.zip">
 http://www.forkosh.com/mimetex.zip</a>, or looking for an appropriate
 binary at <a href="http://moodle.org/download/mimetex/">
 http://moodle.org/download/mimetex/</a>. You may then also need to
-edit your moodle/filter/algebra/pix.php file to add 
+edit your moodle/filter/algebra/pix.php file to add
 <br /><?PHP echo "case &quot;" . PHP_OS . "&quot;:" ;?><br ?> to the list of operating systems
 in the switch (PHP_OS) statement. Windows users may have a problem properly
 unzipping mimetex.exe. Make sure that mimetex.exe is is <b>PRECISELY</b>
index 555e8bfc515e9585b8a8d1c32da43452059cf6ad..bd7ff31e859e44c958e20cd1513fa0dd7953ec63 100644 (file)
@@ -233,4 +233,4 @@ class algebra_filter extends moodle_text_filter {
     }
 }
 
-?>
+
index 5debd28829fbee0b719960ac1b63e27fb20a38a6..063da52e0314f13a46aac708ee9892bdef1e8c02 100644 (file)
@@ -6,7 +6,7 @@
 // disable moodle specific debug messages and any errors in output
 define('NO_DEBUG_DISPLAY', true);
 define('NO_MOODLE_COOKIES', true); // Because it interferes with caching
-    
+
     require_once('../../config.php');
 
     if (!filter_is_enabled('filter/algebra')) {
index cc50a2c3a9d779bff9bc0dbcabefb25898a2482a..cc1ee810c665e738844b4a29f1470b0a6b4702c8 100644 (file)
@@ -4,8 +4,8 @@
 //                      //
 //////////////////////////
 
-This is a very simple Text Filter that searches text 
-being output to the screen, replacing "bad" words 
+This is a very simple Text Filter that searches text
+being output to the screen, replacing "bad" words
 with other words.
 
 To customise the word list, use the censor settings page
index 58fac89411896ee0b461de48b071c2e4df7f38fd..2a0fe1bbd2e3dba6f61d925117cbc5f49e14bb1e 100644 (file)
@@ -1,22 +1,22 @@
-<?php // $id$
+<?php
 //////////////////////////////////////////////////////////////
 //  Censorship filtering
-// 
+//
 //  This very simple example of a Text Filter will parse
 //  printed text, blacking out words perceived to be bad
-//  
+//
 //  The list of words is in the lang/xx/moodle.php
 //
 //////////////////////////////////////////////////////////////
 
-/// This is the filtering class. It accepts the courseid and 
+/// This is the filtering class. It accepts the courseid and
 /// options to be filtered (In HTML form).
 class censor_filter extends moodle_text_filter {
     private function _canseecensor() {
         $cansee = false;
         $context = get_context_instance(CONTEXT_SYSTEM, SITEID);
         if (has_capability('moodle/site:doanything', $context)) {
-            $cansee = true; 
+            $cansee = true;
         }
         return $cansee;
     }
@@ -59,4 +59,4 @@ class censor_filter extends moodle_text_filter {
     }
 }
 
-?>
+
index 6effb9c30e1a0fa851bd4a2b609577c81e5a7f86..bd43273b3be20927a626b38b633680ca135e6593 100644 (file)
@@ -1,6 +1,6 @@
-<?php  //$Id$
+<?php
 
 $settings->add(new admin_setting_configtextarea('filter_censor_badwords', get_string('badwordslist','admin'),
                get_string('badwordsconfig', 'admin').'<br />'.get_string('badwordsdefault', 'admin'), ''));
 
-?>
+
index 9427b5e86151a32497a2ef5922978dcc24da1ff5..bd0ceb021e61da98b8ad4a224c6db73d8664bcc8 100644 (file)
@@ -1,6 +1,6 @@
-<?PHP // $Id$
-      // This class looks for email addresses in Moodle text and 
-      // hides them using the Moodle obfuscate_text function. 
+<?php
+      // This class looks for email addresses in Moodle text and
+      // hides them using the Moodle obfuscate_text function.
       // Original code by Mike Churchward
 
 class emailprotect_filter extends moodle_text_filter {
@@ -36,4 +36,4 @@ function alter_mailto($matches) {
     return obfuscate_mailto($matches[2], $matches[4]);
 }
 
-?>
+
index 08a199b96cb86db80665fcb5310864ce8621a921..81a182ac2211db736b4764bc777863debdef8650 100644 (file)
@@ -1,4 +1,4 @@
-<?php // $Id$
+<?php
 
 ///////////////////////////////////////////////////////////////////////////
 //                                                                       //
@@ -88,4 +88,3 @@ abstract class filter_local_settings_form extends moodleform {
         }
     }
 }
-?>
\ No newline at end of file
index a8e0e5615c80b534ee568767c831064cd2650cbe..3c48533dcc8c4ae558dee266149abae9d3af111e 100644 (file)
@@ -1,4 +1,4 @@
-<?php  // $Id$
+<?php
 
 ///////////////////////////////////////////////////////////////////////////
 //                                                                       //
@@ -214,4 +214,4 @@ if (!$isfrontpage && ($url = get_context_url($context))) {
 }
 
 echo $OUTPUT->footer();
-?>
+
index e3a223171eabdfd655d61308c3d75ff3d443387c..cbf57b783a0493127fcfdf4ef9b3916c4c49f47c 100644 (file)
@@ -35,7 +35,7 @@
           while (childNode = elm.childNodes[z++])
               HTML += childNode[outerHTML];
 
-          // create a 'dummy' element 
+          // create a 'dummy' element
           dummy = doc.createElement('i');
           // inject it next to `elm`,
           elm[parentNode].insertBefore(dummy, elm);
index 3a1b0e2d8187da5251b0b4f4e6ed6d7ffc2546e5..aa36702cc67ead9ed3defbc2155319ed1c9b30ba 100644 (file)
@@ -1,4 +1,4 @@
-<?php // $Id$
+<?php
 //////////////////////////////////////////////////////////////
 //  Media plugin filtering
 //
@@ -257,8 +257,8 @@ function mediaplugin_filter_youtube_callback($link, $autostart=false) {
     $url = addslashes_js($link[2]);
     $info = addslashes_js($link[3]);
 
-    return '<object title="'.$info.'" 
-                    class="mediaplugin mediaplugin_youtube" type="application/x-shockwave-flash" 
+    return '<object title="'.$info.'"
+                    class="mediaplugin mediaplugin_youtube" type="application/x-shockwave-flash"
                     data="'.$site.'youtube.com/v/'.$url.'&amp;fs=1&amp;rel=0" width="425" height="344">'.
            '<param name="movie" value="'.$site.'youtube.com/v/'.$url.'&amp;fs=1&amp;rel=0" />'.
            '<param name="FlashVars" value="playerMode=embedded" />'.
@@ -358,4 +358,4 @@ function mediaplugin_filter_qt_callback($link, $autostart=false) {
 </object></span>';
 }
 
-?>
+
index 3068a79c44d1b650870ef62ee332662d349487c1..0c05dafeecdc7aaf82fbfa16ef9a4cb29a55cca9 100644 (file)
@@ -1,4 +1,4 @@
-<?php  //$Id$
+<?php
 
 $settings->add(new admin_setting_configcheckbox('filter_mediaplugin_enable_mp3', get_string('mediapluginmp3','admin'), '', 1));
 
@@ -24,4 +24,4 @@ $settings->add(new admin_setting_configcheckbox('filter_mediaplugin_enable_youtu
 
 $settings->add(new admin_setting_configcheckbox('filter_mediaplugin_enable_img', get_string('mediapluginimg','admin'), '', 1));
 
-?>
+
index da6d5333998ba9a014d52edeef9c79268aa39c96..38de3eaca7ece3c314f7196b2a18f8e349e5ae20 100644 (file)
@@ -1,4 +1,4 @@
-The FLV player is by Jeroen Wijering - www.jeroenwijering.com 
+The FLV player is by Jeroen Wijering - www.jeroenwijering.com
 and included in Moodle by his permission under the GNU GPL version 2 or later.
 
 Thanks, Jeroen!
index 39ae791fd24d0d513146e098f8744806d21a6b8b..12e00f731ba76d6cc2639f33d5ae4bb3d4cd46af 100644 (file)
@@ -1,8 +1,6 @@
-$Id$
-
 To Install it:
     - Enable if from "Administration/Filters".
-  
+
 To Use it:
     - Create your contents in multiple languages.
     - Enclose every language content between:
@@ -36,7 +34,7 @@ One example in action:
         Hola!
         This text is common for every language because it's out from any lang block.
         Bye!
-    
+
 
 Ciao, Eloy :-)
 stronk7@moodle.org
index 3aa23c1d5d47d9b8c557c4a23aa1855b8924e2d5..8320bb6ddc7d5a17dccfcda2139a2767b062c272 100644 (file)
@@ -1,4 +1,4 @@
-<?php //$Id$
+<?php
 
 ///////////////////////////////////////////////////////////////////////////
 //                                                                       //
@@ -43,7 +43,7 @@ class multilang_filter extends moodle_text_filter {
         // [pj] I don't know about you but I find this new implementation funny :P
         // [skodak] I was laughing while rewriting it ;-)
         // [nicolasconnault] Should support inverted attributes: <span class="multilang" lang="en"> (Doesn't work curently)
-        // [skodak] it supports it now, though it is slower - any better idea? 
+        // [skodak] it supports it now, though it is slower - any better idea?
 
         if (empty($text) or is_numeric($text)) {
             return $text;
@@ -105,4 +105,4 @@ function multilang_filter_impl($langblock) {
     }
 }
 
-?>
+
index 895aa0ee9131f1efda18cbf3d6f3553bf38c5b96..022c6cc23b10431b3441a77e4516608e21e3a585 100644 (file)
@@ -1,6 +1,6 @@
-<?php  //$Id$
+<?php
 
 $settings->add(new admin_setting_configcheckbox('filter_multilang_force_old', 'filter_multilang_force_old',
                    get_string('multilangforceold', 'admin'), 0));
 
-?>
+
index d352f853aa31cd391adc78dc5790dc012c37b562..be70dc7b5bf83a69da912e9b0715ca82b3ca9b10 100644 (file)
@@ -1,4 +1,4 @@
-<?php // $Id$
+<?php
       // This script displays tex source code.
 
     require_once('../../config.php');
index c113ec6722569f23b2cd98837bb6ab7768f97ec0..58136060bd48742d1d39dbb2041d85dab9b2fe32 100644 (file)
@@ -68,10 +68,10 @@ function string_file_picture_tex($imagefile, $tex= "", $height="", $width="", $a
         $tex = str_replace('"','&quot;',$tex);
         $tex = str_replace("\'",'&#39;',$tex);
         // Note that we retain the title tag as TeX format rather than using
-        // the alt text, even if supplied. The alt text is intended for blind 
-        // users (to provide a text equivalent to the equation) while the title 
-        // is there as a convenience for sighted users who want to see the TeX 
-        // code. 
+        // the alt text, even if supplied. The alt text is intended for blind
+        // users (to provide a text equivalent to the equation) while the title
+        // is there as a convenience for sighted users who want to see the TeX
+        // code.
         $title = "title=\"$tex\"";
     }
 
@@ -172,4 +172,4 @@ class tex_filter extends moodle_text_filter {
     }
 }
 
-?>
+
index 111e5313223084735feefcb35b6547869d2a865b..34bfdd4b0869bfc243e7056d70b96ed59fee757f 100644 (file)
@@ -1,4 +1,4 @@
-<?php  //$Id$
+<?php
 
 require_once($CFG->dirroot.'/filter/tex/lib.php');
 
@@ -42,4 +42,4 @@ foreach ($items as $item) {
     $item->set_updatedcallback('filter_tex_updatedcallback');
     $settings->add($item);
 }
-?>
+
index 5386b2b9862282c92b25290a66be121f71723244..36d4c2e1125fcbde05d95e24e7fa47c2fed7b9cb 100644 (file)
@@ -1,8 +1,8 @@
-<?php // $Id$
+<?php
     // latex.php
     // render TeX stuff using latex - this will not work on all platforms
-    // or configurations. Only works on Linux and Mac with appropriate 
-    // software installed. 
+    // or configurations. Only works on Linux and Mac with appropriate
+    // software installed.
     // Much of this inspired/copied from Benjamin Zeiss' work
 
     class latex {
@@ -16,8 +16,8 @@
          * Other platforms could/should be added
          */
         function latex() {
-            global $CFG; 
-            
+            global $CFG;
+
             // construct directory structure
             $this->temp_dir = $CFG->dataroot . "/temp/latex";
             if (!file_exists("$CFG->dataroot/temp")) {
@@ -30,7 +30,7 @@
         }
 
         /**
-         * Accessor function for support_platform field. 
+         * Accessor function for support_platform field.
          * @return boolean value of supported_platform
          */
         function supported() {
@@ -49,7 +49,7 @@
             $formula = tex_sanitize_formula($formula);
 
             // $fontsize don't affects to formula's size. $density can change size
-            $doc =  "\\documentclass[{$fontsize}pt]{article}\n"; 
+            $doc =  "\\documentclass[{$fontsize}pt]{article}\n";
             $doc .=  $CFG->filter_tex_latexpreamble;
             $doc .= "\\pagestyle{empty}\n";
             $doc .= "\\begin{document}\n";
@@ -63,7 +63,7 @@
             return $doc;
         }
 
-        /** 
+        /**
          * execute an external command, with optional logging
          * @param string $command command to execute
          * @param file $log valid open file handle - log info will be written to this file
@@ -92,9 +92,9 @@
          * @return bool true if successful
          */
         function render( $formula, $filename, $fontsize=12, $density=240, $background='', $log=null ) {
-            
+
             global $CFG;
-  
+
             // quick check - will this work?
             if (empty($CFG->filter_tex_pathlatex)) {
                 return false;
             chdir( $this->temp_dir );
             if ($this->execute($command, $log)) { // It allways False on Windows
 //                return false;
-            } 
+            }
 
             // run dvips (.dvi to .ps)
             $command = "{$CFG->filter_tex_pathdvips} -E $dvi -o $ps";
     }
 
 
-?>
+
index d8c67513c10f4e7dcb54721c8cfe4bdc098ff195..8d8fc83238d6ad6848d8071e9c58dc01f734b0f7 100644 (file)
@@ -1,4 +1,4 @@
-<?php  //$Id$
+<?php
 
 function tex_filter_get_executable($debug=false) {
     global $CFG;
@@ -86,4 +86,4 @@ function filter_tex_updatedcallback($name) {
     $DB->delete_records('cache_filters', array('filter'=>'algebra'));
 }
 
-?>
+
index f5f542b06f9ee42a44024679542751934484af62..094f4980b2e024e28830e754c073f8aa4a3bd0b1 100644 (file)
@@ -1,4 +1,4 @@
-<?php // $Id$
+<?php
       // This function fetches math. images from the data directory
       // If not, it obtains the corresponding TeX expression from the cache_tex db table
       // and uses mimeTeX to create the image file
           </form> <br /> <br />
        <center>
           <iframe name="inlineframe" align="middle" width="80%" height="200">
-          &lt;p&gt;Something is wrong...&lt;/p&gt; 
+          &lt;p&gt;Something is wrong...&lt;/p&gt;
           </iframe>
        </center> <br />
 <hr />
@@ -316,7 +316,7 @@ tag.  The filter/tex/pix.php script then searches the database to find an
 appropriate gif image file for that expression and to create one if it doesn't exist.
 It will then use either the LaTex/Ghostscript renderer (using external executables
 on your system) or the bundled Mimetex executable. The full Latex/Ghostscript
-renderer produces better results and is tried first. 
+renderer produces better results and is tried first.
 Here are a few common things that can go wrong and some suggestions on how
 you might try to fix them.</p>
 <ol>
@@ -324,27 +324,27 @@ you might try to fix them.</p>
 process this expression. Then the database entry for that expression contains
 a bad TeX expression in the rawtext field (usually blank). You can fix this
 by clicking on &quot;Delete DB Entry&quot;</li>
-<li>The TeX to gif image conversion process does not work. 
+<li>The TeX to gif image conversion process does not work.
 If paths are specified in the filter configuation screen for the three
 executables these will be tried first. Note that they still must be correctly
-installed and have the correct permissions. In particular make sure that you 
+installed and have the correct permissions. In particular make sure that you
 have all the packages installed (e.g., on Debian/Ubuntu you need to install
 the 'tetex-extra' package). Running the 'show command execution' test should
 give a big clue.
-If this fails or is not available, the Mimetex executable is tried. If this 
+If this fails or is not available, the Mimetex executable is tried. If this
 fails a likely cause is that the mimetex binary you are using is
 incompatible with your operating system. You can try compiling it from the
 C sources downloaded from <a href="http://www.forkosh.com/mimetex.zip">
 http://www.forkosh.com/mimetex.zip</a>, or looking for an appropriate
 binary at <a href="http://moodle.org/download/mimetex/">
 http://moodle.org/download/mimetex/</a>. You may then also need to
-edit your moodle/filter/tex/pix.php file to add 
+edit your moodle/filter/tex/pix.php file to add
 <br /><?PHP echo "case &quot;" . PHP_OS . "&quot;:" ;?><br ?> to the list of operating systems
 in the switch (PHP_OS) statement. Windows users may have a problem properly
 unzipping mimetex.exe. Make sure that mimetex.exe is is <b>PRECISELY</b>
 433152 bytes in size. If not, download a fresh copy from
 <a href="http://moodle.org/download/mimetex/windows/mimetex.exe">
-http://moodle.org/download/mimetex/windows/mimetex.exe</a>. 
+http://moodle.org/download/mimetex/windows/mimetex.exe</a>.
 Another possible problem which may affect
 both Unix and Windows servers is that the web server doesn't have execute permission
 on the mimetex binary. In that case change permissions accordingly</li>
index 128617a9c1bcb40e7d86bff916f03e1cf0b8182c..28259f228c757170aa5c39b40f4f2d6b191bdde2 100644 (file)
@@ -1,4 +1,4 @@
-<?PHP // $Id$
+<?php
       // This function fetches math. images from the data directory
       // If not, it obtains the corresponding TeX expression from the cache_tex db table
       // and uses mimeTeX to create the image file
index 53d1f2d11b80995c704d6d5fcafab59ab814cc68..c57fc14e90a91180321a6c8e8918572aef1185e2 100644 (file)
@@ -1,26 +1,26 @@
 <?php
-      
+
 // This class looks for text including markup and
 // applies tidy's repair function to it.
 // Tidy is a HTML clean and
 // repair utility, which is currently available for PHP 4.3.x and PHP 5 as a
 // PECL extension from http://pecl.php.net/package/tidy, in PHP 5 you need only
 // to compile using the --with-tidy option.
-// If you don't have the tidy extension installed or don't know, you can enable  
+// If you don't have the tidy extension installed or don't know, you can enable
 // or disable this filter, it just won't have any effect.
 // If you want to know what you can set in $tidyoptions and what their default
 // values are, see http://php.net/manual/en/function.tidy-get-config.php.
-      
+
 class tidy_filter extends moodle_text_filter {
     /**
     * @author Hannes Gassert <hannes at mediagonal dot ch>
     * @param        string         text to be filtered
     */
     function filter($text) {
-           
+
     /// Configuration for tidy. Feel free to tune for your needs, e.g. to allow
     /// proprietary markup.
-        $tidyoptions = array(             
+        $tidyoptions = array(
                  'output-xhtml' => true,
                  'show-body-only' => true,
                  'tidy-mark' => false,
@@ -30,13 +30,13 @@ class tidy_filter extends moodle_text_filter {
                  'indent' => true,
                  'quiet' => true,
         );
-        
+
     /// Do a quick check using strpos to avoid unnecessary work
         if (strpos($text, '<') === false) {
             return $text;
         }
 
-        
+
     /// If enabled: run tidy over the entire string
         if (function_exists('tidy_repair_string')){
             $text = tidy_repair_string($text, $tidyoptions, 'utf8');
@@ -45,4 +45,4 @@ class tidy_filter extends moodle_text_filter {
         return $text;
     }
 }
-?>
+
index 5fdd841fb4650ef6eee4d5f7797d5a4a9b6ceb5a..75bfb81dadd40dbb6a91fb1d0dedbf8cc14a85e3 100644 (file)
@@ -233,4 +233,4 @@ if ($postcontrol) { // the magic request variable plugins must pass on returning
 // actually do the work now..
 $exporter->process_stage($stage, $alreadystolen);
 
-?>
+
index 0516612a7533d39a88aa5d0029e5c1c21ba36620..e7a358860b1d038d7b20240703aaa43b9a84ce34 100644 (file)
@@ -79,4 +79,4 @@ if (count($table->data) > 0) {
 
 echo $OUTPUT->footer();
 
-?>
+
index 6032e6de293308ce325f2d5b2cd767138a4e2db9..e184c91342b7783c22608bcb8d8dcbc63a91a218 100644 (file)
@@ -59,4 +59,4 @@ if (!$exporter->get('instance')->verify_file_request_params(array_merge($_GET, $
 $exporter->get('instance')->send_file();
 $exporter->process_stage_cleanup(true);
 exit;
-?>
+
index ac03f95c882ce9e25d194ce83e8abf4935e141a2..30bb1bff74e6fabc0643fc3994e9f9e106aca335 100644 (file)
@@ -1,4 +1,4 @@
-<?php // $Id$
+<?php
 require_once("$CFG->libdir/simpletest/testportfoliolib.php");
 require_once("$CFG->dirroot/portfolio/type/boxnet/lib.php");
 require_once("$CFG->dirroot/$CFG->admin/generator.php");
@@ -56,4 +56,4 @@ class testPortfolioPluginBoxnet extends portfoliolib_test {
         $this->assertTrue($this->plugin->send_package());
     }
 }
-?>
+
index 1a008260797be433e9ef1984447d0ea79260df8b..b0f0203add5b2020bcd7fe466a5e93264be29101 100644 (file)
@@ -4,4 +4,4 @@ $plugin->version  = 2008072500;
 $plugin->requires = 2008072500;
 $plugin->cron     = 0;
 
-?>
+
index e131478cce1877babfee3c7e3d1e1df6ac18aa3d..0ae8307d9098aece1b0bb37c6a44ac3fafe03770 100644 (file)
@@ -37,4 +37,4 @@ echo '<div id="redirect">
 
 echo $OUTPUT->footer();
 
-?>
+
index 094edc2489ba94d4f820563efc25ca870441d9bf..8d3dfc8e52b40d0ad198a134ccb6052e5a910c5d 100755 (executable)
@@ -1,4 +1,4 @@
-<?php // $Id$
+<?php
 require_once($CFG->libdir.'/simpletest/testportfoliolib.php');
 require_once($CFG->dirroot.'/portfolio/type/download/lib.php');
 
@@ -19,4 +19,4 @@ class testPortfolioPluginDownload extends portfoliolib_test {
     }
 
 }
-?>
+
index 1a008260797be433e9ef1984447d0ea79260df8b..b0f0203add5b2020bcd7fe466a5e93264be29101 100644 (file)
@@ -4,4 +4,4 @@ $plugin->version  = 2008072500;
 $plugin->requires = 2008072500;
 $plugin->cron     = 0;
 
-?>
+
index 1a008260797be433e9ef1984447d0ea79260df8b..b0f0203add5b2020bcd7fe466a5e93264be29101 100755 (executable)
@@ -4,4 +4,4 @@ $plugin->version  = 2008072500;
 $plugin->requires = 2008072500;
 $plugin->cron     = 0;
 
-?>
+
index 181dc1de3ce9756840198d49b9751d4081c38f62..b6342a7de53d8d0d28fe48ec921d7ca273f68e52 100644 (file)
@@ -1,11 +1,11 @@
-<?php // $Id$
+<?php
 
 $handlers = array (
     'user_deleted' => array (
          'handlerfile'      => '/portfolio/type/googledocs/lib.php',
-         'handlerfunction'  => 'portfolio_googledocs_user_deleted', 
+         'handlerfunction'  => 'portfolio_googledocs_user_deleted',
          'schedule'         => 'cron'
      ),
 );
 
-?>
+
index 226c6bafa8b70c78cc24a2aac347952c3bb03e99..34e9ad12e38ae254710b7beeb00bf3bb4979b613 100644 (file)
@@ -1,9 +1,8 @@
-<?php 
+<?php
 /**
  * Google Documents Portfolio Plugin
  *
  * @author Dan Poltawski <talktodan@gmail.com>
- * @version $Id$
  * @license http://www.gnu.org/copyleft/gpl.html GNU Public License
  */
 require_once($CFG->libdir.'/googleapi.php');
@@ -21,7 +20,7 @@ class portfolio_plugin_googledocs extends portfolio_plugin_push_base {
 
     public function prepare_package() {
         // we send the files as they are, no prep required
-        return true; 
+        return true;
     }
        
     public function get_continue_url(){
@@ -89,7 +88,7 @@ class portfolio_plugin_googledocs extends portfolio_plugin_push_base {
 }
 
 /**
- * Registers to the user_deleted event to revoke any 
+ * Registers to the user_deleted event to revoke any
  * subauth tokens we have from them
  *
  * @param $user user object
@@ -110,5 +109,5 @@ function portfolio_googledocs_user_deleted($user){
         }
     }
 
-    return true; 
+    return true;
 }
index cd8312d2d8765dc362f9b6e40b9e1412dcb18027..ca8f93f28e3dacc032cc480aeda2cd21e3878f59 100644 (file)
@@ -1,6 +1,6 @@
-<?php // $Id$
+<?php
 
 $plugin->version  = 2008072505;
 $plugin->requires = 2008072500;
 $plugin->cron     = 0;
-?>
+
index 36cfb6c0967f7458e3d9963dff6c42bb8ef93c4a..ea11f8e520ecdd4cd6d239e60039919d1eedaf18 100644 (file)
@@ -1,4 +1,4 @@
-<?php  //$Id$
+<?php
 
 // This file keeps track of upgrades to
 // the portfolio/mahara plugin
index cff5b4bca0fa9388139056486c0c9b691b2472f7..2105cbeafeac8fd25d266260387e06e16d75816f 100644 (file)
@@ -354,4 +354,4 @@ class portfolio_plugin_mahara extends portfolio_plugin_pull_base {
     }
 }
 
-?>
+
index 8784fc8208af72949a5ba5b3983aa30c7352eab1..c74ed82b06fa479eb774bc2a8aed7e54eaa7cd9d 100644 (file)
@@ -28,4 +28,4 @@ if (!$landed = optional_param('landed', false, PARAM_BOOL)) {
     $exporter->get('instance')->send_intent();
     redirect($CFG->wwwroot . '/portfolio/add.php?postcontrol=1&id=' . $exporter->get('id'));
 }
-?>
+
index 1a008260797be433e9ef1984447d0ea79260df8b..b0f0203add5b2020bcd7fe466a5e93264be29101 100644 (file)
@@ -4,4 +4,4 @@ $plugin->version  = 2008072500;
 $plugin->requires = 2008072500;
 $plugin->cron     = 0;
 
-?>
+
index dd5e280761cdf8eb3441b763e6db33a620f7ff5d..62845c04b69595ff3fb88df4f3c17905a22d6315 100644 (file)
@@ -1,11 +1,11 @@
-<?php // $Id$
+<?php
 
 $handlers = array (
     'user_deleted' => array (
          'handlerfile'      => '/portfolio/type/picasa/lib.php',
-         'handlerfunction'  => 'portfolio_picasa_user_deleted', 
+         'handlerfunction'  => 'portfolio_picasa_user_deleted',
          'schedule'         => 'cron'
      ),
 );
 
-?>
+
index 75e3c1cad244b1675da4f3220565ecfd5a88f0d6..ac539d2a5df99100b0f87a056d4e4f11ba8e8a98 100644 (file)
@@ -1,9 +1,8 @@
-<?php 
+<?php
 /**
  * Picasa Portfolio Plugin
  *
  * @author Dan Poltawski <talktodan@gmail.com>
- * @version $Id$
  * @license http://www.gnu.org/copyleft/gpl.html GNU Public License
  */
 
@@ -22,7 +21,7 @@ class portfolio_plugin_picasa extends portfolio_plugin_push_base {
 
     public function prepare_package() {
         // we send the files as they are, no prep required
-        return true; 
+        return true;
     }
        
     public function get_continue_url(){
@@ -90,7 +89,7 @@ class portfolio_plugin_picasa extends portfolio_plugin_push_base {
 }
 
 /**
- * Registers to the user_deleted event to revoke any 
+ * Registers to the user_deleted event to revoke any
  * subauth tokens we have from them
  *
  * @param $user user object
@@ -111,5 +110,5 @@ function portfolio_picasa_user_deleted($user){
         }
     }
 
-    return true; 
+    return true;
 }
index e210acd0735a58861143bf9af6562382980a7b6b..0560b4465c1eeca980bc59affaf606deabdc28f0 100644 (file)
@@ -1,7 +1,7 @@
-<?php // $Id$
+<?php
 
 $plugin->version  = 2008072505;
 $plugin->requires = 2008072500;
 $plugin->cron     = 0;
 
-?>
+
index 2b1334205da4a2f21dc17e01c50b5d4e238183c6..eb557c48d77b458d3a9fa074ef026b81585b9230 100755 (executable)
@@ -2,7 +2,6 @@
 /**
  * repository_alfresco class
  *
- * @version $Id$
  * @license http://www.gnu.org/copyleft/gpl.html GNU Public License
  */
 
@@ -51,7 +50,7 @@ class repository_alfresco extends repository {
             $user_field->id    = 'alfresco_username';
             $user_field->type  = 'text';
             $user_field->name  = 'al_username';
-            
+
             $passwd_field->label = get_string('password', 'repository_alfresco').': ';
             $passwd_field->id    = 'alfresco_password';
             $passwd_field->type  = 'password';
@@ -203,4 +202,4 @@ class repository_alfresco extends repository {
         }
     }
 }
-?>
+
index ef206cd648c364c48007e4d7d192dc710dc61371..19071d88335a077b26f5817d6cfe13278e06c740 100755 (executable)
@@ -6,7 +6,6 @@ require_once($CFG->libdir.'/boxlib.php');
  * This is a subclass of repository class
  *
  * @author Dongsheng Cai
- * @version $Id$
  * @license http://www.gnu.org/copyleft/gpl.html GNU Public License
  */
 class repository_boxnet extends repository {
@@ -32,7 +31,7 @@ class repository_boxnet extends repository {
         if(!empty($options['username']) && !empty($options['password']) && !empty($options['ticket']) ) {
             $this->box = new boxclient($this->api_key);
             try {
-                $SESSION->$sess_name = $this->box->getAuthToken($options['ticket'], 
+                $SESSION->$sess_name = $this->box->getAuthToken($options['ticket'],
                     $options['username'], $options['password']);
             } catch (repository_exception $e) {
                 throw $e;
@@ -149,7 +148,7 @@ class repository_boxnet extends repository {
             $fileicon  = $tree['thumbnail'];
             foreach ($filenames as $n=>$v){
                 if(strstr(strtolower($v), strtolower($search_text)) !== false) {
-                    $list[] = array('title'=>$v, 
+                    $list[] = array('title'=>$v,
                             'size'=>$filesizes[$n],
                             'date'=>$filedates[$n],
                             'source'=>'http://box.net/api/1.0/download/'
@@ -199,7 +198,7 @@ class repository_boxnet extends repository {
             $user_field->type  = 'text';
             $user_field->name  = 'boxusername';
             $user_field->value = $ret->username;
-            
+
             $passwd_field->label = get_string('password', 'repository_boxnet').': ';
             $passwd_field->id    = 'box_password';
             $passwd_field->type  = 'password';
@@ -244,4 +243,4 @@ class repository_boxnet extends repository {
         $mform->addElement('static', null, '',  get_string('information','repository_boxnet'));
     }
 }
-?>
+
index 4a608cae5f95bf81f0a6a098a94dee0455c395b9..806f56985290404ac2862461674f870bbde3ea03 100755 (executable)
@@ -3,7 +3,6 @@
  * repository_draft class
  * This is a subclass of repository class
  *
- * @version $Id$
  * @license http://www.gnu.org/copyleft/gpl.html GNU Public License
  */
 class repository_draft extends repository {
@@ -102,4 +101,4 @@ class repository_draft extends repository {
         return get_string('repositoryname', 'repository_draft');;
     }
 }
-?>
+
index c5f64a4fb0967c8a0056a34e82290ca42ec8d88d..d728a34af44e32471ee17291061b41ce4cc5763d 100644 (file)
@@ -1,4 +1,4 @@
-<?php // $Id$
+<?php
 
 /**
  * repository_filesystem class
index 1bee4a27badf56f1c4f3ab44f9d25e285ce9a650..b9a05521826f4ba3db050bcb2cea56044184838d 100755 (executable)
@@ -4,7 +4,6 @@
  * This plugin is used to access user's private flickr repository
  *
  * @author Dongsheng Cai <dongsheng@moodle.com>
- * @version $Id$
  * @license http://www.gnu.org/copyleft/gpl.html GNU Public License
  */
 
@@ -169,7 +168,7 @@ class repository_flickr extends repository {
                 $format = '.'.$format;
                 // append extensions to the files
                 if (substr($p['title'], strlen($p['title'])-strlen($format)) != $format) {
-                    $p['title'] .= $format; 
+                    $p['title'] .= $format;
                 }
                 $ret['list'][] = array('title'=>$p['title'],'source'=>$p['id'],
                     'id'=>$p['id'],'thumbnail'=>$this->flickr->buildPhotoURL($p, 'Square'),
index bb4d558df37f5f9643047410d09d960264284457..373b4129ce77d1e29e416cfbc0a54ef5630929cf 100755 (executable)
@@ -27,8 +27,8 @@ class moodle_image {
         case 'image/png':
             $this->image = imagecreatefrompng($this->imagepath);
             break;
-        case 'image/gif': 
-            $this->image = imagecreatefromgif($this->imagepath); 
+        case 'image/gif':
+            $this->image = imagecreatefromgif($this->imagepath);
             break;
         default:
             break;
@@ -114,7 +114,7 @@ class moodle_image {
         case 'image/png':
             return imagepng($this->image, $imagepath);
             break;
-        case 'image/gif': 
+        case 'image/gif':
             return imagegif($this->image, $imagepath);
             break;
         default:
index 4ed6414eacb3e6a75ac9e021813d6a3fd7f3fa81..6fbfc0f3862fd6e62374a5f6c3dd5e0f1dc94253 100644 (file)
@@ -6,7 +6,6 @@
  * access photos in this public account
  *
  * @author Dongsheng Cai <dongsheng@moodle.com>
- * @version $Id$
  * @license http://www.gnu.org/copyleft/gpl.html GNU Public License
  */
 
@@ -266,7 +265,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,
@@ -336,7 +335,7 @@ class repository_flickr_public extends repository {
                     // append author id
                     // $p['title'] .= '-'.$p['owner'];
                     // append file extension
-                    $p['title'] .= $format; 
+                    $p['title'] .= $format;
                 }
                 $ret['list'][] = array('title'=>$p['title'], 'source'=>$p['id'],
                     'id'=>$p['id'],'thumbnail'=>$this->flickr->buildPhotoURL($p, 'Square'),
index 45948d1bfaa8cbbc347180fa89182e7d2c450d54..f854e2645d5fd81f9f80b4238933fcb1ccec1c55 100644 (file)
@@ -3,7 +3,6 @@
  * Google Docs Plugin
  *
  * @author Dan Poltawski <talktodan@gmail.com>
- * @version $Id$
  * @license http://www.gnu.org/copyleft/gpl.html GNU Public License
  */
 
@@ -44,16 +43,16 @@ class repository_googledocs extends repository {
         return false;
     }
 
-    public function print_login($ajax = true){ 
+    public function print_login($ajax = true){
         global $CFG;
         if($ajax){
-            $ret = array(); 
-            $popup_btn = new stdclass; 
-            $popup_btn->type = 'popup'; 
+            $ret = array();
+            $popup_btn = new stdclass;
+            $popup_btn->type = 'popup';
             $returnurl = $CFG->wwwroot.'/repository/ws.php?callback=yes&repo_id='.$this->id;
             $popup_btn->url = google_authsub::login_url($returnurl, google_docs::REALM);
-            $ret['login'] = array($popup_btn); 
-            return $ret; 
+            $ret['login'] = array($popup_btn);
+            return $ret;
         }
     }
 
index 13ddb00c2ff97418349089cbdfe2f81becd12652..b29ddf13688b873b267259995df1d5297f0d8277 100755 (executable)
@@ -3,7 +3,6 @@
  * repository_local class
  * This is a subclass of repository class
  *
- * @version $Id$
  * @license http://www.gnu.org/copyleft/gpl.html GNU Public License
  */
 
@@ -160,4 +159,4 @@ class repository_local extends repository {
         return get_string('repositoryname', 'repository_local');;
     }
 }
-?>
+
index 75cc8a96e689162af8fba67e8d7d2d05dbaf9f8e..7f6f32e090cfb2d3f1de2efa7867fe0d1a64cfa5 100644 (file)
@@ -88,7 +88,7 @@ class repository_mahara extends repository {
 
         //set session
         $SESSION->loginmahara = true;
-       
+
         $ret = array();
         $popup_btn = new stdclass;
         $popup_btn->type = 'popup';
@@ -176,7 +176,7 @@ class repository_mahara extends repository {
         } else {
              $client->add_param($search);
         }
-       
+
         ///call the method and manage host error
         if (!$client->send($mnet_peer)) {
             $message =" ";
@@ -219,7 +219,7 @@ class repository_mahara extends repository {
                 $list[] = array( 'title'=>$file['title'], 'date'=>$file['mtime'], 'source'=>$file['id'], 'thumbnail' => $thumbnail);
             }
         }
-       
+
 
         $filepickerlisting = array(
             'path' => $newpath,
@@ -343,4 +343,4 @@ class repository_mahara extends repository {
         return array('peer');
     }
 }
-?>
+
index 315d2a200ad848ef06f1979ebde94d554d5f0141..1b4e1142f2f8da4828b390f47151750fe4e7bdbf 100644 (file)
@@ -1,4 +1,4 @@
-<?php  // $Id$
+<?php
 
     require_once(dirname(dirname(__FILE__)) . '/config.php');
     require_once($CFG->dirroot . '/repository/lib.php');
index 629b820f9cbf211a4b237f44c92057c085c78642..f03a91d50daac038c847e3b7c0a8f2d54bf15659 100644 (file)
@@ -3,7 +3,6 @@
  * Picasa Repository Plugin
  *
  * @author Dan Poltawski <talktodan@gmail.com>
- * @version $Id$
  * @license http://www.gnu.org/copyleft/gpl.html GNU Public License
  */
 
@@ -44,17 +43,17 @@ class repository_picasa extends repository {
         return false;
     }
 
-    public function print_login(){ 
+    public function print_login(){
         global $CFG;
         $returnurl = $CFG->wwwroot.'/repository/ws.php?callback=yes&repo_id='.$this->id;
         $authurl = google_authsub::login_url($returnurl, google_picasa::REALM);
         if($this->options['ajax']){
-            $ret = array(); 
-            $popup_btn = new stdclass; 
-            $popup_btn->type = 'popup'; 
+            $ret = array();
+            $popup_btn = new stdclass;
+            $popup_btn->type = 'popup';
             $popup_btn->url = $authurl;
-            $ret['login'] = array($popup_btn); 
-            return $ret; 
+            $ret['login'] = array($popup_btn);
+            return $ret;
         } else {
             echo '<a target="_blank" href="'.$authurl.'">Login</a>';
         }
index 388e9e4d407917e1ad84b7a4cfe4e97d17cce51f..9898144d17a1a6902e38bb303e26516cfb6bd1e1 100644 (file)
@@ -4,7 +4,6 @@
  * This plugin allowed to connect a retrieve a file from another Moodle site
  * This is a subclass of repository class
  * @author Jerome Mouneyrac
- * @version $Id$
  * @license http://www.gnu.org/copyleft/gpl.html GNU Public License
  */
 
@@ -322,4 +321,4 @@ class repository_remotemoodle extends repository {
         return array('peer');
     }
 }
-?>
+
index 941a353b71d81072fd04913d013fc856f4430e1c..cc4937fbd8304abe8df9bce23cbdeb9b3ba64e88 100644 (file)
 .ygtvlph { background: url(../pix/y/lph.gif) 0 0 no-repeat; width:34px; height:22px; cursor:pointer }
 /* Loading icon */
 .ygtvloading { background: url(../pix/y/loading.gif) 0 0 no-repeat; width:16px; height:22px; }
-/* the style for the empty cells that are used for rendering the depth 
+/* the style for the empty cells that are used for rendering the depth
  * of the node */
 .ygtvdepthcell { background: url(../pix/y/vline.gif) 0 0 no-repeat; width:17px; height:22px; }
 .ygtvblankdepthcell { width:17px; height:22px; }
 /* the style of the div around each node */
-.ygtvitem { }  
+.ygtvitem { }
 .ygtvitem  table{ margin-bottom:0; }
-.ygtvitem  td { border:none;padding:0; } 
+.ygtvitem  td { border:none;padding:0; }
 /* the style of the div around each node's collection of children */
-.ygtvchildren { }  
-* html .ygtvchildren { height:1%; }  
+.ygtvchildren { }
+* html .ygtvchildren { height:1%; }
 /* the style of the text label in ygTextNode */
 .ygtvlabel, .ygtvlabel:link, .ygtvlabel:visited, .ygtvlabel:hover { margin-left:2px; text-decoration: none; }
 
index 3f6d7592c3c0c17eb8c9290034744555b743c37c..b56f1539e05749320b330f6e0f123a80210bb0dc 100644 (file)
@@ -4,7 +4,7 @@
 //                                                                       //
 ///////////////////////////////////////////////////////////////////////////
 /**
- * repository_client is a javascript class, it contains several static 
+ * repository_client is a javascript class, it contains several static
  * methods you can call it directly without creating an instance.
  * If you are going to create a file picker, you need create an instance
  * repo = new repository_client();
@@ -173,7 +173,7 @@ var repository_client = (function(){
             var container = new YAHOO.util.Element('repo-list-'+this.client_id);
             container.set('innerHTML', '');
             container.on('contentReady', function() {
-                this.init_search();    
+                this.init_search();
                 for(var i in repository_listing[this.client_id]) {
                     var repo = repository_listing[this.client_id][i];
                     var support = false;
@@ -265,7 +265,7 @@ repository_client.req = function(client_id, id, path, page) {
 
 repository_client.req_cb = {
     success: function(o){
-         var data = repository_client.parse_json(o.responseText, 'req_cb');    
+         var data = repository_client.parse_json(o.responseText, 'req_cb');
          var repo = repository_client.fp[data.client_id];
          repo.viewbar.set('disabled', false);
          var panel = new YAHOO.util.Element('panel-'+data.client_id);
@@ -370,7 +370,7 @@ repository_client.print_login = function(id, data) {
                 str += '<td align="left">';
                 for(var item in list) {
                     str +='<input type="'+login[k].type+'"'+' name="'+login[k].name+'"'+
-                        field_id+' value="'+list[item]+'" />'+labels[item]+'<br />'; 
+                        field_id+' value="'+list[item]+'" />'+labels[item]+'<br />';
                 }
                 str += '</td>';
             }else{
@@ -494,7 +494,7 @@ repository_client.view_as_list = function(client_id, data) {
         // from viewfiles
         list = repository_client.fp[client_id].fs.list;
     }else{
-        // from callback 
+        // from callback
         list = data;
     }
     var panel = new YAHOO.util.Element('panel-'+client_id);
@@ -507,7 +507,7 @@ repository_client.view_as_list = function(client_id, data) {
     tree.dynload = function (node, fnLoadComplete) {
         var callback = {
             success: function(o) {
-                 var json = repository_client.parse_json(o.responseText, 'dynload');    
+                 var json = repository_client.parse_json(o.responseText, 'dynload');
                  for(k in json.list) {
                      repository_client.buildtree(json.client_id, json.list[k], node);
                  }
@@ -590,7 +590,7 @@ repository_client.select_file = function(oldname, url, icon, client_id, repo_id)
     if (repository_client.files[client_id] == undefined) {
         repository_client.files[client_id] = 0;
     }
-    if (repository_client.files[client_id] >= repository_client.fp[client_id].maxfiles && 
+    if (repository_client.files[client_id] >= repository_client.fp[client_id].maxfiles &&
             repository_client.fp[client_id].maxfiles != -1)
     {
         alert('Only '+repository_client.fp[client_id].maxfiles+' files are allowed!');
@@ -800,7 +800,7 @@ repository_client.view_as_icons = function(client_id, data) {
             delbtn.innerHTML = "[X]";
             delbtn.id = 'del-id-'+String(count);
             el.appendChild(delbtn);
-            delbtn.itemid=fp.itemid; 
+            delbtn.itemid=fp.itemid;
             delbtn.client_id=client_id;
             delbtn.title=list[k].title;
             delbtn.repo_id=fp.fs.repo_id;
@@ -852,7 +852,7 @@ repository_client.view_as_icons = function(client_id, data) {
                 this.on('click', function(){
                     this.folder.fireEvent('click');
                 });
-            });    
+            });
             el_title.folder = folder;
         } else {
             var el_title = new YAHOO.util.Element(title.id);
@@ -866,7 +866,7 @@ repository_client.view_as_icons = function(client_id, data) {
                 el_title.repo_id = file.repo_id = list[k].repo_id;
             }else{
                 el_title.repo_id = file.repo_id = '';
-            }     
+            }
             file.on('contentReady', function() {
                 this.on('click', function() {
                     repository_client.select_file(this.filename, this.value, this.icon, client_id, this.repo_id);
@@ -1015,7 +1015,7 @@ repository_client.download = function(client_id, repo_id) {
 }
 repository_client.download_cb = {
     success: function(o) {
-         var data = repository_client.parse_json(o.responseText, 'download_cb');    
+         var data = repository_client.parse_json(o.responseText, 'download_cb');
          var panel = new YAHOO.util.Element('panel-'+data.client_id);
          if(data && data.e) {
              panel.get('element').innerHTML = data.e;
@@ -1109,7 +1109,7 @@ repository_client.upload = function(client_id) {
 }
 repository_client.upload_cb = {
 upload: function(o) {
-        var ret = repository_client.parse_json(o.responseText, 'upload');    
+        var ret = repository_client.parse_json(o.responseText, 'upload');
         client_id = ret.client_id;
         if(ret && ret.e) {
             var panel = new YAHOO.util.Element('panel-'+client_id);
index e2e3b5427715062ecc2d3fe6c1a20227f47201a2..603b39b301562455b2847b50e18a984de3ac7711 100644 (file)
@@ -1,7 +1,5 @@
 <?php
 /**
-* $Id$
-*
 * Copyright (c) 2008, Donovan Schönknecht.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
index 185764c51dd9a9925d65366b1ef9975f4579d1e8..beb61977bbee6b6d019d6b592331c7008b0bef37 100644 (file)
@@ -1,4 +1,4 @@
-<?php // $Id$
+<?php
 require_once('S3.php');
 
 class repository_s3 extends repository {
@@ -63,7 +63,7 @@ class repository_s3 extends repository {
         $this->s->getObject($bucket, $filename, $path);
         return $path;
     }
-    // login 
+    // login
     public function check_login() {
         return true;
     }
index d0f3821c8b932d85a0c6ec67b24a4c80f9e5852e..5813cd4016539978eb9165153739d64f8e0f565c 100755 (executable)
@@ -3,7 +3,6 @@
  * repository_upload class
  * A subclass of repository, which is used to upload file
  *
- * @version $Id$
  * @license http://www.gnu.org/copyleft/gpl.html GNU Public License
  */
 
@@ -72,4 +71,4 @@ class repository_upload extends repository {
         return get_string('repositoryname', 'repository_upload');
     }
 }
-?>
+
index 9d41127ab59f374052a1bf2c7b7370c83024b8cf..ae5d9cefab8548b0dac77bec81732431c249242b 100644 (file)
@@ -678,7 +678,7 @@ function extract_css_urls( $text )
        // @import "..."
        foreach ( $matches[3] as $match )
                if ( !empty($match) )
-                       $urls['import'][] = 
+                       $urls['import'][] =
                                preg_replace( '/\\\\(.)/u', '\\1', $match );
 
        // @import url(...)
@@ -686,7 +686,7 @@ function extract_css_urls( $text )
        // @import url("...")
        foreach ( $matches[7] as $match )
                if ( !empty($match) )
-                       $urls['import'][] = 
+                       $urls['import'][] =
                                preg_replace( '/\\\\(.)/u', '\\1', $match );
 
        // url(...)
@@ -694,7 +694,7 @@ function extract_css_urls( $text )
        // url("...")
        foreach ( $matches[11] as $match )
                if ( !empty($match) )
-                       $urls['property'][] = 
+                       $urls['property'][] =
                                preg_replace( '/\\\\(.)/u', '\\1', $match );
 
        return $urls;
index b67a39061942defc20b21c6bfbb182a906799ccd..e295dc2695bd9c24fdea0d6caf1bd3ac1ef10caf 100755 (executable)
@@ -3,7 +3,6 @@
  * repository_url class
  * A subclass of repository, which is used to download a file from a specific url
  *
- * @version $Id$
  * @license http://www.gnu.org/copyleft/gpl.html GNU Public License
  */
 
@@ -139,4 +138,4 @@ EOD;
         return get_string('repositoryname', 'repository_url');;
     }
 }
-?>
+
index d32771363cb07f7991d49f0a3a2bb1008d986797..f49aa2b59e4c8df2f90a2084cfec6db1fd5a84b9 100644 (file)
@@ -3,7 +3,6 @@
  * repository_webdav class
  *
  * @author Dongsheng Cai
- * @version $Id$
  * @license http://www.gnu.org/copyleft/gpl.html GNU Public License
  */
 
index 5d985a715bed535fb81187fd22b0fd7409d271cf..c65044693cd0dd71817d854f7de01c405b60189d 100644 (file)
@@ -8,7 +8,7 @@ class repository_wikimedia extends repository {
     }
     public function get_listing($path = '', $page = '') {
         global $OUTPUT;
-        $client = new wikimedia; 
+        $client = new wikimedia;
         $result = $client->search_images($this->keyword);
         $list = array();
         $list['list'] = array();
@@ -24,7 +24,7 @@ class repository_wikimedia extends repository {
         }
         return $list;
     }
-    // login 
+    // login
     public function check_login() {
         return !empty($this->keyword);
     }
@@ -52,7 +52,7 @@ class repository_wikimedia extends repository {
         $search_result['list'] = array();
         return $search_result;
     }
-    // when logout button on file picker is clicked, this function will be 
+    // when logout button on file picker is clicked, this function will be
     // called.
     public function logout() {
         return true;
index 18989e2984a70a0aaeb0d21fbc1ec1d55ca8e2ae..4d203adb823b73ea37c22e50a2a1c7e2b79b36cd 100644 (file)
@@ -1,4 +1,4 @@
-<?php  // $Id$
+<?php
 
 /// The Web service script that is called from the filepicker front end
 
index 948d95f2c965372870854394b8aa8421e04acb40..5a79a4305b57e37bba4dda2fbc097d00ddfa80d8 100644 (file)
@@ -3,7 +3,6 @@
  * repository_youtube class
  *
  * @author Dongsheng Cai <dongsheng@moodle.com>
- * @version $Id$
  * @license http://www.gnu.org/copyleft/gpl.html GNU Public License
  */
 
@@ -52,7 +51,7 @@ class repository_youtube extends repository {
                 'date'=>'',
                 'source'=>$source
             );
-        } 
+        }
         return $list;
     }