mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
Removed tabs
This commit is contained in:
parent
bee7ee3815
commit
dabfd0ed85
67 changed files with 8204 additions and 8204 deletions
|
@ -22,9 +22,9 @@
|
|||
}
|
||||
|
||||
require_login($course->id, false, $cm);
|
||||
|
||||
$context = get_context_instance(CONTEXT_MODULE, $cm->id);
|
||||
has_capability('mod/glossary:approve', $context->id, true);
|
||||
|
||||
$context = get_context_instance(CONTEXT_MODULE, $cm->id);
|
||||
has_capability('mod/glossary:approve', $context->id, true);
|
||||
|
||||
$newentry->id = $eid;
|
||||
$newentry->approved = 1;
|
||||
|
|
|
@ -38,9 +38,9 @@
|
|||
|
||||
require_login($course->id, false, $cm);
|
||||
|
||||
$context = get_context_instance(CONTEXT_MODULE, $cm->id);
|
||||
$context = get_context_instance(CONTEXT_MODULE, $cm->id);
|
||||
|
||||
if (isguest()) {
|
||||
if (isguest()) {
|
||||
error('Guests are not allowed to post comments', $_SERVER['HTTP_REFERER']);
|
||||
}
|
||||
add_to_log($course->id, 'glossary', 'view', "view.php?id=$cm->id", "$glossary->id",$cm->id);
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
error("Entry is incorrect");
|
||||
}
|
||||
|
||||
$context = get_context_instance(CONTEXT_MODULE, $cm->id);
|
||||
$context = get_context_instance(CONTEXT_MODULE, $cm->id);
|
||||
|
||||
require_login($course->id, false, $cm);
|
||||
|
||||
|
|
|
@ -29,8 +29,8 @@
|
|||
}
|
||||
|
||||
require_login($course->id, false, $cm);
|
||||
$context = get_context_instance(CONTEXT_MODULE, $cm->id);
|
||||
|
||||
$context = get_context_instance(CONTEXT_MODULE, $cm->id);
|
||||
|
||||
if (isguest()) {
|
||||
error("Guests are not allowed to edit or delete entries", $_SERVER["HTTP_REFERER"]);
|
||||
}
|
||||
|
|
|
@ -166,7 +166,7 @@ if ( $confirm ) {
|
|||
error("Could not update this glossary entry because this concept already exist.");
|
||||
}
|
||||
} else {
|
||||
|
||||
|
||||
$newentry->userid = $USER->id;
|
||||
$newentry->timecreated = $timenow;
|
||||
$newentry->sourceglossaryid = 0;
|
||||
|
@ -332,7 +332,7 @@ $tab = GLOSSARY_ADDENTRY_VIEW;
|
|||
include("tabs.html");
|
||||
|
||||
if (!$e) {
|
||||
has_capability('glossary_write', $context->id, true);
|
||||
has_capability('glossary_write', $context->id, true);
|
||||
}
|
||||
|
||||
include("edit.html");
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
require_login($course->id, false);
|
||||
|
||||
$context = get_context_instance(CONTEXT_MODULE, $cm->id);
|
||||
has_capability('mod/glossary:managecategories', $context->id, true);
|
||||
has_capability('mod/glossary:managecategories', $context->id, true);
|
||||
|
||||
$strglossaries = get_string("modulenameplural", "glossary");
|
||||
$strglossary = get_string("modulename", "glossary");
|
||||
|
|
|
@ -22,10 +22,10 @@
|
|||
error("Course module is incorrect");
|
||||
}
|
||||
|
||||
require_login($course->id, false);
|
||||
|
||||
$context = get_context_instance(CONTEXT_MODULE, $cm->id);
|
||||
has_capability('mod/glossary:export', $context->id, true);
|
||||
require_login($course->id, false);
|
||||
|
||||
$context = get_context_instance(CONTEXT_MODULE, $cm->id);
|
||||
has_capability('mod/glossary:export', $context->id, true);
|
||||
|
||||
$strglossaries = get_string("modulenameplural", "glossary");
|
||||
$strglossary = get_string("modulename", "glossary");
|
||||
|
|
|
@ -29,8 +29,8 @@
|
|||
$lcase = 'lcase';
|
||||
}
|
||||
|
||||
$context = get_context_instance(CONTEXT_MODULE, $cm->id);
|
||||
has_capability('mod/glossary:export', $context->id, true);
|
||||
$context = get_context_instance(CONTEXT_MODULE, $cm->id);
|
||||
has_capability('mod/glossary:export', $context->id, true);
|
||||
|
||||
if (! $course = get_record('course', 'id', $cm->course)) {
|
||||
error('Course is misconfigured');
|
||||
|
|
|
@ -21,10 +21,10 @@
|
|||
}
|
||||
|
||||
require_login($course->id, false);
|
||||
|
||||
$context = get_context_instance(CONTEXT_MODULE, $cm->id);
|
||||
has_capability('mod/glossary:export', $context->id, true);
|
||||
|
||||
|
||||
$context = get_context_instance(CONTEXT_MODULE, $cm->id);
|
||||
has_capability('mod/glossary:export', $context->id, true);
|
||||
|
||||
$filename = clean_filename(strip_tags(format_string($glossary->name,true)).'.xml');
|
||||
$content = glossary_generate_export_file($glossary,$l,$cat);
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
if (! $cm = get_coursemodule_from_id('glossary', $id)) {
|
||||
error("Course Module ID was incorrect");
|
||||
}
|
||||
|
||||
|
||||
if (! $course = get_record("course", "id", $cm->course)) {
|
||||
error("Course is misconfigured");
|
||||
}
|
||||
|
@ -27,10 +27,10 @@
|
|||
error("Course module is incorrect");
|
||||
}
|
||||
|
||||
require_login($course->id, false);
|
||||
|
||||
$context = get_context_instance(CONTEXT_MODULE, $cm->id);
|
||||
has_capability('mod/glossary:import', $context->id, true);
|
||||
require_login($course->id, false);
|
||||
|
||||
$context = get_context_instance(CONTEXT_MODULE, $cm->id);
|
||||
has_capability('mod/glossary:import', $context->id, true);
|
||||
|
||||
if ($dest != 'new' and $dest != 'current') {
|
||||
$dest = 'current';
|
||||
|
|
|
@ -738,8 +738,8 @@ function glossary_print_entry_aliases($course, $cm, $glossary, $entry,$mode='',
|
|||
|
||||
function glossary_print_entry_icons($course, $cm, $glossary, $entry, $mode='',$hook='', $type = 'print') {
|
||||
global $USER, $CFG;
|
||||
|
||||
$context = get_context_instance(CONTEXT_MODULE, $cm->id);
|
||||
|
||||
$context = get_context_instance(CONTEXT_MODULE, $cm->id);
|
||||
|
||||
$output = false; //To decide if we must really return text in "return". Activate when needed only!
|
||||
$importedentry = ($entry->sourceglossaryid == $glossary->id);
|
||||
|
@ -754,15 +754,15 @@ function glossary_print_entry_icons($course, $cm, $glossary, $entry, $mode='',$h
|
|||
$return .= glossary_print_entry_commentslink($course, $cm, $glossary, $entry,$mode,$hook,'html');
|
||||
|
||||
if (has_capability('mod/glossary:comment', $context->id)) {
|
||||
$output = true;
|
||||
$output = true;
|
||||
$return .= ' <a title="' . get_string('addcomment','glossary') . '" href="comment.php?id='.$cm->id.'&eid='.$entry->id.'"><img src="comment.gif" height="11" width="11" border="0" alt="'.get_string('addcomment','glossary').'" /></a>';
|
||||
}
|
||||
|
||||
|
||||
if (has_capability('mod/glossary:write', $context->id) or (!empty($USER->id) and $glossary->studentcanpost and $entry->userid == $USER->id)) {
|
||||
// only teachers can export entries so check it out
|
||||
if (has_capability('mod/glossary:export', $context->id) and !$ismainglossary and !$importedentry) {
|
||||
$mainglossary = get_record('glossary','mainglossary',1,'course',$course->id);
|
||||
if (has_capability('mod/glossary:export', $context->id) and !$ismainglossary and !$importedentry) {
|
||||
$mainglossary = get_record('glossary','mainglossary',1,'course',$course->id);
|
||||
if ( $mainglossary ) { // if there is a main glossary defined, allow to export the current entry
|
||||
$output = true;
|
||||
$return .= ' <a title="'.get_string('exporttomainglossary','glossary') . '" href="exportentry.php?id='.$cm->id.'&entry='.$entry->id.'&mode='.$mode.'&hook='.$hook.'"><img src="export.gif" height="11" width="11" border="0" alt="'.get_string('exporttomainglossary','glossary').'" /></a>';
|
||||
|
@ -1303,9 +1303,9 @@ function glossary_print_author_menu($cm, $glossary,$mode, $hook, $sortkey = '',
|
|||
|
||||
function glossary_print_categories_menu($cm, $glossary, $hook, $category) {
|
||||
|
||||
global $CFG;
|
||||
|
||||
$context = get_context_instance(CONTEXT_MODULE, $cm->id);
|
||||
global $CFG;
|
||||
|
||||
$context = get_context_instance(CONTEXT_MODULE, $cm->id);
|
||||
|
||||
echo '<table border="0" width="100%">';
|
||||
echo '<tr>';
|
||||
|
@ -1563,8 +1563,8 @@ function glossary_print_entry_ratings($course, $entry, $ratings = NULL) {
|
|||
$glossary = get_record('glossary', 'id', $entry->glossaryid);
|
||||
$glossarymod = get_record('modules','name','glossary');
|
||||
$cm = get_record_sql("select * from {$CFG->prefix}course_modules where course = $course->id
|
||||
and module = $glossarymod->id and instance = $glossary->id");
|
||||
|
||||
and module = $glossarymod->id and instance = $glossary->id");
|
||||
|
||||
$context = get_context_instance(CONTEXT_MODULE, $cm->id);
|
||||
|
||||
$ratingsmenuused = false;
|
||||
|
|
|
@ -21,8 +21,8 @@
|
|||
|
||||
$module = get_record("modules","name","glossary");
|
||||
$cm = get_record("course_modules","module",$module->id,"instance",$entry->glossaryid);
|
||||
$context = get_context_instance(CONTEXT_MODULE, $cm->id);
|
||||
|
||||
$context = get_context_instance(CONTEXT_MODULE, $cm->id);
|
||||
|
||||
if (!has_capability('mod/glossary:manageentries', $context->id) and $USER->id != $entry->userid) {
|
||||
error("You can only look at results for your own entries");
|
||||
}
|
||||
|
|
|
@ -23,8 +23,8 @@
|
|||
}
|
||||
if (has_capability('mod/glossary:import', $context->id)) {
|
||||
$data[GLOSSARY_IMPORT_VIEW]->caption = get_string("importentries", "glossary");
|
||||
$data[GLOSSARY_IMPORT_VIEW]->link = "import.php?id=$cm->id";
|
||||
}
|
||||
$data[GLOSSARY_IMPORT_VIEW]->link = "import.php?id=$cm->id";
|
||||
}
|
||||
|
||||
if (has_capability('mod/glossary:export', $context->id)) {
|
||||
$data[GLOSSARY_EXPORT_VIEW]->caption = get_string("exportentries", "glossary");
|
||||
|
@ -39,8 +39,8 @@
|
|||
$data[GLOSSARY_CATEGORY_VIEW]->link = "view.php?id=$id&mode=cat";
|
||||
$data[GLOSSARY_AUTHOR_VIEW]->link = "view.php?id=$id&mode=author";
|
||||
|
||||
if (has_capability('mod/glossary:approve', $context->id)) {
|
||||
$data[GLOSSARY_APPROVAL_VIEW]->caption = get_string("waitingapproval", "glossary");
|
||||
if (has_capability('mod/glossary:approve', $context->id)) {
|
||||
$data[GLOSSARY_APPROVAL_VIEW]->caption = get_string("waitingapproval", "glossary");
|
||||
$data[GLOSSARY_APPROVAL_VIEW]->link = "";
|
||||
|
||||
$hiddenentries = get_records_select("glossary_entries","glossaryid = $glossary->id and approved = 0");
|
||||
|
|
|
@ -44,8 +44,8 @@
|
|||
error("Must specify glossary ID or course module ID");
|
||||
}
|
||||
|
||||
$context = get_context_instance(CONTEXT_MODULE, $cm->id);
|
||||
has_capability('mod/glossary:view', $context->id, true); // kill the page if user can't even read
|
||||
$context = get_context_instance(CONTEXT_MODULE, $cm->id);
|
||||
has_capability('mod/glossary:view', $context->id, true); // kill the page if user can't even read
|
||||
|
||||
if ($CFG->forcelogin) {
|
||||
require_login();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue