diff --git a/auth/shibboleth/auth.php b/auth/shibboleth/auth.php index b67a5a174c7..02cf0a4d913 100644 --- a/auth/shibboleth/auth.php +++ b/auth/shibboleth/auth.php @@ -87,11 +87,11 @@ class auth_plugin_shibboleth extends auth_plugin_base { $search_attribs = array(); foreach ($attrmap as $key=>$value) { - // Check if attribute is present - if (!isset($_SERVER[$value])){ - $result[$key] = ''; - continue; - } + // Check if attribute is present + if (!isset($_SERVER[$value])){ + $result[$key] = ''; + continue; + } // Make usename lowercase if ($key == 'username'){ @@ -185,7 +185,7 @@ class auth_plugin_shibboleth extends auth_plugin_base { * @param object $config Configuration object */ function process_config($config) { - global $CFG; + global $CFG; // set to defaults if undefined if (!isset($config->auth_instructions) or empty($config->user_attribute)) { @@ -208,8 +208,8 @@ class auth_plugin_shibboleth extends auth_plugin_base { set_config('changepasswordurl', $config->changepasswordurl, 'auth/shibboleth'); // Check values and return false if something is wrong - // Patch Anyware Technologies (14/05/07) - if (($config->convert_data != '')&&(!file_exists($config->convert_data) || !is_readable($config->convert_data))){ + // Patch Anyware Technologies (14/05/07) + if (($config->convert_data != '')&&(!file_exists($config->convert_data) || !is_readable($config->convert_data))){ return false; } diff --git a/backup/backuplib.php b/backup/backuplib.php index 4118cbf986c..47f104d32f8 100644 --- a/backup/backuplib.php +++ b/backup/backuplib.php @@ -1488,7 +1488,7 @@ //Begin grade_item fwrite ($bf,start_tag("GRADE_ITEM",4,true)); - //Output individual fields + //Output individual fields fwrite ($bf,full_tag("ID",5,false,$grade_item->id)); fwrite ($bf,full_tag("ITEMNAME",5,false,$grade_item->itemname)); @@ -1542,7 +1542,7 @@ foreach ($grade_outcomes as $grade_outcome) { //Begin grade_item fwrite ($bf,start_tag("GRADE_OUTCOME",4,true)); - //Output individual fields + //Output individual fields fwrite ($bf,full_tag("ID",5,false,$grade_outcome->id)); fwrite ($bf,full_tag("SHORTNAME",5,false,$grade_outcome->shortname)); diff --git a/grade/edit/tree.php b/grade/edit/tree.php index fdd47f3b5ea..ae304ae1e41 100644 --- a/grade/edit/tree.php +++ b/grade/edit/tree.php @@ -36,7 +36,7 @@ $eid = optional_param('eid', 0, PARAM_ALPHANUM); /// Make sure they can even access this course if (!$course = get_record('course', 'id', $courseid)) { - print_error('nocourseid'); + print_error('nocourseid'); } require_login($course); diff --git a/grade/export/xml/grade_export_xml.php b/grade/export/xml/grade_export_xml.php index e1dfe8199d8..68a79b0cb95 100755 --- a/grade/export/xml/grade_export_xml.php +++ b/grade/export/xml/grade_export_xml.php @@ -99,10 +99,10 @@ class grade_export_xml extends grade_export { echo ''.$idnumber.''; // this column should be customizable to use either student id, idnumber, uesrname or email. echo ''.$studentid.''; - echo ''.$studentgrades[$index].''; - if ($feedback) { + echo ''.$studentgrades[$index].''; + if ($feedback) { echo ''.$this->comments[$studentid][$index].''; - } + } echo ''; // timestamp this if needed @@ -118,4 +118,4 @@ class grade_export_xml extends grade_export { } } -?> \ No newline at end of file +?> diff --git a/mod/scorm/datamodels/scorm_12lib.php b/mod/scorm/datamodels/scorm_12lib.php index 54277b7db10..797041998fc 100644 --- a/mod/scorm/datamodels/scorm_12lib.php +++ b/mod/scorm/datamodels/scorm_12lib.php @@ -375,7 +375,7 @@ function scorm_get_toc($user,$scorm,$liststyle,$currentorg='',$scoid='',$mode='n var beg=nn?"document.ids.":w3c?"document.getElementById(":"document.all."; var mid=w3c?").style":".style"; - which = which.substring(0,(which.length)); + which = which.substring(0,(which.length)); if (eval(beg+list+mid+".display") != "none") { document.getElementById(which).src = "'.$scormpixdir.'/plus.gif"; diff --git a/mod/scorm/db/upgrade.php b/mod/scorm/db/upgrade.php index 2f66ea343ee..4c643979e8b 100644 --- a/mod/scorm/db/upgrade.php +++ b/mod/scorm/db/upgrade.php @@ -204,7 +204,7 @@ function xmldb_scorm_upgrade($oldversion=0) { $result = $result && create_table($table); } - //Adding new field to table scorm + //Adding new field to table scorm if ($result && $oldversion < 2007011800) { /// Define field format to be added to data_comments diff --git a/mod/scorm/locallib.php b/mod/scorm/locallib.php index ba82d9b9b28..e50faa663f9 100755 --- a/mod/scorm/locallib.php +++ b/mod/scorm/locallib.php @@ -211,7 +211,7 @@ function scorm_get_sco($id,$what=SCO_ALL) { $sco = ($what == SCO_DATA) ? new stdClass() : $sco; if (($what != SCO_ONLY) && ($scodatas = get_records('scorm_scoes_data','scoid',$id))) { foreach ($scodatas as $scodata) { - $sco->{$scodata->name} = $scodata->value; + $sco->{$scodata->name} = $scodata->value; } } else if (($what != SCO_ONLY) && (!($scodatas = get_records('scorm_scoes_data','scoid',$id)))) { $sco->parameters = ''; diff --git a/question/type/calculated/questiontype.php b/question/type/calculated/questiontype.php index 1d9e44d9758..a19254f1450 100644 --- a/question/type/calculated/questiontype.php +++ b/question/type/calculated/questiontype.php @@ -577,9 +577,9 @@ class question_calculated_qtype extends question_dataset_dependent_questiontype function save_dataset_items($question, $fromform){ // max datasets = 100 items - $max100 = 100 ; - $regenerate = optional_param('forceregeneration', 0, PARAM_BOOL); - // echo "
"; print_r($fromform);
+        $max100 = 100 ;
+        $regenerate = optional_param('forceregeneration', 0, PARAM_BOOL);
+        // echo "
"; print_r($fromform);
         if (empty($question->options)) {
             $this->get_question_options($question);
         }
@@ -642,10 +642,10 @@ class question_calculated_qtype extends question_dataset_dependent_questiontype
         // adding supplementary items
         $numbertoadd =0;
         if (isset($fromform->addbutton) && $fromform->selectadd > 1 && $maxnumber < $max100 ) {
-	    $numbertoadd =$fromform->selectadd-1 ;
-	    if ( $max100 - $maxnumber < $numbertoadd ) {
-	        $numbertoadd = $max100 - $maxnumber ;
-	    }
+            $numbertoadd =$fromform->selectadd-1 ;
+            if ( $max100 - $maxnumber < $numbertoadd ) {
+                $numbertoadd = $max100 - $maxnumber ;
+            }
             //add the other items.
             // Generate a new dataset item (or reuse an old one)
             foreach ($datasetdefs as $defid => $datasetdef) {
@@ -656,9 +656,9 @@ class question_calculated_qtype extends question_dataset_dependent_questiontype
                             WHERE definition = $datasetdef->id ORDER BY itemnumber");
                 }
                 // echo "
"; print_r($datasetdefs[$defid]->items);
-    	        for ($numberadded =$maxnumber+1 ; $numberadded <= $maxnumber+$numbertoadd ; $numberadded++){
+                for ($numberadded =$maxnumber+1 ; $numberadded <= $maxnumber+$numbertoadd ; $numberadded++){
                     if (isset($datasetdefs[$defid]->items[$numberadded]) && ! $regenerate ){
-                    //  echo "

Reuse an previously used record".$numberadded."id".$datasetdef->id."

"; + // echo "

Reuse an previously used record".$numberadded."id".$datasetdef->id."

"; } else { $datasetitem = new stdClass; $datasetitem->definition = $datasetdef->id ; @@ -672,11 +672,11 @@ class question_calculated_qtype extends question_dataset_dependent_questiontype if (!insert_record('question_dataset_items', $datasetitem)) { error("Error: Unable to insert new dataset item"); } - } - }//for number added - }// datasetsdefs end - $maxnumber += $numbertoadd ; - foreach ($datasetdefs as $key => $newdef) { + } + }//for number added + }// datasetsdefs end + $maxnumber += $numbertoadd ; + foreach ($datasetdefs as $key => $newdef) { if (isset($newdef->id) && $newdef->itemcount <= $maxnumber) { $newdef->itemcount = $maxnumber; // Save the new value for options