MDL-9742 - converting tabs to spaces

This commit is contained in:
poltawski 2007-07-23 15:38:31 +00:00
parent 5aed30094d
commit c31f631baa
8 changed files with 32 additions and 32 deletions

View 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;
}

View File

@ -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));

View 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);

View File

@ -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 {
}
}
?>
?>

View 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";

View 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

View File

@ -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 = '';

View 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