Can the grader be sidestepped?

Re: Can the grader be sidestepped?

by Richard Lobb -
Number of replies: 0

As far as I know, all question types in a standard Moodle quiz need to gradable, so I suppose the short answer is "no". But there are workarounds.

If you're concerned that the students' submissions are graded wrong, you could use a regular expression grader and match against ".* ". You'd probably also want to suppress the 'Expected' column in the result table to avoid confusing students. You can also set the mark for that question to 0 so the overall quiz outcome is unaffected.

If you just want the student to suggest a single string parameter for the process method, it might be simpler for the student if you ask them just to paste that string into the answer box; you could then change the template to something like

param = """{ STUDENT_ANSWER | e('py')}"""
print(process(param))

If you want complete control of the output displayed to the student (e.g. you don't want to show them a results table at all) and/or you want to control the grade programmatically, you could use a combinator grader and set the prelude or postlude to the output captured by running the task in a subprocess, but that's a lot harder.

One thing to be aware of: the support files you add to a question aren't really hidden. A student can easily write a program to print all the files in the current working directory. So if you're worried about students getting hold of your sample answers to the various functions (A, B, C, etc) you might want to consider putting up .pycs anyway. If even that worries you, you'll have to implement your own security within the template.

Richard