Skip to content

Commit

Permalink
MDL-9742 Converting tabs to spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
poltawski committed May 8, 2007
1 parent a044c05 commit e73457e
Show file tree
Hide file tree
Showing 16 changed files with 97 additions and 98 deletions.
24 changes: 12 additions & 12 deletions course/import/groups/import_form.php
Expand Up @@ -4,35 +4,35 @@

class course_import_groups_form extends moodleform {

function definition() {
function definition() {

global $CFG, $USER;
$mform =& $this->_form;
$maxuploadsize = $this->_customdata['maxuploadsize'];
$strimportgroups = get_string("importgroups");
global $CFG, $USER;
$mform =& $this->_form;
$maxuploadsize = $this->_customdata['maxuploadsize'];
$strimportgroups = get_string("importgroups");

$this->set_upload_manager(new upload_manager('userfile', true, false, '', false, $maxuploadsize, true, true));
//$this->set_max_file_size('', $maxuploadsize);

$mform->addElement('header', 'general', '');//fill in the data depending on page params
//later using set_data
//later using set_data
// buttons

$mform->addElement('hidden', 'sesskey');
$mform->setType('sesskey', PARAM_ALPHA);
$mform->setConstants(array('sesskey'=> $USER->sesskey));
$mform->setType('sesskey', PARAM_ALPHA);
$mform->setConstants(array('sesskey'=> $USER->sesskey));

$mform->addElement('file', 'userfile', '');
$mform->addElement('file', 'userfile', '');
$mform->setHelpButton('userfile', array('attachment', get_string('attachment', 'forum'), 'forum'));


$this->add_action_buttons(false, $strimportgroups);

}
}

function validation($data) {
function validation($data) {
return true;
}
}

}
?>
20 changes: 10 additions & 10 deletions mod/chat/mod_form.php
Expand Up @@ -3,22 +3,22 @@

class mod_chat_mod_form extends moodleform_mod {

function definition() {
function definition() {

global $CFG;
$mform =& $this->_form;
global $CFG;
$mform =& $this->_form;

//-------------------------------------------------------------------------------
$mform->addElement('header', 'general', get_string('general', 'form'));

$mform->addElement('text', 'name', get_string('chatname', 'chat'), array('size'=>'64'));
$mform->setType('name', PARAM_TEXT);
$mform->addRule('name', null, 'required', null, 'client');
$mform->setType('name', PARAM_TEXT);
$mform->addRule('name', null, 'required', null, 'client');

$mform->addElement('htmleditor', 'intro', get_string('chatintro', 'chat'));
$mform->setType('intro', PARAM_RAW);
$mform->addElement('htmleditor', 'intro', get_string('chatintro', 'chat'));
$mform->setType('intro', PARAM_RAW);
$mform->setHelpButton('intro', array('writing', 'questions', 'richtext'), false, 'editorhelpbutton');
$mform->addRule('intro', get_string('required'), 'required', null, 'client');
$mform->addRule('intro', get_string('required'), 'required', null, 'client');

$mform->addElement('date_time_selector', 'chattime', get_string('chattime', 'chat'));

Expand Down Expand Up @@ -50,9 +50,9 @@ function definition() {
$this->standard_coursemodule_elements();

$this->add_action_buttons();
}
}



}
?>
?>
18 changes: 9 additions & 9 deletions mod/exercise/mod_form.php
Expand Up @@ -3,19 +3,19 @@

class mod_exercise_mod_form extends moodleform_mod {

function definition() {
function definition() {

global $CFG, $COURSE, $EXERCISE_TYPE, $EXERCISE_ASSESSMENT_COMPS;
$mform =& $this->_form;
global $CFG, $COURSE, $EXERCISE_TYPE, $EXERCISE_ASSESSMENT_COMPS;
$mform =& $this->_form;

//-------------------------------------------------------------------------------
$mform->addElement('header', 'general', get_string('general', 'form'));

$mform->addElement('text', 'name', get_string('title', 'exercise'), array('size'=>'64'));
$mform->setType('name', PARAM_TEXT);
$mform->addRule('name', null, 'required', null, 'client');
$mform->setType('name', PARAM_TEXT);
$mform->addRule('name', null, 'required', null, 'client');

$mform->addElement('static', 'description', get_string('description', 'exercise'), get_string('descriptionofexercise', 'exercise', $COURSE->students));
$mform->addElement('static', 'description', get_string('description', 'exercise'), get_string('descriptionofexercise', 'exercise', $COURSE->students));

$filesize = array();
$sizelist = array('10Kb', '50Kb', '100Kb', '500Kb', '1Mb', '2Mb', '5Mb', '10Mb', '20Mb', '50Mb');
Expand Down Expand Up @@ -100,11 +100,11 @@ function definition() {
//-------------------------------------------------------------------------------
$this->standard_coursemodule_elements();
//-------------------------------------------------------------------------------
// buttons
// buttons
$this->add_action_buttons();
}
}



}
?>
?>
2 changes: 1 addition & 1 deletion mod/forum/post.php
Expand Up @@ -635,7 +635,7 @@
if ($post->parent) {
$crumbs[] = array('name' => format_string($toppost->subject, true), 'link' => "discuss.php?d=$discussion->id", 'type' => 'activityinstance');
$crumbs[] = array('name' => get_string('editing', 'forum'), 'link' => '', 'type' => 'action');
} else {
} else {
$crumbs[] = array('name' => format_string($toppost->subject), 'link' => '', 'type' => 'action');
}

Expand Down
4 changes: 2 additions & 2 deletions mod/hotpot/db/update_to_v2.php
Expand Up @@ -10,7 +10,7 @@ function hotpot_update_to_v2_2() {
$index = "{$CFG->prefix}{$table}_{$field}_idx";
} else {
$index = "{$table}_{$field}_idx";
}
}
hotpot_db_delete_index("{$CFG->prefix}$table", $index);

// add new hotpot_questions.md5key field (and index)
Expand All @@ -34,7 +34,7 @@ function hotpot_update_to_v2_2() {
$index = "{$CFG->prefix}{$table}_{$field}_idx";
} else {
$index = "{$table}_{$field}_idx";
}
}
hotpot_db_delete_index("{$CFG->prefix}$table", $index);

// add new hotpot_strings.md5key field (and index)
Expand Down
6 changes: 3 additions & 3 deletions mod/hotpot/index.php
Expand Up @@ -341,9 +341,9 @@

// get best score
if (is_numeric($totals[$hotpot->id]->maxscore)) {
$weighting = $hotpot->grade / 100;
$precision = hotpot_get_precision($hotpot);
$bestscore = round($totals[$hotpot->id]->maxscore * $weighting, $precision)." / $hotpot->grade";
$weighting = $hotpot->grade / 100;
$precision = hotpot_get_precision($hotpot);
$bestscore = round($totals[$hotpot->id]->maxscore * $weighting, $precision)." / $hotpot->grade";
} else {
$bestscore = " ";
}
Expand Down
6 changes: 3 additions & 3 deletions mod/hotpot/show.php
Expand Up @@ -50,9 +50,9 @@ function copy_contents(id) {
print htmlspecialchars($hp->source);
break;
case 'showxmltree':
if (isset($hp->xml)) {
print_r($hp->xml);
}
if (isset($hp->xml)) {
print_r($hp->xml);
}
break;
case 'showhtmlsource':
print htmlspecialchars($hp->html);
Expand Down
6 changes: 3 additions & 3 deletions mod/hotpot/view.php
Expand Up @@ -283,7 +283,7 @@
for ($i=0; $i<$count; $i++) {
if ($pageid) {
$styles .= str_replace('TheBody', $pageid, $matches[0][$i])."\n";
}
}
$head = str_replace($matches[0][$i], '', $head);
}
}
Expand All @@ -295,7 +295,7 @@
for ($i=0; $i<$count; $i++) {
if ($pageid) {
$scripts .= str_replace('TheBody', $pageid, $matches[0][$i])."\n";
}
}
$head = str_replace($matches[0][$i], '', $head);
}
}
Expand All @@ -308,7 +308,7 @@
$body = $matches[5]; // contents of first <body onload="StartUp()">...</body> block
if ($pageid) {
$body_tags = str_replace(' id="TheBody"', '', $matches[1]);
}
}
// workaround to ensure javascript onload routine for quiz is always executed
// $body_tags will only be inserted into the <body ...> tag
// if it is included in the theme/$CFG->theme/header.html,
Expand Down
24 changes: 12 additions & 12 deletions mod/journal/mod_form.php
Expand Up @@ -3,21 +3,21 @@

class mod_journal_mod_form extends moodleform_mod {

function definition() {
function definition() {

global $COURSE;
$mform =& $this->_form;
global $COURSE;
$mform =& $this->_form;

//-------------------------------------------------------------------------------
$mform->addElement('header', 'general', get_string('general', 'form'));

$mform->addElement('text', 'name', get_string('journalname', 'journal'), array('size'=>'64'));
$mform->setType('name', PARAM_TEXT);
$mform->addRule('name', null, 'required', null, 'client');
$mform->setType('name', PARAM_TEXT);
$mform->addRule('name', null, 'required', null, 'client');

$mform->addElement('htmleditor', 'intro', get_string('journalquestion', 'journal'));
$mform->setType('intro', PARAM_RAW);
$mform->addRule('intro', get_string('required'), 'required', null, 'client');
$mform->addElement('htmleditor', 'intro', get_string('journalquestion', 'journal'));
$mform->setType('intro', PARAM_RAW);
$mform->addRule('intro', get_string('required'), 'required', null, 'client');
$mform->setHelpButton('intro', array('writing', 'questions', 'richtext'), false, 'editorhelpbutton');

$mform->addElement('format', 'format', get_string('format'));
Expand All @@ -43,14 +43,14 @@ function definition() {
}

//-------------------------------------------------------------------------------
$this->standard_coursemodule_elements();
$this->standard_coursemodule_elements();
//-------------------------------------------------------------------------------
// buttons
// buttons
$this->add_action_buttons();

}
}



}
?>
?>
18 changes: 9 additions & 9 deletions mod/label/mod_form.php
Expand Up @@ -3,24 +3,24 @@

class mod_label_mod_form extends moodleform_mod {

function definition() {
function definition() {

$mform =& $this->_form;
$mform =& $this->_form;

$mform->addElement('htmleditor', 'content', get_string('labeltext', 'label'), array('size'=>'64'));
$mform->setType('content', PARAM_RAW);
$mform->addRule('content', get_string('required'), 'required', null, 'client');
$mform->addElement('htmleditor', 'content', get_string('labeltext', 'label'), array('size'=>'64'));
$mform->setType('content', PARAM_RAW);
$mform->addRule('content', get_string('required'), 'required', null, 'client');
$mform->setHelpButton('content', array('questions', 'richtext'), false, 'editorhelpbutton');

$this->standard_hidden_coursemodule_elements();
$this->standard_hidden_coursemodule_elements();

$mform->addElement('modvisible', 'visible', get_string('visible'));

//-------------------------------------------------------------------------------
// buttons
// buttons
$this->add_action_buttons();

}
}

}
?>
?>

0 comments on commit e73457e

Please sign in to comment.