<br />
<?php
echo $OUTPUT->close_window_button();
-?>
-<?php // $Id$
+<?php
// Logs into Hive from HarvestRoad and stores session ID in Moodle session
// Martin Dougiamas, Moodle
//
return false; // No cookie found
}
-
-?>
-<?php // $Id$
+<?php
// login.php - action of the login form put up by expired.php.
require('../../config.php');
} else {
redirect($CFG->wwwroot.'/sso/hive/expired.php');
}
-
-?>
}
redirect($myurl);
-
-?>
}
echo $OUTPUT->footer();
-?>
echo $outstr;
echo $OUTPUT->footer();
-?>
*/
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();
return $returnstr;
}
*/
-
-?>
-<?php // $Id$
+<?php
require_once('../config.php');
require_once('lib.php');
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
}
}
$PAGE->requires->js_function_call('init_tag_autocomplete')->on_dom_ready();
}
echo $OUTPUT->footer();
-
-?>
$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.'"');
}
$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">');
}
}
-
-?>
-<?php // $Id$
+<?php
require_once('../config.php');
require_once('lib.php');
}
echo $OUTPUT->footer();
-?>
-<?php // $Id$
+<?php
/**
* Moodle tag library
$timemodified = time();
return $DB->execute("UPDATE {tag} SET flag = 0, timemodified = ? WHERE id IN ($tagids)", array($timemodified));
}
-
-?>
-<?php // $Id$
+<?php
require_once('lib.php');
echo $output;
}
}
-
-
-?>
-<?php // $Id$
+<?php
require_once('../config.php');
require_once($CFG->libdir.'/tablelib.php');
if (!data_submitted() or !confirm_sesskey()) {
break;
}
-
+
$str_tagschecked = implode(', ', tag_get_name($tagschecked));
tag_delete($tagschecked);
$notice = $str_tagschecked.' -- '.get_string('deleted','tag');
if (!data_submitted() or !confirm_sesskey()) {
break;
}
-
+
$tags_names_changed = array();
foreach ($tagschecked as $tag_id) {
if ($newnames[$tag_id] != '') {
echo '<br/>';
echo $OUTPUT->footer();
-
-?>
echo $OUTPUT->box_end();
echo $OUTPUT->footer();
-
-?>
echo $tag->name . "\t" . tag_display_name($tag) . "\n";
}
}
-
-?>
-<?php // $Id$
+<?php
require_once('../config.php');
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)) {
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));
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);
break;
case 'flaginappropriate':
-
+
tag_set_flag(tag_get_id($tag));
-
+
redirect($CFG->wwwroot.'/tag/index.php?tag='. rawurlencode($tag), get_string('responsiblewillbenotified', 'tag'));
break;
print_error('unknowaction');
break;
}
-
-?>
}
echo $OUTPUT->footer();
-
-?>
}
echo $OUTPUT->footer();
-
-?>