jcrodriguez-dis / moodle-mod_vpl

Virtual Programming Lab for Moodle (Module)
GNU General Public License v3.0
97 stars 84 forks source link

Proposed Grade != Gradebook Grade #178

Open buddy1234567 opened 4 months ago

buddy1234567 commented 4 months ago

Is this issue possibly related to #160? I posted this in the moodle forum, but am wondering if it makes more sense to place this here:

I've been using custom test cases in VPL for quite some time and recently I've found that Proposed test scores are showing as 10/5 when a student passes all tests on assignment. The grade in the gradebook shows as 5/5, but the proposed grade shows as 10/5. I've attached the custom scripts that were given to me and have not been able to discern what the issue is. For those interested, I've attached them below.

vpl-mods.zip

jcrodriguez-dis commented 4 months ago

Dear @buddy1234567,

Thank you for raising this issue and providing detailed context. The current system lacks a mechanism for performing range checks before displaying proposed grades. This discrepancy becomes evident in situations involving automatic grading, where the system will truncate the mark to fit within the valid range, and in manual grading scenarios, where the teacher is required to manually adjust the mark to a valid value.

We have identified three potential approaches to address this issue:

  1. Displaying an error message to indicate when a proposed grade exceeds the acceptable range.
  2. Automatically adjusting the proposed grade to fall within the acceptable range, thereby streamlining the grading process.
  3. Maintaining the current behavior, which requires manual intervention to correct out-of-range grades.

Each of these approaches has its implications. For instance, automatically adjusting grades could simplify the grading process but may also obscure issues related to the calculation or input of grades. Conversely, presenting an error message would highlight discrepancies, necessitating manual adjustments to ensure accuracy.

Considering the issue #160, which involved a non-numerical value for a grade, it appears that the current situation is somewhat different, as it pertains to the handling of numerical grades that exceed the expected ranges.

We are keen to hear your perspective on the most appropriate course of action.

Best regards,

Juan Carlos

buddy1234567 commented 4 months ago

I appreciate the conversation.

I use a parent VPL activity and the have numerous child activities. All of these activities now reflect Proposed Grades that are double the expected scoring (10,5, 10/20, etc).

To continue your thinking, I'm not sure why the proposed grade differs from the actual grade in the gradebook (I presume, moodle is overriding the score of 10/5 and reducing it to the max allowed?). I'm also not sure why the proposed grade is double what it ought to be. This didn't start occurring until I upgraded at some point in the last 8 weeks. I would very much like to have the proposed grade behave as it has for many years where it is identical to the actual grade in the gradebook and scales with the passing of test cases. You were incredibly kind to provide these scripts to me many years ago (see this post on the forums) and they've worked beautifully ever since. It's only very recently that the proposed grade has behaved unexpectedly.

jcrodriguez-dis commented 4 months ago

Dear @buddy1234567,

Thank you for bringing this to our attention and for the detailed context provided in the forum posts and the files you've shared. It seems you are customizing the vpl_evaluate.sh and vpl_evaluate.cpp files from VPL version 3.3. It's important to note that both files have undergone changes since that version, and with the bug identified in version 4.2, your vpl_evaluate.cpp file is being inadvertently replaced. As a temporary workaround to this issue, you can rename your vpl_evaluate.cpp to my_vpl_evaluate.cpp. Then, modify your vpl_evaluate.sh script to include a command at the beginning that copies my_vpl_evaluate.cpp back to vpl_evaluate.cpp. This step will prevent the bug in VPL 4.2 from replacing your customized vpl_evaluate.cpp file. Here's the corrected Bash command to achieve this:

cp my_vpl_evaluate.cpp vpl_evaluate.cpp

Please note the correction in the file names from the previously provided command. This approach ensures that your custom evaluation script is preserved during the VPL activity processing.

If you are not customizing vpl_evaluate.cpp, another approach would be to update to the new vpl_evaluate.sh and remove the now unnecessary vpl_evaluate.cpp file.

Best regards,

Juan Carlos

buddy1234567 commented 4 months ago

Many thanks - I have updated my custom file vpl_evaluate.sh to the contents of the latest edition of moodle-mod_vpl/jail/default_scripts/default_evaluate.sh and removed the original vpl_evaluate.cpp and things seem to have resolved wonderfully. Thanks again for your work on this marvelous project.