mirror of
https://github.com/moodle/moodle.git
synced 2025-03-14 12:40:01 +01:00
MDL-32638 fixing the area names and file_browser::get_file_info() API call
These two bug made the file browsing non-working in workshop 2.x
This commit is contained in:
parent
7528e238e0
commit
f08c15685b
@ -98,7 +98,7 @@ class workshop_file_info_submissions_container extends file_info {
|
||||
$itemids = $DB->get_records('files', array('contextid' => $this->context->id, 'component' => 'mod_workshop', 'filearea' => $this->filearea),
|
||||
'itemid', "DISTINCT itemid");
|
||||
foreach ($itemids as $itemid => $unused) {
|
||||
if ($child = $this->browser->get_file_info($this->context, $this->filearea, $itemid)) {
|
||||
if ($child = $this->browser->get_file_info($this->context, 'mod_workshop', $this->filearea, $itemid)) {
|
||||
$children[] = $child;
|
||||
}
|
||||
}
|
||||
|
@ -1348,7 +1348,7 @@ function workshop_get_file_info($browser, $areas, $course, $cm, $context, $filea
|
||||
|
||||
$fs = get_file_storage();
|
||||
|
||||
if ($filearea === 'content' or $filearea === 'attachment') {
|
||||
if ($filearea === 'submission_content' or $filearea === 'submission_attachment') {
|
||||
|
||||
if (!has_capability('mod/workshop:viewallsubmissions', $context)) {
|
||||
return null;
|
||||
|
Loading…
x
Reference in New Issue
Block a user