3) Add these lines of code at the end of runfile.py (after "Show and handle results") :
# Don't forget to add this import statment at the top of the file :
# from inginious import input
student_name = input.get_input("@username")
# The files filled by the student are all inside PATH_TEMPLATES
files_to_be_tested = helper.find_files_in_path(PATH_TEMPLATES)
# Creates the archive like expected by JPlag
for student_file in files_to_be_tested:
command = "archive -a {} -o {}".format(student_file, student_name)
helper.run_command(command, universal_newlines=True)
Here is what you will need to do to integrate the plagiarism tool JPlag into our generic run script :
1) Creates a new function inside helper.py :
2) Modify these two lines of method run_command :
To :
3) Add these lines of code at the end of runfile.py (after "Show and handle results") :
Documentation :
Inginious - archive Inginious - JPlag