remove checksum
This commit is contained in:
@ -26,8 +26,7 @@ module ProformaService
|
|||||||
tests: tests,
|
tests: tests,
|
||||||
uuid: uuid,
|
uuid: uuid,
|
||||||
language: DEFAULT_LANGUAGE,
|
language: DEFAULT_LANGUAGE,
|
||||||
model_solutions: model_solutions,
|
model_solutions: model_solutions
|
||||||
import_checksum: @exercise.import_checksum
|
|
||||||
}.compact
|
}.compact
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
@ -21,8 +21,7 @@ module ProformaService
|
|||||||
title: @task.title,
|
title: @task.title,
|
||||||
description: @task.description,
|
description: @task.description,
|
||||||
instructions: @task.internal_description,
|
instructions: @task.internal_description,
|
||||||
files: files,
|
files: files
|
||||||
import_checksum: @task.checksum
|
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -1,5 +0,0 @@
|
|||||||
class AddImportChecksumToExercises < ActiveRecord::Migration[5.2]
|
|
||||||
def change
|
|
||||||
add_column :exercises, :import_checksum, :string
|
|
||||||
end
|
|
||||||
end
|
|
@ -153,7 +153,6 @@ ActiveRecord::Schema.define(version: 2019_10_08_163045) do
|
|||||||
t.boolean "allow_auto_completion", default: false
|
t.boolean "allow_auto_completion", default: false
|
||||||
t.integer "expected_difficulty", default: 1
|
t.integer "expected_difficulty", default: 1
|
||||||
t.uuid "uuid"
|
t.uuid "uuid"
|
||||||
t.string "import_checksum"
|
|
||||||
t.boolean "unpublished", default: false
|
t.boolean "unpublished", default: false
|
||||||
t.index ["id"], name: "index_exercises_on_id"
|
t.index ["id"], name: "index_exercises_on_id"
|
||||||
end
|
end
|
||||||
|
@ -40,8 +40,7 @@ RSpec.describe ProformaService::ConvertExerciseToTask do
|
|||||||
# parent_uuid: exercise.clone_relations.first&.origin&.uuid,
|
# parent_uuid: exercise.clone_relations.first&.origin&.uuid,
|
||||||
files: [],
|
files: [],
|
||||||
tests: [],
|
tests: [],
|
||||||
model_solutions: [],
|
model_solutions: []
|
||||||
import_checksum: exercise.import_checksum
|
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -39,9 +39,7 @@ describe ProformaService::ConvertTaskToExercise do
|
|||||||
language: 'language',
|
language: 'language',
|
||||||
model_solutions: model_solutions,
|
model_solutions: model_solutions,
|
||||||
files: files,
|
files: files,
|
||||||
tests: tests,
|
tests: tests
|
||||||
import_checksum: 'import_checksum',
|
|
||||||
checksum: 'checksum'
|
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
let(:user) { FactoryBot.create(:teacher) }
|
let(:user) { FactoryBot.create(:teacher) }
|
||||||
|
@ -37,6 +37,6 @@ RSpec::Matchers.define :be_an_equal_exercise_as do |exercise|
|
|||||||
def attributes_and_associations(object)
|
def attributes_and_associations(object)
|
||||||
object.attributes.dup.tap do |attributes|
|
object.attributes.dup.tap do |attributes|
|
||||||
attributes[:files] = object.files if defined? object.files
|
attributes[:files] = object.files if defined? object.files
|
||||||
end.except('id', 'created_at', 'updated_at', 'exercise_id', 'uuid', 'import_checksum')
|
end.except('id', 'created_at', 'updated_at', 'exercise_id', 'uuid')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user