]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-9742 - converting tabs to spaces
authorpoltawski <poltawski>
Mon, 23 Jul 2007 15:38:31 +0000 (15:38 +0000)
committerpoltawski <poltawski>
Mon, 23 Jul 2007 15:38:31 +0000 (15:38 +0000)
auth/shibboleth/auth.php
backup/backuplib.php
grade/edit/tree.php
grade/export/xml/grade_export_xml.php
mod/scorm/datamodels/scorm_12lib.php
mod/scorm/db/upgrade.php
mod/scorm/locallib.php
question/type/calculated/questiontype.php

index b67a5a174c7507302f10621d0f9d4946a3dc5d99..02cf0a4d9136f9b782d05e63170b81c27ae8421e 100644 (file)
@@ -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;
         }
 
index 4118cbf986cf7fd93f63f8aa5c274ecd2b4b4934..47f104d32f813327aca291c3515031116642c2a0 100644 (file)
 
                 //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));
             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));
index fdd47f3b5ea30d1ca88487afa97c9a9352653973..ae304ae1e411d826e46ff75e57eba47f5aa78d0b 100644 (file)
@@ -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);
index e1dfe8199d899d8c753e1b150ae87becc0ed39ad..68a79b0cb95e324415e58b2adba805402f4695ff 100755 (executable)
@@ -99,10 +99,10 @@ class grade_export_xml extends grade_export {
                 echo '<assignment>'.$idnumber.'</assignment>';
                 // this column should be customizable to use either student id, idnumber, uesrname or email.
                 echo '<student>'.$studentid.'</student>';
-                       echo '<score>'.$studentgrades[$index].'</score>';
-                       if ($feedback) {
+                echo '<score>'.$studentgrades[$index].'</score>';
+                if ($feedback) {
                     echo '<feedback>'.$this->comments[$studentid][$index].'</feedback>';
-                       }
+                }
                 echo '</result>';
 
                 // timestamp this if needed
@@ -118,4 +118,4 @@ class grade_export_xml extends grade_export {
     }
 }
 
-?>
\ No newline at end of file
+?>
index 54277b7db10c2d0a983d226a7f5cc1ca1c31429c..797041998fcc31f8d174fe92b265a23704c45826 100644 (file)
@@ -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";
index 2f66ea343eee9e50c5d8dd3268b6abbb20479b3d..4c643979e8b57052a3e691746c674a208681883e 100644 (file)
@@ -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
index ba82d9b9b284573cc96cf73118997b255397b9a6..e50faa663f9ec3adf20361cff9ef19e4070b11c3 100755 (executable)
@@ -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 = ''; 
index 1d9e44d97588c0d1d25a9dd184284e76db9f0a3f..a19254f1450eb7c6e77e977fafe69f2485689418 100644 (file)
@@ -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 "<pre>"; print_r($fromform);
+        $max100 = 100 ;
+        $regenerate = optional_param('forceregeneration', 0, PARAM_BOOL);
+        // echo "<pre>"; 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 "<pre>"; 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 "<p>Reuse an previously used record".$numberadded."id".$datasetdef->id."</p>";
+                        //  echo "<p>Reuse an previously used record".$numberadded."id".$datasetdef->id."</p>";
                     } 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