Add grader blueprint

This commit is contained in:
James Wang 2016-04-16 22:45:14 -04:00
parent db91af5d82
commit aa4f19d976
No known key found for this signature in database
GPG key ID: 5B80C0B3F263CD5B

View file

@ -111,5 +111,14 @@
var new_grader = ace.edit("new_grader"); var new_grader = ace.edit("new_grader");
new_grader.setTheme("ace/theme/tomorrow"); new_grader.setTheme("ace/theme/tomorrow");
new_grader.getSession().setMode("ace/mode/python"); new_grader.getSession().setMode("ace/mode/python");
new_grader.setValue(
'flag = "easyctf{FLAG}"\n\n'+
'def grade(candidate):\n'+
' if candidate == flag:\n'+
' return True, "Correct!"\n'+
' return False, "Incorrect."\n\n'+
'# Return True if the flag is correct, False otherwise, along with\n'+
'# a corresponding message to send to the user.'
);
}); });
</script> </script>