Difference between revisions of "Tutorial Moodle VPL Tips & Tricks"

From dftwiki3
Jump to: navigation, search
(Evaluation Output)
Line 1: Line 1:
 
--[[User:Thiebaut|D. Thiebaut]] ([[User talk:Thiebaut|talk]]) 20:31, 11 June 2014 (EDT)
 
--[[User:Thiebaut|D. Thiebaut]] ([[User talk:Thiebaut|talk]]) 20:31, 11 June 2014 (EDT)
 
----
 
----
 +
<br />
 +
<br />
 +
{| style="width:100%;"
 +
| style="width:60%;" |
 +
__TOC__
 +
|
 +
[[Image:MoodleVPLLogo.png]]
 +
|}
 +
<br />
 +
<bluebox>
 +
This is a collection of tips, tricks, observations, recommendations, and modifications related to using VPL with Moodle.
 +
</bluebox>
 +
<br />
 
=Tips & Tricks=
 
=Tips & Tricks=
  

Revision as of 19:37, 11 June 2014

--D. Thiebaut (talk) 20:31, 11 June 2014 (EDT)




MoodleVPLLogo.png


This is a collection of tips, tricks, observations, recommendations, and modifications related to using VPL with Moodle.


Tips & Tricks

Evaluation Output

  • The output of the Evaluate action is a bit illogical:
 +------------------------------+
 |  3 tests run/ 0 tests failed   | 
 +------------------------------+
  • To change it into something more intuitive, such as this:
 +------------------------------+
 |  3 tests run/ 3 tests passed  |  
 +------------------------------+
we simply need to modify the code of vpl_evaluate.cpp on the moodle server, in /var/www/html/moodle/mod/vpl/jail/default_scripts (or whatever directory the vpl files reside).
  • The diff of the modification is shown below:
1058,1059c1058,1060
< 				printf(">| %2d %s run/%2d %s failed |\n",
< 						nruns, nruns==1?stest[0]:stest[1], nerrors, nerrors==1?stest[0]:stest[1]);
---
> 				printf(">| %2d %s run/%2d %s passed |\n",
> 						nruns, nruns==1?stest[0]:stest[1], nruns-nerrors, 
> 				                (nruns-nerrors)==1?stest[0]:stest[1]);