Untitled diff

Created Diff never expires
0 removals
36 lines
1 addition
37 lines
(module checker handin-server/checker
(module checker handin-server/checker
(require handin-server/grading-utils)
(require handin-server/grading-utils)
; Checks that submission is on time and that the user has submissions left
; Checks that submission is on time and that the user has submissions left
(pre:
(pre:
(check-deadline)
(check-deadline)
(check-max-submissions))
(check-max-submissions))
; Ends the report by adding the score and writes it in the user directory
; Ends the report by adding the score and writes it in the user directory
; This way, students can see their reports from the web interface.
; This way, students can see their reports from the web interface.
(post:
(post:
(add-score-to-report!)
(add-score-to-report!)
(write-report))
(write-report))
(check:
(check:
; Get timestamp of the submission and add it to header and report
; Get timestamp of the submission and add it to header and report
:language '(special intermediate)
(update-submission-timestamp!)
(update-submission-timestamp!)
(add-header-line! (get-submission-timestamp))
(add-header-line! (get-submission-timestamp))
(add-report-line! (get-submission-timestamp))
(add-report-line! (get-submission-timestamp))
; Acceptance tests: reject the submission if any of these tests fail
; Acceptance tests: reject the submission if any of these tests fail
(!test (foo 1) 3)
(!test (foo 1) 3)
; ...
; ...
; Grading
; Grading
; Initialize max score
; Initialize max score
(set-test-max-score! 100)
(set-test-max-score! 100)
; Failure discounts 25 points
; Failure discounts 25 points
( test "Sample case 1"
( test "Sample case 1"
"Error using even? predicate"
"Error using even? predicate"
(bar '(1 2 3 4) even?)
(bar '(1 2 3 4) even?)
'((2 4)(1 3))
'((2 4)(1 3))
25)))
25)))