Merge remote-tracking branch 'origin/master' into error-info
# Conflicts: # app/controllers/concerns/submission_scoring.rb # app/views/application/_navigation.html.slim # config/locales/de.yml # config/locales/en.yml # db/schema.rb
This commit is contained in:
@ -8,7 +8,7 @@ module SubmissionScoring
|
||||
output = execute_test_file(file, submission)
|
||||
assessment = assessor.assess(output)
|
||||
passed = ((assessment[:passed] == assessment[:count]) and (assessment[:score] > 0))
|
||||
testrun_output = passed ? nil : output[:stderr]
|
||||
testrun_output = passed ? nil : 'message: ' + output[:message].to_s + "\n stdout: " + output[:stdout].to_s + "\n stderr: " + output[:stderr].to_s
|
||||
if !testrun_output.blank?
|
||||
submission.exercise.execution_environment.error_templates.each do |template|
|
||||
pattern = Regexp.new(template.signature).freeze
|
||||
@ -17,7 +17,7 @@ module SubmissionScoring
|
||||
end
|
||||
end
|
||||
end
|
||||
Testrun.new(submission: submission, file: file, passed: passed, output: testrun_output).save
|
||||
Testrun.new(submission: submission, cause: 'assess', file: file, passed: passed, output: testrun_output).save
|
||||
output.merge!(assessment)
|
||||
output.merge!(filename: file.name_with_extension, message: feedback_message(file, output[:score]), weight: file.weight)
|
||||
end
|
||||
|
Reference in New Issue
Block a user