Class: Aladdin::Submission
- Inherits:
-
Object
- Object
- Aladdin::Submission
- Includes:
- Aladdin::Support::WeakComparator
- Defined in:
- lib/aladdin/submission.rb
Overview
Student submission.
DANGER DANGER DANGER ==
The scratchspace code assumes that there is only one submission at a time, it's unsuitable for production use. It does not impose any security restrictions at all.
Defined Under Namespace
Modules: Type
Constant Summary collapse
- SCRATCHSPACE =
'.__ss'
Instance Method Summary collapse
-
#initialize(id, type, params, input, logger) ⇒ Submission
constructor
Creates a new student submission.
-
#verify ⇒ Object
Verifies the student's submission.
Methods included from Aladdin::Support::WeakComparator
Constructor Details
#initialize(id, type, params, input, logger) ⇒ Submission
Creates a new student submission.
22 23 24 |
# File 'lib/aladdin/submission.rb', line 22 def initialize(id, type, params, input, logger) @id, @type, @params, @input, @logger = id, type, params, input, logger end |
Instance Method Details
#verify ⇒ Object
Verifies the student's submission.
27 28 29 30 31 32 |
# File 'lib/aladdin/submission.rb', line 27 def verify case @type when Type::CODE then verify_code when Type::PROBLEM then verify_problem end end |