mirror of
https://github.com/moodle/moodle.git
synced 2025-03-14 12:40:01 +01:00
MDL-56847 tags: exclude modules that are being deleted
we don't check any access for admins for performance reasons, course modules that are in the process of deletion should be filtered out on the early stage
This commit is contained in:
parent
0b8e0c374f
commit
5e5ce443fd
@ -3607,6 +3607,7 @@ function course_get_tagged_course_modules($tag, $exclusivemode = false, $fromcon
|
||||
JOIN {course} c ON cm.course = c.id
|
||||
JOIN {context} ctx ON ctx.instanceid = cm.id AND ctx.contextlevel = :coursemodulecontextlevel
|
||||
WHERE tt.itemtype = :itemtype AND tt.tagid = :tagid AND tt.component = :component
|
||||
AND cm.deletioninprogress = 0
|
||||
AND c.id %COURSEFILTER% AND cm.id %ITEMFILTER%";
|
||||
|
||||
$params = array('itemtype' => 'course_modules', 'tagid' => $tag->id, 'component' => 'core',
|
||||
|
@ -1771,6 +1771,7 @@ function mod_wiki_get_tagged_pages($tag, $exclusivemode = false, $fromctx = 0, $
|
||||
JOIN {course} c ON cm.course = c.id
|
||||
JOIN {context} ctx ON ctx.instanceid = cm.id AND ctx.contextlevel = :coursemodulecontextlevel
|
||||
WHERE tt.itemtype = :itemtype AND tt.tagid = :tagid AND tt.component = :component
|
||||
AND cm.deletioninprogress = 0
|
||||
AND wp.id %ITEMFILTER% AND c.id %COURSEFILTER%";
|
||||
|
||||
$params = array('itemtype' => 'wiki_pages', 'tagid' => $tag->id, 'component' => 'mod_wiki',
|
||||
|
Loading…
x
Reference in New Issue
Block a user