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 1adbd2c commit 86342d6
Show file tree
Hide file tree
Showing 115 changed files with 918 additions and 922 deletions.
2 changes: 1 addition & 1 deletion mod/glossary/db/access.php
Original file line number Diff line number Diff line change
Expand Up @@ -186,4 +186,4 @@

);

?>

2 changes: 1 addition & 1 deletion mod/glossary/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/glossary/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 glossary module
Expand Down Expand Up @@ -208,4 +208,4 @@ function xmldb_glossary_upgrade($oldversion) {
return $result;
}

?>

12 changes: 5 additions & 7 deletions mod/glossary/formats/README.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
$Id$

GLOSSARY FORMAT PLUGINS
-----------------------

Starting with Moodle 1.4, the glossary module supports a plugin
architecture to create your own formats. This plugin system allows
architecture to create your own formats. This plugin system allows
you to "invent" your own presentations for your glossary data. :-)

To facilitate the creation process a TEMPLATE format has been created.
To facilitate the creation process a TEMPLATE format has been created.
You should use it as the base for your own modifications (this requires
some basic PHP skills). The template includes all the available data.

Expand All @@ -17,16 +15,16 @@ Please, follow these STEPS:
For further reference in this document, we call it "THENAME".
2.-Duplicate the TEMPLATE directory (under mod/glossary/formats/TEMPLATE).
3.-Rename it to THENAME
4.-Go into the THENAME directory and rename the TEMPLATE_format.php file
4.-Go into the THENAME directory and rename the TEMPLATE_format.php file
to THENAME_format.php
5.-Edit the THENAME_format.php file. Change every ocurrence of TEMPLATE to
THENAME.
6.-Login into Moodle. Go to any glossary in your site.
7.-Edit (configure) your glossary. In the Format popup you'll see a new
entry. It will be showed as "displayformatTHENAME". Select it and view
your glossary.
8.-Edit the THENAME_format.php. Make your format modifications and reload your
web page to see them in your glossary. This file has been commented to make
8.-Edit the THENAME_format.php. Make your format modifications and reload your
web page to see them in your glossary. This file has been commented to make
things easier to understand (further suggestions welcome!)
9.-If you want to translate your THENAME format name to some nice name to
be showed in the Format popup, simply, edit your lang/XX/glossary.php
Expand Down
18 changes: 9 additions & 9 deletions mod/glossary/formats/TEMPLATE/TEMPLATE_format.php
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<?php // $Id$
<?php

function glossary_show_entry_TEMPLATE($course, $cm, $glossary, $entry, $mode='', $hook='', $printicons=1, $ratings=NULL, $aliases=true) {
global $CFG, $USER, $DB, $OUTPUT;


$user = $DB->get_record('user', array('id'=>$entry->userid));
$strby = get_string('writtenby', 'glossary');

if ($entry) {

echo '<table class="glossarypost TEMPLATE">';
echo '<tr>';
echo '<td class="entryheader">';
Expand All @@ -32,7 +32,7 @@ function glossary_show_entry_TEMPLATE($course, $cm, $glossary, $entry, $mode='',
//Comments: Configuration not supported
echo get_string('lastedited').': '. userdate($entry->timemodified) . '<br /></span>';

//Use this function to show the approval button. It'll be shown if necessary
//Use this function to show the approval button. It'll be shown if necessary
//Comments: You can configure this parameters:
//----Define where to show the approval button
$approvalalign = 'right'; //Values: left, center and right (default right)
Expand All @@ -50,7 +50,7 @@ function glossary_show_entry_TEMPLATE($course, $cm, $glossary, $entry, $mode='',

//Use this function to show the attachment. It'll be showed if necessary
//Comments: You can configure this parameters:
//----Define how to show the attachment
//----Define how to show the attachment
$attachmentformat = 'html'; //Values: html (link) and NULL (inline image if possible) (default NULL)
//----Define where to show the attachment
$attachmentalign = 'right'; //Values: left, center and right (default right)
Expand All @@ -74,7 +74,7 @@ function glossary_show_entry_TEMPLATE($course, $cm, $glossary, $entry, $mode='',
//Line separator not normally needed now.
//echo "<br />\n";

//Use this function to show the definition
//Use this function to show the definition
//Comments: Configuration not supported
glossary_print_entry_definition($entry, $glossary, $cm);

Expand All @@ -93,11 +93,11 @@ function glossary_show_entry_TEMPLATE($course, $cm, $glossary, $entry, $mode='',
// use it only if you are really sure!
//$printicons = false;
$return = glossary_print_entry_lower_section($course, $cm, $glossary, $entry, $mode, $hook, $printicons, $ratings, $aliases);

echo '</td>';
echo '</tr>';
echo "</table>\n";
} else {
} else {
echo '<div style="text-align:center">';
print_string('noentry', 'glossary');
echo '</div>';
Expand All @@ -119,4 +119,4 @@ function glossary_print_entry_TEMPLATE($course, $cm, $glossary, $entry, $mode=''

}

?>

8 changes: 4 additions & 4 deletions mod/glossary/formats/continuous/continuous_format.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php // $Id$
<?php

function glossary_show_entry_continuous($course, $cm, $glossary, $entry, $mode='', $hook='', $printicons=1, $ratings=NULL, $aliases=false) {

Expand All @@ -15,7 +15,7 @@ function glossary_show_entry_continuous($course, $cm, $glossary, $entry, $mode='
glossary_print_entry_definition($entry, $glossary, $cm);
$entry->alias = '';
echo '</td></tr>';

echo '<tr valign="top"><td class="entrylowersection">';
$return = glossary_print_entry_lower_section($course, $cm, $glossary, $entry, $mode, $hook, $printicons, $ratings, $aliases);
echo '</td>';
Expand All @@ -34,7 +34,7 @@ function glossary_print_entry_continuous($course, $cm, $glossary, $entry, $mode=

//Call to view function (without icons, ratings and aliases) and return its result
return glossary_show_entry_continuous($course, $cm, $glossary, $entry, $mode, $hook, false, false, false);

}

?>

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

function glossary_show_entry_dictionary($course, $cm, $glossary, $entry, $mode='', $hook='', $printicons=1, $ratings=NULL, $aliases=true) {

Expand Down Expand Up @@ -34,4 +34,4 @@ function glossary_print_entry_dictionary($course, $cm, $glossary, $entry, $mode=
return glossary_show_entry_dictionary($course, $cm, $glossary, $entry, $mode, $hook, false, false, false);
}

?>

20 changes: 10 additions & 10 deletions mod/glossary/formats/encyclopedia/encyclopedia_format.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php // $Id$
<?php

function glossary_show_entry_encyclopedia($course, $cm, $glossary, $entry, $mode='',$hook='',$printicons=1,$ratings=NULL, $aliases=true) {
global $CFG, $USER, $DB, $OUTPUT;
Expand All @@ -12,9 +12,9 @@ function glossary_show_entry_encyclopedia($course, $cm, $glossary, $entry, $mode
echo '<table class="glossarypost encyclopedia" cellspacing="0">';
echo '<tr valign="top">';
echo '<td class="left picture">';

echo $OUTPUT->user_picture(moodle_user_picture::make($user, $course->id));

echo '</td>';
echo '<th class="entryheader">';
echo '<div class="concept">';
Expand All @@ -28,11 +28,11 @@ function glossary_show_entry_encyclopedia($course, $cm, $glossary, $entry, $mode
echo '<span class="author">'.get_string('bynameondate', 'forum', $by).'</span>';

echo '</th>';

echo '<td class="entryapproval">';
glossary_print_entry_approval($cm, $entry, $mode);
echo '</td>';

echo '</tr>';

echo '<tr valign="top">';
Expand All @@ -57,16 +57,16 @@ function glossary_show_entry_encyclopedia($course, $cm, $glossary, $entry, $mode
$return = glossary_print_entry_lower_section($course, $cm, $glossary, $entry,$mode,$hook,$printicons,$ratings, $aliases);
echo ' ';
}

echo '</td></tr>';
echo "</table>\n";

} else {
echo '<div style="text-align:center">';
print_string('noentry', 'glossary');
echo '</div>';
}

return $return;
}

Expand All @@ -78,9 +78,9 @@ function glossary_print_entry_encyclopedia($course, $cm, $glossary, $entry, $mod
$entry->definition = '<span class="nolink">'.$entry->definition.'</span>';

//Call to view function (without icons, ratings and aliases) and return its result

return glossary_show_entry_encyclopedia($course, $cm, $glossary, $entry, $mode, $hook, false, false, false);

}

?>

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

function glossary_show_entry_entrylist($course, $cm, $glossary, $entry, $mode='', $hook='', $printicons=1, $ratings=NULL, $aliases=true) {
global $USER;
Expand Down Expand Up @@ -60,4 +60,4 @@ function glossary_print_entry_entrylist($course, $cm, $glossary, $entry, $mode='
return $return;
}

?>

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

function glossary_show_entry_faq($course, $cm, $glossary, $entry, $mode="", $hook="", $printicons=1, $ratings=NULL, $aliases=true) {
global $USER;
Expand Down Expand Up @@ -57,4 +57,4 @@ function glossary_print_entry_faq($course, $cm, $glossary, $entry, $mode='', $ho

}

?>

10 changes: 5 additions & 5 deletions mod/glossary/formats/fullwithauthor/fullwithauthor_format.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php // $Id$
<?php

function glossary_show_entry_fullwithauthor($course, $cm, $glossary, $entry, $mode="", $hook="", $printicons=1, $ratings=NULL, $aliases=true) {
global $CFG, $USER, $DB, $OUTPUT;
Expand All @@ -11,11 +11,11 @@ function glossary_show_entry_fullwithauthor($course, $cm, $glossary, $entry, $mo
if ($entry) {
echo '<table class="glossarypost fullwithauthor" cellspacing="0">';
echo '<tr valign="top">';

echo '<td class="picture">';
echo $OUTPUT->user_picture(moodle_user_picture::make($user, $course->id));
echo '</td>';

echo '<th class="entryheader">';

echo '<div class="concept">';
Expand Down Expand Up @@ -47,7 +47,7 @@ function glossary_show_entry_fullwithauthor($course, $cm, $glossary, $entry, $mo
echo '<tr valign="top">';
echo '<td class="left">&nbsp;</td>';
echo '<td colspan="2" class="entrylowersection">';

$return = glossary_print_entry_lower_section($course, $cm, $glossary, $entry, $mode, $hook, $printicons, $ratings, $aliases);
echo ' ';
echo '</td></tr>';
Expand All @@ -72,4 +72,4 @@ function glossary_print_entry_fullwithauthor($course, $cm, $glossary, $entry, $m

}

?>

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php // $Id$
<?php

function glossary_show_entry_fullwithoutauthor($course, $cm, $glossary, $entry, $mode="", $hook="", $printicons=1, $ratings=NULL, $aliases=true) {
global $CFG, $USER;
Expand Down Expand Up @@ -34,7 +34,7 @@ function glossary_show_entry_fullwithoutauthor($course, $cm, $glossary, $entry,
echo '</td></tr>';
echo '<tr valign="top"><td colspan="2" class="entrylowersection">';
$return = glossary_print_entry_lower_section($course, $cm, $glossary, $entry, $mode, $hook, $printicons, $ratings, $aliases);

echo ' ';
echo '</td></tr>';
echo "</table>\n";
Expand All @@ -58,4 +58,4 @@ function glossary_print_entry_fullwithoutauthor($course, $cm, $glossary, $entry,

}

?>

4 changes: 2 additions & 2 deletions mod/glossary/simpletest/test_glossary_portfolio_callers.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php // $Id$
<?php
require_once("$CFG->libdir/simpletest/portfolio_testclass.php");
require_once("$CFG->dirroot/mod/glossary/lib.php");
require_once("$CFG->dirroot/$CFG->admin/generator.php");
Expand Down Expand Up @@ -58,4 +58,4 @@ public function test_caller_with_plugins() {
parent::test_caller_with_plugins();
}
}
?>

1 change: 1 addition & 0 deletions mod/glossary/sql.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
/**
* SQL.PHP
* This file is include from view.php and print.php
* @version $Id$
* @copyright 2003
**/

Expand Down
24 changes: 12 additions & 12 deletions mod/glossary/tabs.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?php // $Id$
<?php
if (!isset($sortorder)) {
$sortorder = '';
}
}
if (!isset($sortkey)) {
$sortkey = '';
}

//make sure variables are properly cleaned
$sortkey = clean_param($sortkey, PARAM_ALPHA);// Sorted view: CREATION | UPDATE | FIRSTNAME | LASTNAME...
$sortorder = clean_param($sortorder, PARAM_ALPHA); // it defines the order of the sorting (ASC or DESC)
Expand All @@ -21,19 +21,19 @@
}


$browserow[] = new tabobject(GLOSSARY_STANDARD_VIEW,
$browserow[] = new tabobject(GLOSSARY_STANDARD_VIEW,
$CFG->wwwroot.'/mod/glossary/view.php?id='.$id.'&amp;mode=letter',
get_string('standardview', 'glossary'));

$browserow[] = new tabobject(GLOSSARY_CATEGORY_VIEW,
$CFG->wwwroot.'/mod/glossary/view.php?id='.$id.'&amp;mode=cat',
$browserow[] = new tabobject(GLOSSARY_CATEGORY_VIEW,
$CFG->wwwroot.'/mod/glossary/view.php?id='.$id.'&amp;mode=cat',
get_string('categoryview', 'glossary'));

$browserow[] = new tabobject(GLOSSARY_DATE_VIEW,
$browserow[] = new tabobject(GLOSSARY_DATE_VIEW,
$CFG->wwwroot.'/mod/glossary/view.php?id='.$id.'&amp;mode=date',
get_string('dateview', 'glossary'));

$browserow[] = new tabobject(GLOSSARY_AUTHOR_VIEW,
$browserow[] = new tabobject(GLOSSARY_AUTHOR_VIEW,
$CFG->wwwroot.'/mod/glossary/view.php?id='.$id.'&amp;mode=author',
get_string('authorview', 'glossary'));

Expand Down Expand Up @@ -62,12 +62,12 @@
<div class="entrybox">

<?php

if (!isset($category)) {
$category = "";
}


switch ($tab) {
case GLOSSARY_CATEGORY_VIEW:
glossary_print_categories_menu($cm, $glossary, $hook, $category);
Expand Down Expand Up @@ -103,8 +103,8 @@
glossary_print_alphabet_menu($cm, $glossary, "letter", $hook, $sortkey, $sortorder);
if ($mode == 'search' and $hook) {
echo "<h3>$strsearch: $hook</h3>";
}
}
break;
}
}
echo '<hr />';
?>
Loading

0 comments on commit 86342d6

Please sign in to comment.