blob: f255d1da60462eebbcde307ed5b04a0141cc4093 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
post '/test_validation/?' do
validationExamples = ValidationExamples.select(params[:select])
return "please \"select\" a single validation example:\n"+ValidationExamples.list if validationExamples.size!=1 or validationExamples[0].size!=1
task = OpenTox::Task.create("Test validation",url_for("/test_validation",:full)) do |task|
v = validationExamples[0][0]
ex = v.new
ex.subjectid = @subjectid
ex.upload_files
task.progress(10)
ex.check_requirements
ex.validate(OpenTox::SubTask.create(task,10,80))
#raise ex.validation_error if ex.validation_error
ex.report(OpenTox::SubTask.create(task,80,99)) unless params[:report]=="false"
#raise ex.report_error if ex.report_error
if ex.report_uri
ex.report_uri
else
ex.validation_uri
end
end
return_task(task)
end
|