mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 01:16:44 +02:00
Now maxeditingtime for entries work againt timecreated instead of timemodified.
Thanks skodak! Bug 1822 (http://moodle.org/bugs/bug.php?op=show&bugid=1822) Merged from MOODLE_14_STABLE
This commit is contained in:
parent
0083049b21
commit
516c7276e5
2 changed files with 2 additions and 2 deletions
|
@ -710,7 +710,7 @@ function glossary_print_entry_icons($course, $cm, $glossary, $entry,$mode="",$ho
|
|||
//Decide if an entry is editable:
|
||||
// -It isn't a imported entry (so nobody can edit a imported (from secondary to main) entry)) and
|
||||
// -The user is teacher or he is a student with time permissions (edit period or editalways defined).
|
||||
$ineditperiod = ((time() - $entry->timemodified < $CFG->maxeditingtime) || $glossary->editalways);
|
||||
$ineditperiod = ((time() - $entry->timecreated < $CFG->maxeditingtime) || $glossary->editalways);
|
||||
if ( !$importedentry and ($isteacher or ($entry->userid == $USER->id and $ineditperiod))) {
|
||||
$return .= " <a title=\"" . get_string("delete") . "\" href=\"deleteentry.php?id=$cm->id&mode=delete&entry=$entry->id&prevmode=$mode&hook=$hook\"><img src=\"";
|
||||
$return .= $icon;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue