MDL-66626 assignfeedback_editpdf: Count files outside of foreach loop.
Co-Authored-By: John Yao <[email protected]>
This commit is contained in:
co-authored by
John Yao
parent
f001dc447e
commit
bab00d9b8c
@@ -125,14 +125,14 @@ if ($action === 'pollconversions') {
|
||||
$annotations = page_editor::get_annotations($grade->id, $index, $draft);
|
||||
$page->annotations = $annotations;
|
||||
$response->pages[] = $page;
|
||||
|
||||
$component = 'assignfeedback_editpdf';
|
||||
$filearea = document_services::PAGE_IMAGE_FILEAREA;
|
||||
$filepath = '/';
|
||||
$fs = get_file_storage();
|
||||
$files = $fs->get_directory_files($context->id, $component, $filearea, $grade->id, $filepath);
|
||||
$response->pageready = count($files);
|
||||
}
|
||||
|
||||
$component = 'assignfeedback_editpdf';
|
||||
$filearea = document_services::PAGE_IMAGE_FILEAREA;
|
||||
$filepath = '/';
|
||||
$fs = get_file_storage();
|
||||
$files = $fs->get_directory_files($context->id, $component, $filearea, $grade->id, $filepath);
|
||||
$response->pageready = count($files);
|
||||
}
|
||||
|
||||
echo json_encode($response);
|
||||
|
||||
Reference in New Issue
Block a user