Skip to content

Commit

Permalink
MDL-20700 coding style cleanup - cvs keywords removed, closign php ta…
Browse files Browse the repository at this point in the history
…g removed, trailing whitespace cleanup
  • Loading branch information
skodak committed Nov 1, 2009
1 parent e752155 commit 1adbd2c
Show file tree
Hide file tree
Showing 153 changed files with 376 additions and 423 deletions.
4 changes: 2 additions & 2 deletions mod/choice/backuplib.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php //$Id$
<?php
//This php script contains all the stuff to backup/restore
//choice mods

Expand Down Expand Up @@ -246,4 +246,4 @@ function choice_answer_ids_by_instance ($instanceid) {
FROM {choice_answers} s
WHERE s.choiceid = ?", array($instanceid));
}
?>

2 changes: 1 addition & 1 deletion mod/choice/db/access.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,4 @@
)
);

?>

2 changes: 1 addition & 1 deletion mod/choice/db/install.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php //$Id$
<?php

// This file replaces:
// * STATEMENTS section in db/install.xml
Expand Down
6 changes: 3 additions & 3 deletions mod/choice/db/upgrade.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php //$Id$
<?php

// This file keeps track of upgrades to
// This file keeps track of upgrades to
// the choice module
//
// Sometimes, changes between versions involve
Expand Down Expand Up @@ -57,4 +57,4 @@ function xmldb_choice_upgrade($oldversion) {
return $result;
}

?>

2 changes: 1 addition & 1 deletion mod/choice/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,4 @@

echo $OUTPUT->footer();

?>

2 changes: 1 addition & 1 deletion mod/choice/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -791,7 +791,7 @@ function choice_get_post_actions() {
/**
* Implementation of the function for printing the form elements that control
* whether the course reset functionality affects the choice.
*
*
* @param object $mform form passed by reference
*/
function choice_reset_course_form_definition(&$mform) {
Expand Down
2 changes: 1 addition & 1 deletion mod/choice/mod_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,4 +136,4 @@ function validation($data, $files) {
}

}
?>

1 change: 0 additions & 1 deletion mod/choice/report.php
Original file line number Diff line number Diff line change
Expand Up @@ -237,4 +237,3 @@
}
echo $OUTPUT->footer();

?>
4 changes: 2 additions & 2 deletions mod/choice/restorelib.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php //$Id$
<?php
//This php script contains all the stuff to backup/restore
//choice mods

Expand Down Expand Up @@ -498,4 +498,4 @@ function choice_restore_logs($restore,$log) {
}
return $status;
}
?>

4 changes: 2 additions & 2 deletions mod/choice/version.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php // $Id$
<?php

////////////////////////////////////////////////////////////////////////////////
// Code fragment to define the module version etc.
Expand All @@ -9,4 +9,4 @@
$module->requires = 2009041700; // Requires this Moodle version
$module->cron = 0;

?>

2 changes: 1 addition & 1 deletion mod/choice/view.php
Original file line number Diff line number Diff line change
Expand Up @@ -166,4 +166,4 @@
/// Mark as viewed
$completion=new completion_info($course);
$completion->set_module_viewed($cm);
?>

2 changes: 1 addition & 1 deletion mod/data/backuplib.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php //Id:$
<?php

//This php script contains all the stuff to backup/restore data mod

Expand Down
1 change: 0 additions & 1 deletion mod/data/comment.php
Original file line number Diff line number Diff line change
Expand Up @@ -164,4 +164,3 @@
data_print_comments($data, $record, $page, $mform);
echo $OUTPUT->footer();

?>
3 changes: 1 addition & 2 deletions mod/data/comment_form.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php //$Id$
<?php

require_once $CFG->libdir.'/formslib.php';

Expand Down Expand Up @@ -33,4 +33,3 @@ function definition() {

}
}
?>
2 changes: 1 addition & 1 deletion mod/data/db/access.php
Original file line number Diff line number Diff line change
Expand Up @@ -208,4 +208,4 @@
),
);

?>

2 changes: 1 addition & 1 deletion mod/data/db/install.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php //$Id$
<?php

// This file replaces:
// * STATEMENTS section in db/install.xml
Expand Down
4 changes: 2 additions & 2 deletions mod/data/db/upgrade.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php //$Id$
<?php

// This file keeps track of upgrades to
// the data module
Expand Down Expand Up @@ -183,4 +183,4 @@ function xmldb_data_upgrade($oldversion) {
return $result;
}

?>

1 change: 0 additions & 1 deletion mod/data/edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -369,4 +369,3 @@
}

echo $OUTPUT->footer();
?>
1 change: 0 additions & 1 deletion mod/data/export.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,4 +126,3 @@
}

die();
?>
4 changes: 2 additions & 2 deletions mod/data/export_form.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php // $Id$
<?php

if (!defined('MOODLE_INTERNAL')) {
die('Direct access to this script is forbidden!');
Expand Down Expand Up @@ -72,4 +72,4 @@ function definition() {

}

?>

1 change: 0 additions & 1 deletion mod/data/field.php
Original file line number Diff line number Diff line change
Expand Up @@ -361,4 +361,3 @@
/// Finish the page
echo $OUTPUT->footer();

?>
12 changes: 6 additions & 6 deletions mod/data/field/checkbox/field.class.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php // $Id$
<?php
///////////////////////////////////////////////////////////////////////////
// //
// NOTICE OF COPYRIGHT //
Expand Down Expand Up @@ -72,18 +72,18 @@ function display_search_field($value='') {
$options[$key] = $key; //Build following indicies from the sql.
}
}
return $OUTPUT->select(html_select::make($options, 'f_'.$this->field->id, $value));
return $OUTPUT->select(html_select::make($options, 'f_'.$this->field->id, $value));
}

function parse_search_field() {
return optional_param('f_'.$this->field->id, '', PARAM_NOTAGS);
}

function generate_sql($tablealias, $value) {
static $i=0;
$i++;
$name = "df_checkbox_$i";
return array(" ({$tablealias}.fieldid = {$this->field->id} AND {$tablealias}.content = :$name) ", array($name=>$value));
return array(" ({$tablealias}.fieldid = {$this->field->id} AND {$tablealias}.content = :$name) ", array($name=>$value));
}

function update_content($recordid, $value, $name='') {
Expand Down Expand Up @@ -133,4 +133,4 @@ function format_data_field_checkbox_content($content) {
return $str;
}
}
?>

14 changes: 7 additions & 7 deletions mod/data/field/date/field.class.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php // $Id$
<?php
///////////////////////////////////////////////////////////////////////////
// //
// NOTICE OF COPYRIGHT //
Expand Down Expand Up @@ -52,21 +52,21 @@ function display_add_field($recordid=0) {

return $str;
}

//Enable the following three functions once core API issues have been addressed.
function display_search_field($value=0) {
return false;
//return print_date_selector('f_'.$this->field->id.'_d', 'f_'.$this->field->id.'_m', 'f_'.$this->field->id.'_y', $value, true);
}

function generate_sql($tablealias, $value) {
return array(' 1=1 ', array());
//return " ({$tablealias}.fieldid = {$this->field->id} AND {$tablealias}.content = '$value') ";
//return " ({$tablealias}.fieldid = {$this->field->id} AND {$tablealias}.content = '$value') ";
}

function parse_search_field() {
return '';
/*
/*
$day = optional_param('f_'.$this->field->id.'_d', 0, PARAM_INT);
$month = optional_param('f_'.$this->field->id.'_m', 0, PARAM_INT);
$year = optional_param('f_'.$this->field->id.'_y', 0, PARAM_INT);
Expand Down Expand Up @@ -119,4 +119,4 @@ function get_sort_sql($fieldname) {

}

?>

4 changes: 2 additions & 2 deletions mod/data/field/file/field.class.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php // $Id$
<?php
///////////////////////////////////////////////////////////////////////////
// //
// NOTICE OF COPYRIGHT //
Expand Down Expand Up @@ -190,4 +190,4 @@ function file_ok($path) {

}

?>

4 changes: 2 additions & 2 deletions mod/data/field/latlong/field.class.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php // $Id$
<?php
///////////////////////////////////////////////////////////////////////////
// //
// NOTICE OF COPYRIGHT //
Expand Down Expand Up @@ -213,4 +213,4 @@ function export_text_value($record) {

}

?>

12 changes: 6 additions & 6 deletions mod/data/field/menu/field.class.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php // $Id$
<?php
///////////////////////////////////////////////////////////////////////////
// //
// NOTICE OF COPYRIGHT //
Expand Down Expand Up @@ -45,7 +45,7 @@ function display_add_field($recordid=0) {
$options[$option] = $option;
}
}


$select = html_select::make($options, 'field_'.$this->field->id, $content, get_string('menuchoose', 'data'));
$select->nothingvalue = '';
Expand All @@ -57,7 +57,7 @@ function display_add_field($recordid=0) {

return $str;
}

function display_search_field($content = '') {
global $CFG, $DB, $OUTPUT;

Expand Down Expand Up @@ -88,7 +88,7 @@ function display_search_field($content = '') {
return '';
}

return $OUTPUT->select(html_select::make($options, 'f_'.$this->field->id, $content, '&nbsp;'));
return $OUTPUT->select(html_select::make($options, 'f_'.$this->field->id, $content, '&nbsp;'));
}

function parse_search_field() {
Expand All @@ -99,9 +99,9 @@ function generate_sql($tablealias, $value) {
static $i=0;
$i++;
$name = "df_menu_$i";
return array(" ({$tablealias}.fieldid = {$this->field->id} AND {$tablealias}.content = :$name) ", array($name=>$value));
return array(" ({$tablealias}.fieldid = {$this->field->id} AND {$tablealias}.content = :$name) ", array($name=>$value));
}

}

?>

4 changes: 2 additions & 2 deletions mod/data/field/multimenu/field.class.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php // $Id$
<?php
///////////////////////////////////////////////////////////////////////////
// //
// NOTICE OF COPYRIGHT //
Expand Down Expand Up @@ -234,4 +234,4 @@ function display_browse_field($recordid, $template) {
return false;
}
}
?>

8 changes: 4 additions & 4 deletions mod/data/field/number/field.class.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php // $Id$
<?php
///////////////////////////////////////////////////////////////////////////
// //
// NOTICE OF COPYRIGHT //
Expand Down Expand Up @@ -76,13 +76,13 @@ function display_search_field($value = '') {
function parse_search_field() {
return optional_param('f_'.$this->field->id, '', PARAM_NOTAGS);
}

// need to cast?
function generate_sql($tablealias, $value) {
static $i=0;
$i++;
$name = "df_number_$i";
return array(" ({$tablealias}.fieldid = {$this->field->id} AND {$tablealias}.content = :$name) ", array($name=>$value));
return array(" ({$tablealias}.fieldid = {$this->field->id} AND {$tablealias}.content = :$name) ", array($name=>$value));
}

function get_sort_sql($fieldname) {
Expand All @@ -102,4 +102,4 @@ function get_sort_sql($fieldname) {

}

?>

4 changes: 2 additions & 2 deletions mod/data/field/picture/field.class.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php // $Id$
<?php
///////////////////////////////////////////////////////////////////////////
// //
// NOTICE OF COPYRIGHT //
Expand Down Expand Up @@ -249,4 +249,4 @@ function file_ok($path) {
}
}

?>

Loading

0 comments on commit 1adbd2c

Please sign in to comment.