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

Environment variable MOODLE_USER_ID made available in run and debug

parent ccdfbe43
No related branches found
No related tags found
1 merge request!1Dev: Submissions list rework, webservices and bugfixes
......@@ -54,7 +54,7 @@ class mod_vpl_submission_CE extends mod_vpl_submission {
'lisp' => 'lisp',
'lsp' => 'lisp',
'lua' => 'lua',
'mod' => 'opl',
'mod' => 'opl',
'sh' => 'shell',
'pas' => 'pascal',
'p' => 'pascal',
......@@ -203,7 +203,7 @@ class mod_vpl_submission_CE extends mod_vpl_submission {
$data->debugscript = $vplinstance->debugscript;
}
// Execution files.
$sfg = $vpl->get_fgm('execution');
$sfg = $vpl->get_fgm('execution');
$list = $sfg->getFileList();
foreach ($list as $filename) {
// Skip unneeded script.
......@@ -283,13 +283,13 @@ class mod_vpl_submission_CE extends mod_vpl_submission {
//$info .= vpl_bash_export( 'MOODLE_USER_NAME', $vpl->fullname( $user, false ) );
$info .= vpl_bash_export( 'MOODLE_USER_NAME', $user->username );
}
$info .= vpl_bash_export( 'MOODLE_USER_ID', $subinstance->userid );
if ($type == 2) { // If evaluation add information.
$info .= vpl_bash_export( 'VPL_MAXTIME', $data->maxtime );
$info .= vpl_bash_export( 'VPL_MAXMEMORY', $data->maxmemory );
$info .= vpl_bash_export( 'VPL_MAXFILESIZE', $data->maxfilesize );
$info .= vpl_bash_export( 'VPL_MAXPROCESSES', $data->maxprocesses );
$info .= vpl_bash_export( 'MOODLE_USER_ID', $subinstance->userid );
$gradesetting = $vpl->get_grade_info();
if ($gradesetting !== false) {
$info .= vpl_bash_export( 'VPL_GRADEMIN', $gradesetting->grademin );
......
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