How to transmit test data using files?

How to transmit test data using files?

by moon moodle -
Number of replies: 2

I want to upload test data via files. Can I upload very large datasets? What are the file formats for the input and output, respectively? If I need to upload multiple sets of test data, is it possible to upload them as a compressed archive?
image

In reply to moon moodle

Re: How to transmit test data using files?

by Richard Lobb -

There are no explicit rules in CodeRunner regarding allowed filetypes, but the Moodle administrator can impose constraints. So I suggest you just experiment to see if the files you wish to upload will work for you. Similarly, the maximum file size depends on lots of settings including the PHP limits set in the Moodle and Jobe servers (post_max_size, upload_max_filesize, memory_limit) and additional settings that the Moodle administrator might set. So experiment to see what works for you and live within that limit. 

Some question authors seem to want to set students questions with huge datafiles but that isn't usually necessary - it just slows things down for everyone. Ask yourself what the key learning outcomes for a question are - do they really include the need to handle huge datasets as well as smaller ones?

Yes, you should be able to attach a zip file as a support file, but you will then need to include code in your question template or prototype to unzip the file first.

In reply to Richard Lobb

Re: How to transmit test data using files?

by moon moodle -
I want to use large test data because for some algorithm problems, the superiority of the algorithm only becomes evident when dealing with large quantities. Previously, I had students complete tasks on an Online Judge (OJ) platform where large datasets didn't significantly slow down processing. Is it because Moodle has more features, and the logical connections between data are more complex, making it more computationally intensive? Therefore, running large datasets using CodeRunner on Moodle is relatively slower? If so, I will continue to run large dataset problems on the OJ platform.

On the OJ management backend, uploading test data generally involves uploading a zip file, which allows for the sequential upload of multiple test cases. I haven't mastered how to unzip files on CodeRunner yet. If it's too complicated, I'll still use the method of pasting data to upload.

Thank you for your response!