Commit 4ca6cfbf authored by Petr Skoda's avatar Petr Skoda
Browse files

MDL-20700 coding style cleanup - cvs keywords removed, closign php tag...

MDL-20700 coding style cleanup - cvs keywords removed, closign php tag removed, trailing whitespace cleanup
parent 5117d598
<?php //$Id$
<?php
class block_activity_modules extends block_list {
function init() {
......@@ -67,4 +67,4 @@ class block_activity_modules extends block_list {
}
}
?>
<?php //$Id$
<?php
// This file keeps track of upgrades to
// This file keeps track of upgrades to
// the activity_modules block
//
// Sometimes, changes between versions involve
......@@ -26,8 +26,8 @@ function xmldb_block_activity_modules_upgrade($oldversion) {
$dbman = $DB->get_manager();
$result = true;
/// And upgrade begins here. For each one, you'll need one
/// block of code similar to the next one. Please, delete
/// And upgrade begins here. For each one, you'll need one
/// block of code similar to the next one. Please, delete
/// this comment lines once this file start handling proper
/// upgrade code.
......@@ -38,4 +38,4 @@ function xmldb_block_activity_modules_upgrade($oldversion) {
return $result;
}
?>
<?php //$Id$
<?php
class block_admin extends block_list {
function init() {
......@@ -217,4 +217,4 @@ class block_admin extends block_list {
}
}
?>
<?php //$Id$
<?php
// This file keeps track of upgrades to
// This file keeps track of upgrades to
// the admin block
//
// Sometimes, changes between versions involve
......@@ -26,8 +26,8 @@ function xmldb_block_admin_upgrade($oldversion) {
$dbman = $DB->get_manager();
$result = true;
/// And upgrade begins here. For each one, you'll need one
/// block of code similar to the next one. Please, delete
/// And upgrade begins here. For each one, you'll need one
/// block of code similar to the next one. Please, delete
/// this comment lines once this file start handling proper
/// upgrade code.
......@@ -38,4 +38,4 @@ function xmldb_block_admin_upgrade($oldversion) {
return $result;
}
?>
<?php // $Id$
<?php
// seems to work...
// maybe I should add some pretty icons?
......@@ -77,4 +77,4 @@ class block_admin_bookmarks extends block_base {
}
}
?>
<?php // $Id$
<?php
require('../../config.php');
......@@ -45,4 +45,3 @@ if ($section = optional_param('section', '', PARAM_SAFEDIR) and confirm_sesskey(
}
?>
\ No newline at end of file
<?php // $Id$
<?php
require('../../config.php');
......@@ -46,4 +46,4 @@ if ($section = optional_param('section', '', PARAM_SAFEDIR) and confirm_sesskey(
die;
}
?>
......@@ -7,7 +7,7 @@ admin_tree = {
openalt: null,
init: function(numdivs, expandnodes, openimg, closedimg, openalt, closedalt) {
// Store the information we were passed in.
// Store the information we were passed in.
admin_tree.openimg = openimg;
admin_tree.closedimg = closedimg;
admin_tree.openalt = openalt;
......
<?php // $Id$
<?php
class block_admin_tree extends block_base {
......@@ -71,7 +71,7 @@ class block_admin_tree extends block_base {
if (admin_critical_warnings_present()) {
$class .= ' criticalnotification';
}
}
}
if ($content->is_hidden()) {
$class .= ' hidden';
}
......
<?PHP //$Id$
<?php
define('BLOGDEFAULTTIMEWITHIN', 90);
define('BLOGDEFAULTNUMBEROFTAGS', 20);
......@@ -67,9 +67,9 @@ class block_blog_tags extends block_base {
$this->content->text = '';
$this->content->footer = '';
/// Get a list of tags
/// Get a list of tags
$timewithin = time() - $this->config->timewithin * 24 * 60 * 60; /// convert to seconds
$blogheaders = blog_get_headers();
// admins should be able to read all tags
......@@ -149,7 +149,7 @@ class block_blog_tags extends block_base {
} else if (!empty($blogheaders['filters']['course'])) {
$blogurl->param('courseid', $blogheaders['filters']['course']);
}
break;
}
......@@ -184,4 +184,4 @@ function blog_tags_sort($a, $b) {
}
}
?>
<?php
// This file is part of Moodle - http://moodle.org/
//
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
......@@ -11,7 +11,7 @@
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
......
<?PHP //$Id$
<?php
class block_calendar_month extends block_base {
function init() {
......@@ -16,18 +16,18 @@ class block_calendar_month extends block_base {
$cal_y = optional_param( 'cal_y', 0, PARAM_INT );
require_once($CFG->dirroot.'/calendar/lib.php');
if ($this->content !== NULL) {
return $this->content;
}
// Reset the session variables
calendar_session_vars($this->page->course);
$this->content = new stdClass;
$this->content->text = '';
$this->content->footer = '';
// [pj] To me it looks like this if would never be needed, but Penny added it
// [pj] To me it looks like this if would never be needed, but Penny added it
// when committing the /my/ stuff. Reminder to discuss and learn what it's about.
// It definitely needs SOME comment here!
$courseshown = $this->page->course->id;
......@@ -73,9 +73,9 @@ class block_calendar_month extends block_base {
$this->content->text .= calendar_get_mini($courses, $group, $user, $cal_m, $cal_y);
$this->content->text .= '<h3 class="eventskey">'.get_string('eventskey', 'calendar').'</h3>';
$this->content->text .= '<div class="filters">'.calendar_filter_controls('course', '', $this->page->course).'</div>';
}
// MDL-9059, unset this so that it doesn't stay in session
if (!empty($courseset)) {
unset($SESSION->cal_courses_shown[$this->page->course->id]);
......@@ -85,4 +85,4 @@ class block_calendar_month extends block_base {
}
}
?>
<?php //$Id$
<?php
// This file keeps track of upgrades to
// This file keeps track of upgrades to
// the calendar_month block
//
// Sometimes, changes between versions involve
......@@ -26,8 +26,8 @@ function xmldb_block_calendar_month_upgrade($oldversion) {
$dbman = $DB->get_manager();
$result = true;
/// And upgrade begins here. For each one, you'll need one
/// block of code similar to the next one. Please, delete
/// And upgrade begins here. For each one, you'll need one
/// block of code similar to the next one. Please, delete
/// this comment lines once this file start handling proper
/// upgrade code.
......@@ -38,4 +38,4 @@ function xmldb_block_calendar_month_upgrade($oldversion) {
return $result;
}
?>
<?PHP //$Id$
<?php
class block_calendar_upcoming extends block_base {
function init() {
......@@ -37,7 +37,7 @@ class block_calendar_upcoming extends block_base {
$this->content->footer .= '<br /><a href="'.$CFG->wwwroot.
'/calendar/event.php?action=new&amp;course='.$courseshown.'">'.
get_string('newevent', 'calendar').'</a>...';
}
}
if ($courseshown == SITEID) {
// Being displayed at site level. This will cause the filter to fall back to auto-detecting
// the list of courses it will be grabbing events from.
......@@ -59,12 +59,12 @@ class block_calendar_upcoming extends block_base {
// Correct formatting is [courseid] => 1 to be concise with moodlelib.php functions.
calendar_set_filters($courses, $group, $user, $filtercourse, $groupeventsfrom, false);
$events = calendar_get_upcoming($courses, $group, $user,
get_user_preferences('calendar_lookahead', CALENDAR_UPCOMING_DAYS),
$events = calendar_get_upcoming($courses, $group, $user,
get_user_preferences('calendar_lookahead', CALENDAR_UPCOMING_DAYS),
get_user_preferences('calendar_maxevents', CALENDAR_UPCOMING_MAXEVENTS));
if (!empty($this->instance)) {
$this->content->text = calendar_get_sideblock_upcoming($events,
if (!empty($this->instance)) {
$this->content->text = calendar_get_sideblock_upcoming($events,
'view.php?view=day&amp;course='.$courseshown.'&amp;');
}
......@@ -77,4 +77,4 @@ class block_calendar_upcoming extends block_base {
}
}
?>
<?php //$Id$
<?php
// This file keeps track of upgrades to
// This file keeps track of upgrades to
// the calendar_upcoming block
//
// Sometimes, changes between versions involve
......@@ -26,8 +26,8 @@ function xmldb_block_calendar_upcoming_upgrade($oldversion) {
$dbman = $DB->get_manager();
$result = true;
/// And upgrade begins here. For each one, you'll need one
/// block of code similar to the next one. Please, delete
/// And upgrade begins here. For each one, you'll need one
/// block of code similar to the next one. Please, delete
/// this comment lines once this file start handling proper
/// upgrade code.
......@@ -38,4 +38,4 @@ function xmldb_block_calendar_upcoming_upgrade($oldversion) {
return $result;
}
?>
<?PHP //$Id$
<?php
include_once($CFG->dirroot . '/course/lib.php');
......@@ -7,7 +7,7 @@ class block_course_list extends block_list {
$this->title = get_string('courses');
$this->version = 2007101509;
}
function has_config() {
return true;
}
......@@ -26,7 +26,7 @@ class block_course_list extends block_list {
$icon = "<img src=\"" . $OUTPUT->old_icon_url('i/course') . "\"".
" class=\"icon\" alt=\"".get_string("coursecategory")."\" />";
$adminseesall = true;
if (isset($CFG->block_course_list_adminview)) {
if ( $CFG->block_course_list_adminview == 'own'){
......@@ -34,8 +34,8 @@ class block_course_list extends block_list {
}
}
if (empty($CFG->disablemycourses) and
!empty($USER->id) and
if (empty($CFG->disablemycourses) and
!empty($USER->id) and
!(has_capability('moodle/course:update', get_context_instance(CONTEXT_SYSTEM)) and $adminseesall) and
!isguestuser()) { // Just print My Courses
if ($courses = get_my_courses($USER->id, 'visible DESC, fullname ASC')) {
......@@ -83,7 +83,7 @@ class block_course_list extends block_list {
$this->content->items[]="<a $linkcss title=\""
. format_string($course->shortname)."\" ".
"href=\"$CFG->wwwroot/course/view.php?id=$course->id\">"
"href=\"$CFG->wwwroot/course/view.php?id=$course->id\">"
. format_string($course->fullname) . "</a>";
$this->content->icons[]=$icon;
}
......@@ -93,7 +93,7 @@ class block_course_list extends block_list {
}
$this->get_remote_courses();
} else {
$this->content->icons[] = '';
$this->content->items[] = get_string('nocoursesyet');
if (has_capability('moodle/course:create', get_context_instance(CONTEXT_COURSECAT, $category->id))) {
......@@ -128,7 +128,7 @@ class block_course_list extends block_list {
$this->content->icons[] = '';
foreach ($courses as $course) {
$this->content->items[]="<a title=\"" . format_string($course->shortname) . "\" ".
"href=\"{$CFG->wwwroot}/auth/mnet/jump.php?hostid={$course->hostid}&amp;wantsurl=/course/view.php?id={$course->remoteid}\">"
"href=\"{$CFG->wwwroot}/auth/mnet/jump.php?hostid={$course->hostid}&amp;wantsurl=/course/view.php?id={$course->remoteid}\">"
. format_string($course->fullname) . "</a>";
$this->content->icons[]=$icon;
}
......@@ -137,7 +137,7 @@ class block_course_list extends block_list {
}
if ($hosts = get_my_remotehosts()) {
$this->content->items[] = get_string('remotemoodles','mnet');
$this->content->items[] = get_string('remotemoodles','mnet');
$this->content->icons[] = '';
foreach($USER->mnet_foreign_host_array as $somehost) {
$this->content->items[] = $somehost['count'].get_string('courseson','mnet').'<a title="'.$somehost['name'].'" href="'.$somehost['url'].'">'.$somehost['name'].'</a>';
......@@ -152,4 +152,4 @@ class block_course_list extends block_list {
}
?>
<?php //$Id$
<?php
// This file keeps track of upgrades to
// This file keeps track of upgrades to
// the course_list block
//
// Sometimes, changes between versions involve
......@@ -26,8 +26,8 @@ function xmldb_block_course_list_upgrade($oldversion) {
$dbman = $DB->get_manager();
$result = true;
/// And upgrade begins here. For each one, you'll need one
/// block of code similar to the next one. Please, delete
/// And upgrade begins here. For each one, you'll need one
/// block of code similar to the next one. Please, delete
/// this comment lines once this file start handling proper
/// upgrade code.
......@@ -38,4 +38,4 @@ function xmldb_block_course_list_upgrade($oldversion) {
return $result;
}
?>
<?php //$Id$
<?php
$options = array('all'=>get_string('allcourses', 'block_course_list'), 'own'=>get_string('owncourses', 'block_course_list'));
......@@ -10,4 +10,4 @@ $settings->add(new admin_setting_configcheckbox('block_course_list_hideallcourse
get_string('confighideallcourseslink', 'block_course_list'), 0));
?>
<?PHP //$Id$
<?php
class block_course_summary extends block_base {
function init() {
......@@ -50,4 +50,4 @@ class block_course_summary extends block_base {
}
?>
<?php //$Id$
<?php
// This file keeps track of upgrades to
// This file keeps track of upgrades to
// the course_summary block
//
// Sometimes, changes between versions involve
......@@ -26,8 +26,8 @@ function xmldb_block_course_summary_upgrade($oldversion) {
$dbman = $DB->get_manager();
$result = true;
/// And upgrade begins here. For each one, you'll need one
/// block of code similar to the next one. Please, delete
/// And upgrade begins here. For each one, you'll need one
/// block of code similar to the next one. Please, delete
/// this comment lines once this file start handling proper
/// upgrade code.
......@@ -38,4 +38,4 @@ function xmldb_block_course_summary_upgrade($oldversion) {
return $result;
}
?>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment