mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 20:42:22 +02:00
MDL-20700 coding style cleanup - cvs keywords removed, closign php tag removed, trailing whitespace cleanup
This commit is contained in:
parent
5777f4e391
commit
6bfe7aac8b
@ -45,4 +45,3 @@
|
||||
<br />
|
||||
<?php
|
||||
echo $OUTPUT->close_window_button();
|
||||
?>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?php // $Id$
|
||||
<?php
|
||||
// Logs into Hive from HarvestRoad and stores session ID in Moodle session
|
||||
// Martin Dougiamas, Moodle
|
||||
//
|
||||
@ -75,5 +75,3 @@ function sso_user_login($username, $password) {
|
||||
|
||||
return false; // No cookie found
|
||||
}
|
||||
|
||||
?>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?php // $Id$
|
||||
<?php
|
||||
// login.php - action of the login form put up by expired.php.
|
||||
|
||||
require('../../config.php');
|
||||
@ -18,5 +18,3 @@
|
||||
} else {
|
||||
redirect($CFG->wwwroot.'/sso/hive/expired.php');
|
||||
}
|
||||
|
||||
?>
|
||||
|
@ -39,5 +39,3 @@ if ($courseid > 0) {
|
||||
}
|
||||
|
||||
redirect($myurl);
|
||||
|
||||
?>
|
||||
|
@ -188,4 +188,3 @@ EOT2;
|
||||
}
|
||||
|
||||
echo $OUTPUT->footer();
|
||||
?>
|
||||
|
@ -198,4 +198,3 @@ $outstr = '
|
||||
echo $outstr;
|
||||
|
||||
echo $OUTPUT->footer();
|
||||
?>
|
||||
|
@ -266,7 +266,7 @@ function coursetag_get_jscript($coursetagdivs = '') {
|
||||
*/
|
||||
function coursetag_get_jscript_links($coursetagslinks) {
|
||||
global $PAGE;
|
||||
|
||||
|
||||
if (!empty($coursetagslinks)) {
|
||||
foreach ($coursetagslinks as $a) {
|
||||
$PAGE->requires->js_function_call('add_tag_footer_link', array('coursetagslinks', $a['title'], $a['onclick'], $a['text']))->on_dom_ready();
|
||||
@ -656,5 +656,3 @@ function coursetag_get_official_keywords($courseid, $asarray=false) {
|
||||
return $returnstr;
|
||||
}
|
||||
*/
|
||||
|
||||
?>
|
||||
|
14
tag/edit.php
14
tag/edit.php
@ -1,4 +1,4 @@
|
||||
<?php // $Id$
|
||||
<?php
|
||||
|
||||
require_once('../config.php');
|
||||
require_once('lib.php');
|
||||
@ -99,21 +99,21 @@ if ($tagnew = $tagform->get_data()) {
|
||||
print_error('errorupdatingrecord', 'tag');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//log tag changes activity
|
||||
//if tag name exist from form, renaming is allow. record log action as rename
|
||||
//otherwise, record log action as update
|
||||
//otherwise, record log action as update
|
||||
if (isset($tagnew->name) && ($tag->name != $tagnew->name)){
|
||||
add_to_log($COURSE->id, 'tag', 'update', 'index.php?id='. $tag->id, $tag->name . '->'. $tagnew->name);
|
||||
|
||||
} elseif ($tag->description != $tagnew->description) {
|
||||
} elseif ($tag->description != $tagnew->description) {
|
||||
add_to_log($COURSE->id, 'tag', 'update', 'index.php?id='. $tag->id, $tag->name);
|
||||
}
|
||||
|
||||
|
||||
//updated related tags
|
||||
tag_set('tag', $tagnew->id, explode(',', trim($tagnew->relatedtags)));
|
||||
//print_object($tagnew); die();
|
||||
|
||||
|
||||
redirect($CFG->wwwroot.'/tag/index.php?tag='.rawurlencode($tag->name)); // must use $tag here, as the name isn't in the edit form
|
||||
}
|
||||
}
|
||||
@ -135,5 +135,3 @@ if (ajaxenabled()) {
|
||||
$PAGE->requires->js_function_call('init_tag_autocomplete')->on_dom_ready();
|
||||
}
|
||||
echo $OUTPUT->footer();
|
||||
|
||||
?>
|
||||
|
@ -16,7 +16,7 @@ class tag_edit_form extends moodleform {
|
||||
$systemcontext = get_context_instance(CONTEXT_SYSTEM);
|
||||
|
||||
if (has_capability('moodle/tag:manage', $systemcontext)) {
|
||||
$mform->addElement('text', 'rawname', get_string('name', 'tag'),
|
||||
$mform->addElement('text', 'rawname', get_string('name', 'tag'),
|
||||
'maxlength="'.TAG_MAX_LENGTH.'" size="'.TAG_MAX_LENGTH.'"');
|
||||
}
|
||||
|
||||
@ -25,7 +25,7 @@ class tag_edit_form extends moodleform {
|
||||
$mform->addElement('format', 'descriptionformat', get_string('format'));
|
||||
|
||||
if (has_capability('moodle/tag:manage', $systemcontext)) {
|
||||
$mform->addElement('checkbox', 'tagtype', get_string('officialtag', 'tag'));
|
||||
$mform->addElement('checkbox', 'tagtype', get_string('officialtag', 'tag'));
|
||||
}
|
||||
|
||||
$mform->addElement('html', '<br/><div id="relatedtags-autocomplete-container">');
|
||||
@ -39,5 +39,3 @@ class tag_edit_form extends moodleform {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?php // $Id$
|
||||
<?php
|
||||
|
||||
require_once('../config.php');
|
||||
require_once('lib.php');
|
||||
@ -153,4 +153,3 @@ if ($usercount > 0) {
|
||||
}
|
||||
|
||||
echo $OUTPUT->footer();
|
||||
?>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?php // $Id$
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Moodle tag library
|
||||
@ -1032,5 +1032,3 @@ function tag_unset_flag($tagids) {
|
||||
$timemodified = time();
|
||||
return $DB->execute("UPDATE {tag} SET flag = 0, timemodified = ? WHERE id IN ($tagids)", array($timemodified));
|
||||
}
|
||||
|
||||
?>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?php // $Id$
|
||||
<?php
|
||||
|
||||
require_once('lib.php');
|
||||
|
||||
@ -385,6 +385,3 @@ function tag_print_user_list($userlist, $return=false) {
|
||||
echo $output;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?php // $Id$
|
||||
<?php
|
||||
|
||||
require_once('../config.php');
|
||||
require_once($CFG->libdir.'/tablelib.php');
|
||||
@ -53,7 +53,7 @@ switch($action) {
|
||||
if (!data_submitted() or !confirm_sesskey()) {
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
$str_tagschecked = implode(', ', tag_get_name($tagschecked));
|
||||
tag_delete($tagschecked);
|
||||
$notice = $str_tagschecked.' -- '.get_string('deleted','tag');
|
||||
@ -96,7 +96,7 @@ switch($action) {
|
||||
if (!data_submitted() or !confirm_sesskey()) {
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
$tags_names_changed = array();
|
||||
foreach ($tagschecked as $tag_id) {
|
||||
if ($newnames[$tag_id] != '') {
|
||||
@ -276,5 +276,3 @@ if ($perpage == SHOW_ALL_PAGE_SIZE) {
|
||||
echo '<br/>';
|
||||
|
||||
echo $OUTPUT->footer();
|
||||
|
||||
?>
|
||||
|
@ -53,5 +53,3 @@ tag_print_cloud(150);
|
||||
echo $OUTPUT->box_end();
|
||||
|
||||
echo $OUTPUT->footer();
|
||||
|
||||
?>
|
||||
|
@ -16,5 +16,3 @@ if ($similar_tags = tag_autocomplete($query)) {
|
||||
echo $tag->name . "\t" . tag_display_name($tag) . "\n";
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
16
tag/user.php
16
tag/user.php
@ -1,4 +1,4 @@
|
||||
<?php // $Id$
|
||||
<?php
|
||||
|
||||
require_once('../config.php');
|
||||
require_once('lib.php');
|
||||
@ -6,7 +6,7 @@ require_once('lib.php');
|
||||
$action = optional_param('action', '', PARAM_ALPHA);
|
||||
$id = optional_param('id', 0, PARAM_INT);
|
||||
$tag = optional_param('tag', '', PARAM_TAG);
|
||||
|
||||
|
||||
require_login();
|
||||
|
||||
if (empty($CFG->usetags)) {
|
||||
@ -26,8 +26,8 @@ switch ($action) {
|
||||
case 'addinterest':
|
||||
if (empty($tag) && $id) { // for backward-compatibility (people saving bookmarks, mostly..)
|
||||
$tag = tag_get_name($id);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
tag_set_add('user', $USER->id, $tag);
|
||||
|
||||
redirect($CFG->wwwroot.'/tag/index.php?tag='. rawurlencode($tag));
|
||||
@ -36,7 +36,7 @@ switch ($action) {
|
||||
case 'removeinterest':
|
||||
if (empty($tag) && $id) { // for backward-compatibility (people saving bookmarks, mostly..)
|
||||
$tag = tag_get_name($id);
|
||||
}
|
||||
}
|
||||
|
||||
tag_set_delete('user', $USER->id, $tag);
|
||||
|
||||
@ -44,9 +44,9 @@ switch ($action) {
|
||||
break;
|
||||
|
||||
case 'flaginappropriate':
|
||||
|
||||
|
||||
tag_set_flag(tag_get_id($tag));
|
||||
|
||||
|
||||
redirect($CFG->wwwroot.'/tag/index.php?tag='. rawurlencode($tag), get_string('responsiblewillbenotified', 'tag'));
|
||||
break;
|
||||
|
||||
@ -54,5 +54,3 @@ switch ($action) {
|
||||
print_error('unknowaction');
|
||||
break;
|
||||
}
|
||||
|
||||
?>
|
||||
|
@ -38,5 +38,3 @@
|
||||
}
|
||||
|
||||
echo $OUTPUT->footer();
|
||||
|
||||
?>
|
||||
|
@ -35,5 +35,3 @@
|
||||
}
|
||||
|
||||
echo $OUTPUT->footer();
|
||||
|
||||
?>
|
||||
|
Loading…
x
Reference in New Issue
Block a user