Skip to content
Snippets Groups Projects
Commit 54eb89f0 authored by Astor Bizard's avatar Astor Bizard :dog2:
Browse files

Removed constraints for corrected files (no more matching with required files).

parent 17c8433d
No related branches found
No related tags found
1 merge request!1Dev: Submissions list rework, webservices and bugfixes
......@@ -60,6 +60,10 @@ try {
break;
case 'load' :
$fgm = $vpl->get_fgm($type);
if ($type == 'corrected' && empty($fgm->getfilelist())) {
// By default, load required files into corrected files.
$fgm = $vpl->get_fgm('required');
}
$outcome->response->files = mod_vpl_edit::filestoide( $fgm->getallfiles() );
break;
case 'resetfiles' :
......
......@@ -51,6 +51,7 @@ $options ['saved'] = true;
switch ($type) {
case 'required':
case 'corrected':
$options ['minfiles'] = 0;
$options ['maxfiles'] = $vpl->get_instance()->maxfiles;
break;
......@@ -58,10 +59,6 @@ switch ($type) {
$options ['minfiles'] = $vpl->get_fgm('execution')->get_numstaticfiles();
$options ['maxfiles'] = 1000;
break;
case 'corrected':
$options ['minfiles'] = count($vpl->get_fgm('required')->getfilelist());
$options ['maxfiles'] = $vpl->get_instance()->maxfiles;
break;
case 'testcases':
$options ['minfiles'] = 1;
$options ['maxfiles'] = 1;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment