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 795b694 commit 6f5e085
Show file tree
Hide file tree
Showing 51 changed files with 270 additions and 270 deletions.
14 changes: 7 additions & 7 deletions README.txt
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
QUICK INSTALL
=============

For the impatient, here is a basic outline of the
installation process, which normally takes me only
For the impatient, here is a basic outline of the
installation process, which normally takes me only
a few minutes:

1) Move the Moodle files into your web directory.
1) Move the Moodle files into your web directory.

2) Create a single database for Moodle to store all
it's tables in (or choose an existing database).

3) Visit your Moodle site with a browser, you should
3) Visit your Moodle site with a browser, you should
be taken to the install.php script, which will lead
you through creating a config.php file and then
you through creating a config.php file and then
setting up Moodle, creating an admin account etc.

4) Set up a cron task to call the file admin/cron.php
Expand All @@ -21,9 +21,9 @@ a few minutes:

For more information, see the INSTALL DOCUMENTATION:

http://docs.moodle.org/en/Installing_Moodle
http://docs.moodle.org/en/Installing_Moodle

A local copy can also be found in
A local copy can also be found in

lang/en_utf8/help/install.html (or your language)

Expand Down
36 changes: 18 additions & 18 deletions TRADEMARK.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,29 @@ Moodle Trademark License

The name Moodle™ is a registered trademark of the Moodle Trust.

A key part of the business model that allows us to produce and
distribute Moodle as completely Free open source software is that
we restrict the commercial use of the Moodle trademark to those
A key part of the business model that allows us to produce and
distribute Moodle as completely Free open source software is that
we restrict the commercial use of the Moodle trademark to those
who have contracted to support Moodle development (Moodle Partners).

If you are intending to use the name (and/or logo) to advertise
generic Moodle™ services (eg Moodle Hosting, Moodle Support,
Moodle Certification, Moodle Training, Moodle Consulting,
Moodle Customisation, Moodle Courseware Development, Moodle
Theme design, Moodle Integrations, Moodle Installations, etc)
or as the name of a software package, then you must seek
direct permission in writing from the Moodle Trust via the
moodle.com helpdesk, in accordance with normal trademark
If you are intending to use the name (and/or logo) to advertise
generic Moodle™ services (eg Moodle Hosting, Moodle Support,
Moodle Certification, Moodle Training, Moodle Consulting,
Moodle Customisation, Moodle Courseware Development, Moodle
Theme design, Moodle Integrations, Moodle Installations, etc)
or as the name of a software package, then you must seek
direct permission in writing from the Moodle Trust via the
moodle.com helpdesk, in accordance with normal trademark
restrictions.

There are no restrictions on how you use the name in other
contexts (for example, if you use Moodle just to provide
courses then you can use the name freely to refer to it.)
There are no restrictions on how you use the name in other
contexts (for example, if you use Moodle just to provide
courses then you can use the name freely to refer to it.)

If you aren't sure of a particular case, please ask us via
http://moodle.com/helpdesk: we'll be happy to either provide
you with official permission in writing or help you fix
your wording.
If you aren't sure of a particular case, please ask us via
http://moodle.com/helpdesk: we'll be happy to either provide
you with official permission in writing or help you fix
your wording.

Martin Dougiamas
Executive Director
Expand Down
2 changes: 1 addition & 1 deletion blog/external_blogs.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
if ($externalbloguserid == $USER->id) {
$DB->delete_records('blog_external', array('id' => $delete));
$message = get_string('externalblogdeleted', 'blog');
}
}
}

$blogs = $DB->get_records('blog_external', array('userid' => $USER->id));
Expand Down
2 changes: 1 addition & 1 deletion blog/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ function blog_get_headers() {
$blogurl = new moodle_url($CFG->wwwroot . '/blog/index.php');

// If the title is not yet set, it's likely that the context isn't set either, so skip this part
$pagetitle = $PAGE->title;
$pagetitle = $PAGE->title;
if (!empty($pagetitle)) {
$contexturl = blog_get_context_url();

Expand Down
4 changes: 2 additions & 2 deletions comment/admin.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
YAHOO.util.Event.onDOMReady(init);
YAHOO.util.Event.onDOMReady(init);
function init() {
var select_all = document.getElementById('comment_select_all');
select_all.onclick = function() {
Expand Down Expand Up @@ -37,7 +37,7 @@ function delete_comments() {
}
var data = {
'commentids': list,
'sesskey': moodle_cfg.sesskey
'sesskey': moodle_cfg.sesskey
}
var trans = YAHOO.util.Connect.asyncRequest('POST',
url+'?action=delete', cb, build_querystring(data));
Expand Down
10 changes: 5 additions & 5 deletions comment/comment.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ function post_comment(cid) {
backgroundColor: { to: '#FFE390' }
};
var anim = new YAHOO.util.ColorAnim(ids[i], attributes);
anim.animate();
anim.animate();
}
}
}
Expand All @@ -102,7 +102,7 @@ function post_comment(cid) {
backgroundColor: { from: '#FFE390', to:'#FFFFFF' }
};
var anim = new YAHOO.util.ColorAnim('dlg-content-'+cid, attributes);
anim.animate();
anim.animate();
}
}
function delete_comment(client_id, comment_id) {
Expand All @@ -128,11 +128,11 @@ function delete_comment(client_id, comment_id) {
height:{to:0}
};
var anim = new YAHOO.util.Anim(htmlid, attributes, 1, YAHOO.util.Easing.easeOut);
anim.onComplete.subscribe(this.remove_dom, [], this);
anim.animate();
anim.onComplete.subscribe(this.remove_dom, [], this);
anim.animate();
},
remove_dom: function() {
this.el.parentNode.removeChild(this.el);
this.el.parentNode.removeChild(this.el);
}
}
var trans = YAHOO.util.Connect.asyncRequest('POST',
Expand Down
12 changes: 6 additions & 6 deletions comment/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class comment_manager {

/**
* Return comments by pages
* @param int $page
* @param int $page
* @return mixed
*/
function get_comments($page) {
Expand All @@ -22,7 +22,7 @@ function get_comments($page) {
} else {
$start = $page*$this->perpage;
}
$sql = "SELECT c.id, c.contextid, c.itemid, c.commentarea, c.userid, c.content, u.username, u.firstname, u.lastname, c.timecreated
$sql = "SELECT c.id, c.contextid, c.itemid, c.commentarea, c.userid, c.content, u.username, u.firstname, u.lastname, c.timecreated
FROM {comments} c, {user} u
WHERE u.id=c.userid ORDER BY c.timecreated ASC";

Expand Down Expand Up @@ -75,7 +75,7 @@ private function _setup_plugin($comment) {

/**
* Print comments
* @param int $page
* @param int $page
*/
function print_comments($page=0) {
global $CFG, $OUTPUT, $DB;
Expand All @@ -100,14 +100,14 @@ function print_comments($page=0) {
$action .= "<a target='_blank' href='{$url}'>".get_string('commentincontext').'</a>';
}
$table->data[] = array($checkbox, $c->username, $c->content, $action);
}
}
echo $OUTPUT->table($table);
echo $OUTPUT->paging_bar(moodle_paging_bar::make($count, $page, $this->perpage, $CFG->wwwroot.'/comment/index.php'));
}

/**
* delete a comment
* @param int $commentid
* @param int $commentid
*/
public function delete_comment($commentid) {
global $DB;
Expand All @@ -118,7 +118,7 @@ public function delete_comment($commentid) {
}
/**
* delete comments
* @param int $commentid
* @param int $commentid
*/
public function delete_comments($list) {
global $DB;
Expand Down
6 changes: 3 additions & 3 deletions error/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
if ($form = data_submitted()) { // form submitted, do not check referer (original page unknown)!

/// Only deal with real users
if (!isloggedin()) {
if (!isloggedin()) {
redirect($CFG->wwwroot);
}

Expand All @@ -32,7 +32,7 @@
$eventdata->fullmessagehtml = '';
$eventdata->smallmessage = '';
events_trigger('message_send', $eventdata);

redirect($CFG->wwwroot .'/course/', 'Message sent, thanks', 3);
exit;
}
Expand All @@ -41,7 +41,7 @@
$redirecturl = empty($_SERVER['REDIRECT_URL']) ? '' : $_SERVER['REDIRECT_URL'];
$httpreferer = empty($_SERVER['HTTP_REFERER']) ? '' : $_SERVER['HTTP_REFERER'];
$requesturi = empty($_SERVER['REQUEST_URI']) ? '' : $_SERVER['REQUEST_URI'];

header("HTTP/1.0 404 Not Found");
header("Status: 404 Not Found");

Expand Down
6 changes: 3 additions & 3 deletions group/clientlib.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* Client-side JavaScript for group management interface.
* @author vy-shane AT moodle.com
* @author vy-shane AT moodle.com
* @license http://www.gnu.org/copyleft/gpl.html GNU Public License
* @package groups
*/
Expand Down Expand Up @@ -144,7 +144,7 @@ UpdatableMembersCombo.prototype.refreshMembers = function () {
if(singleSelection) {
createLoaderImg("membersloader", "memberslabel", this.wwwRoot);
}

// Update the label.
var spanEl = document.getElementById("thegroup");
if (singleSelection) {
Expand All @@ -160,7 +160,7 @@ UpdatableMembersCombo.prototype.refreshMembers = function () {
selectEl.removeChild(selectEl.firstChild);
}
}

document.getElementById("showaddmembersform").disabled = !singleSelection;
document.getElementById("showeditgroupsettingsform").disabled = !singleSelection;
document.getElementById("deletegroup").disabled = selectionCount == 0;
Expand Down
2 changes: 1 addition & 1 deletion group/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@
$selectedname = $groupname;
}
}

echo "<option value=\"{$group->id}\"$select title=\"$groupname\">$groupname</option>\n";
}
} else {
Expand Down
14 changes: 7 additions & 7 deletions group/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ function groups_remove_member($grouporid, $userorid) {
function groups_create_group($data, $editform=false) {
global $CFG, $DB;
require_once("$CFG->libdir/gdlib.php");

//check that courseid exists
$course = $DB->get_record('course', array('id' => $data->courseid), '*', MUST_EXIST);

Expand Down Expand Up @@ -413,7 +413,7 @@ function groups_delete_groupings($courseid, $showfeedback=false) {

/**
* Obtains a list of the possible roles that group members might come from,
* on a course. Generally this includes all the roles who would have
* on a course. Generally this includes all the roles who would have
* course:view on that course, except the doanything roles.
* @param object $context Context of course
* @return Array of role ID integers, or false if error/none.
Expand Down Expand Up @@ -450,7 +450,7 @@ function groups_get_possible_roles($context) {
return $validroleids;
} else {
return false; // No need to continue, since no roles have this capability set
}
}
}


Expand Down Expand Up @@ -579,7 +579,7 @@ function groups_unassign_grouping($groupingid, $groupid) {

/**
* Lists users in a group based on their role on the course.
* Returns false if there's an error or there are no users in the group.
* Returns false if there's an error or there are no users in the group.
* Otherwise returns an array of role ID => role data, where role data includes:
* (role) $id, $shortname, $name
* $users: array of objects for each user which include the specified fields
Expand All @@ -600,7 +600,7 @@ function groups_get_members_by_role($groupid, $courseid, $fields='u.*',
global $CFG, $DB;

// Retrieve information about all users and their roles on the course or
// parent ('related') contexts
// parent ('related') contexts
$context = get_context_instance(CONTEXT_COURSE, $courseid);

if ($extrawheretest) {
Expand All @@ -611,7 +611,7 @@ function groups_get_members_by_role($groupid, $courseid, $fields='u.*',
u.id AS userid, $fields
FROM {groups_members} gm
JOIN {user} u ON u.id = gm.userid
JOIN {role_assignments} ra ON ra.userid = u.id
JOIN {role_assignments} ra ON ra.userid = u.id
JOIN {role} r ON r.id = ra.roleid
WHERE gm.groupid=?
AND ra.contextid ".get_related_contexts_string($context).
Expand All @@ -630,7 +630,7 @@ function groups_get_members_by_role($groupid, $courseid, $fields='u.*',
*
* @param object $rs The record set (may be false)
* @param int $contextid ID of course context
* @return array As described in groups_get_members_by_role
* @return array As described in groups_get_members_by_role
*/
function groups_calculate_role_people($rs, $context) {
global $CFG, $DB;
Expand Down
2 changes: 1 addition & 1 deletion group/members.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
$potentialmembersselector = new group_non_members_selector('addselect',
array('groupid' => $groupid, 'courseid' => $course->id));
$potentialmembersselector->set_extra_fields(array());

if (optional_param('add', false, PARAM_BOOL) && confirm_sesskey()) {
$userstoadd = $potentialmembersselector->get_selected_users();
if (!empty($userstoadd)) {
Expand Down
6 changes: 3 additions & 3 deletions group/simpletest/ broken_testexternal.php
Original file line number Diff line number Diff line change
Expand Up @@ -237,19 +237,19 @@ function test_add_group_members2() {
}
function test_add_group_members3() {
//the user is not a participant
//the user is not a participant
$params = array(array("groupid" => $this->group->id, "userid" => $this->userid5));
$this->expectException(new moodle_exception('userisnotaparticipant'));
$result = group_external::add_groupmembers($params);
}
function test_get_groupmembers() {
$params = array($this->group->id, $this->group2->id);
$groups = group_external::get_groupmembers($params);
$this->assertEqual(sizeof($groups), 2);
$this->assertEqual(sizeof($groups[0]['members']), 2);
$this->assertEqual(sizeof($groups[1]['members']), 1);
$this->assertEqual(sizeof($groups[1]['members']), 1);
}
function test_delete_group_members() {
Expand Down
2 changes: 1 addition & 1 deletion install.php
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@
ini_set('include_path', $CFG->libdir.'/pear' . PATH_SEPARATOR . ini_get('include_path'));
//point zend include path to moodles lib/zend so that includes and requires will search there for files before anywhere else
ini_set('include_path', $CFG->libdir.'/zend' . PATH_SEPARATOR . ini_get('include_path'));

require('version.php');
$CFG->target_release = $release;

Expand Down
2 changes: 1 addition & 1 deletion install/README.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The file stringnames.txt contains a list of all the strings used during the install process.

A daily cron job will pick up the changes to this file and update all the language files
A daily cron job will pick up the changes to this file and update all the language files
(ie those in install/lang/*/install.php) automatically.


Expand Down
2 changes: 1 addition & 1 deletion iplookup/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ original Earth map from:
marker.gif
custom made in Inkscape

Petr Skoda (skodak), January 2008
Petr Skoda (skodak), January 2008
2 changes: 1 addition & 1 deletion lib/blocklib.php
Original file line number Diff line number Diff line change
Expand Up @@ -1273,7 +1273,7 @@ public function process_url_move() {
}
$this->reposition_block($block->instance->id, $newregion, $newweight);
}

$this->page->ensure_param_not_in_url('bui_moveid');
$this->page->ensure_param_not_in_url('bui_newregion');
$this->page->ensure_param_not_in_url('bui_newweight');
Expand Down
Loading

0 comments on commit 6f5e085

Please sign in to comment.