Skip to content

Commit

Permalink
Record grade in result.json
Browse files Browse the repository at this point in the history
  • Loading branch information
csev committed Dec 31, 2023
1 parent deddff5 commit e152386
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tools/ccauto/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,16 @@
$graderet = LTIX::gradeSend($grade, false, $debug_log);
error_log("Success: ".$displayname.' '.$email);
unset($_SESSION['checkgrade']);

// Store grade for later
if ( is_object($retval) && is_string($retval->tempdir) &&
strlen($retval->tempdir) >0 && is_dir($retval->tempdir) ) {

$retval->grade = 1.0;
$json = json_encode($retval, JSON_PRETTY_PRINT);
file_put_contents($retval->tempdir . '/result.json', $json);
}

// $OUTPUT->dumpDebugArray($debug_log);
}

Expand Down

0 comments on commit e152386

Please sign in to comment.