Skip to content
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
minor commenting
  • Loading branch information
rjtsai committed May 19, 2022
commit d9a310306890d7083bc04622328d1a5af2e750ce
5 changes: 2 additions & 3 deletions app/jobs/code_worker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,10 @@ def perform(attempt_id)
File.write(attempt_dir + '/' + prompt.class_name + '.' + lang, code_body) ###

# compile and load student tests into DB

answer.parse_student_tests!(answer_text, language, current_attempt) #rename

#run against inst soln

# run against inst soln
# creating reference directory
ref_dir = "#{working_dir}/reference"
ref_body = prompt.wrapper_code.sub(/\b___\b/, prompt.reference_solution)

Expand Down
3 changes: 1 addition & 2 deletions app/models/student_test_case.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ def record_result(answer, test_results_array)
coding_prompt_answer: answer,
pass: (test_results_array.length == 8 && test_results_array[7].to_i == 1)
)
# This logic is somewhat Java-specific, and needs to be refactored
# to better support other languages.

if !test_results_array[5].blank?
exception_name = test_results_array[6] #.sub(/^.*\./, '')
if !(['AssertionFailedError',
Expand Down