Gitlab CSE Unil

Commit 0bdbe8ce authored by M. Chardon's avatar M. Chardon
Browse files

correction bug V2

parent 90178090
......@@ -352,6 +352,7 @@ class editor {
$devoir->audioannotation = $audioannotation->id;
$devoir->user = $USER->id;
$devoir->timesubmited = (new DateTime())->getTimestamp();
$devoir->remediation = 0;
$devoirid = $DB->insert_record(assignement::TABLEASSIGNEMENT, $devoir);
return $DB->get_record(assignement::TABLEASSIGNEMENT, array(assignement::ID => $devoirid), '*', MUST_EXIST);
}
......
......@@ -334,7 +334,7 @@ class audioannotation_assignement {
$nbRendus = $formData->nbRendu;
$nbRendusSave = 0;
$formDataArr = json_decode(json_encode($formData), true);
for ($i = 0; $i < min(array($nbRendus, $nbRendusMax)); $i++) {
for ($i = 0; $i < max(array($nbRendus, $nbRendusMax)); $i++) {
$renduid = array_key_exists('renduid' . $i, $formDataArr) ? $formDataArr['renduid' . $i] : null;
$rendu = null;
if ($renduid == null) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment