Customizing a VPL activity using a student's ID ?

Customizing a VPL activity using a student's ID ?

by James Smith -
Number of replies: 4

Hi,

Following up on my other post, I'm curious about any potential method for injecting a student's ID from Moodle into a VPL exercise in order to modify the flow of the question.  For instance, the student ID could modify a unit test so that the answer was dependent on the student's ID value... very handy in helping to curb cheating.

We're using VPL for Java, C and Verilog here at York University and are looking to expand its use because it's so useful.  Being able to harness the student ID would be great.

James

P.S. More of our pages on VPL at York University: https://www.yorku.ca/professor/drsmith/category/vpl/


Average of ratings: -
In reply to James Smith

Re: Customizing a VPL activity using a student's ID ?

by Garth Brady -
Picture of Particularly helpful Moodlers
Not sure how to send this info to the student script but, I think we can get the userID by doing something like this:
require('config.php');
global $USER;
$userid = $USER->id;
In reply to Garth Brady

Re: Customizing a VPL activity using a student's ID ?

by James Smith -
thanks Garth. Is the intention to put that into the vpl_run.sh shell script?

James
In reply to James Smith

Re: Customizing a VPL activity using a student's ID ?

by Astor Bizard -
Picture of Particularly helpful Moodlers Picture of Plugin developers
Hello,

You might be interested in the Variations feature of the VPL.
It does not exactly use the userid, but it allows to create a set of variations that will be randomly assigned to students.
The variation affect the exercise description and can be used with testing scripts.

See https://vpl.dis.ulpgc.es/documentation/vpl-3.4.3+/biotes.html#variation

Astor