VPL quiz in Moodle

VPL quiz in Moodle

by MT T -
Number of replies: 14
I am trying to set up a Moodle quiz for Java programming. The normal VPL activities are working fine but when try to test the quiz, I am unable to run the code entered in the editor provided. I followed all the documentation but still failing.
I am not keeping the quiz as Auto grading hence I do not have any evaluation or test cases. It will be a manual grading. I only want the students to write the program and execute the code before they submit it.

Find the screenshot below of the quiz question. Now when I click on Run, the button is disabled and does not give the console window to show the output.

The VPL template is created and that is chosen while setting the quiz.


The program when written on the quiz page does not change font color, no option to create the files or it is not using the file created under Requested files. I am totally clueless as to what is wrong here.
I would appreciate if anyone can guide me through. I have read the help on Moodle page to create a quiz. did the same but still not getting there.
Average of ratings: -
In reply to MT T

Re: VPL quiz in Moodle

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

I am glad you are interested in VPL Questions.
These are indeed a bit difficult to handle at first.
I see several points that you may have to change in order to get your questions working:
- Please create only one Requested file on the VPL activity. Don't worry, you can still base several questions on the same VPL activity.
- You VPL activity is currently hidden, thus the question will not work for your students. The best option is to put it in a hidden section and make it hidden but available (in Settings > Common module settings).
- There was an issue in VPL Questions version 1.9.0 regarding execution files edition (and maybe your Run button problem too). I just uploaded version 2.0.0 that fixes that. Sorry for the inconvenience.

Please let me know if this helps, and if I can help any further.
Astor
Average of ratings: Useful (2)
In reply to Astor Bizard

Re: VPL quiz in Moodle

by MT T -
Thank you for your response Astor.
I made the first 2 changes as per your suggestion but the 3rd could be the main issue I guess.
I will check with my IT team if they can request Moodle to update the VPL questions version. But our Moodle version is 4.0.2 and according to the release notes VPL Question 1.9.0 is supported up to Moodle version 4.1.
Will VPL 2.0.0 be supported by Moodle 4.0.2?
If not then I will have to check if Moodle version can be updated without affecting other things.
In reply to MT T

Re: VPL quiz in Moodle

by Astor Bizard -
Picture of Particularly helpful Moodlers Picture of Plugin developers
VPL Questions v2.0.0 are fully compatible with current Moodle versions, including 4.0.2 smile
Average of ratings: Useful (2)
In reply to Astor Bizard

Re: VPL quiz in Moodle

by MT T -
Great. I will ask my IT team to update the VPL questions version then.
Thank you so much for your advice. I will update you how it goes.
In reply to Astor Bizard

Re: VPL quiz in Moodle

by MT T -
It worked. Upgrading the VPL questions version is working all fine.
Conducted some quizzes too. Students and teachers happy.
Thank you for your advice.

Now only issue is I am not giving any test cases. So when marking, there is no option to run the students code. Would you be able to suggest if there is any setting that I can do that will allow the lecturers to run the code for marking?
In reply to MT T

Re: VPL quiz in Moodle

by Astor Bizard -
Picture of Particularly helpful Moodlers Picture of Plugin developers
You can set test cases in the lower section of VPL Questions edition. You should see a file editor with tabs containing "vpl_evaluate.cases" where you can provide test cases.
For the question to actually be evaluated, you need to set the "Evaluate" option in the VPL activity Execution Options to "Yes".
In reply to Astor Bizard

Re: VPL quiz in Moodle

by MT T -
Hi,

I am now working on Python.
I am trying to set up the quiz again for Python but it seems to give me the same trouble. The Run button on clicking is disabled and does not give the output.
Would you be able to help me with any suggestion here.

I set it up just like java with one Requested file. I can see the font color change but on hitting the Run button, I am not getting any output. Is there any setting different for Python that needs to be done?

Your help is much appreciated.
In reply to MT T

Re: VPL quiz in Moodle

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

It should work the same.
If your requested file has the .py extension, contains {{ANSWER}} and you print something, you should see it when running.
Do you manage to execute and print something from a python program when running directly on a VPL activity ?

In reply to Astor Bizard

Re: VPL quiz in Moodle

by MT T -
The programs run fine.
Today I am trying to setup the quiz and I am unable to run the code.
I am sharing the settings images as below:

quiz view
VPL template setting
question template {{ANSWER}}
when previewed the setting, it shows the output, but when I run in the actual quiz, it doesn't show output.
 
It shows the output in the preview but doesn't Run in the actual quiz.
Please help.
Average of ratings: Useful (1)
In reply to MT T

Re: VPL quiz in Moodle

by MT T -
Would you please suggest a solution?
In the preview, the code runs fine, but in the actual quiz environment, the VPL does not respond. When hit Run button, the button becomes disabled and no response then after.
In reply to MT T

Re: VPL quiz in Moodle

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

This is indeed an unsettling behaviour! Can you open the javascript console on your browser and see if any errors show up when you click the Run button?

In reply to Astor Bizard

Re: VPL quiz in Moodle

by MT T -
I am not sure what has happened but now I am not able to run my older Java quizzes too.
This issue is only with the quiz setup. I am able to run the Python and Java programs on VPL as lab activity.
Only when I am adding the VPL question type in the quiz, the Run button disables after clicking it and does nothing.

I can see the output when I preview the question. But when I preview the quiz, I cannot see the output.

Do you have any idea what would be happening here?