mirror of
https://github.com/moodle/moodle.git
synced 2025-06-02 22:25:04 +02:00
MDL-47657 mod_glossary: Fixed wrong error message on edit timeout.
This commit is contained in:
parent
050b930fa7
commit
d0d59df939
@ -40,7 +40,7 @@ if ($id) { // if entry is specified
|
||||
|
||||
$ineditperiod = ((time() - $entry->timecreated < $CFG->maxeditingtime) || $glossary->editalways);
|
||||
if (!has_capability('mod/glossary:manageentries', $context) and !($entry->userid == $USER->id and ($ineditperiod and has_capability('mod/glossary:write', $context)))) {
|
||||
if ($USER->id != $fromdb->userid) {
|
||||
if ($USER->id != $entry->userid) {
|
||||
print_error('errcannoteditothers', 'glossary', "view.php?id=$cm->id&mode=entry&hook=$id");
|
||||
} elseif (!$ineditperiod) {
|
||||
print_error('erredittimeexpired', 'glossary', "view.php?id=$cm->id&mode=entry&hook=$id");
|
||||
|
Loading…
x
Reference in New Issue
Block a user