Fix rubocop offenses - Requires Ruby 3.1+
This commit is contained in:
@ -23,12 +23,12 @@ module ProformaService
|
||||
title: @exercise.title,
|
||||
description: @exercise.description,
|
||||
internal_description: nil,
|
||||
proglang: proglang,
|
||||
proglang:,
|
||||
files: task_files,
|
||||
tests: tests,
|
||||
uuid: uuid,
|
||||
tests:,
|
||||
uuid:,
|
||||
language: DEFAULT_LANGUAGE,
|
||||
model_solutions: model_solutions,
|
||||
model_solutions:,
|
||||
meta_data: {
|
||||
CodeOcean: {
|
||||
public: @exercise.public,
|
||||
|
@ -26,9 +26,9 @@ module ProformaService
|
||||
allow_file_creation: string_to_bool(@task.meta_data[:CodeOcean]&.dig(:allow_file_creation)) || false,
|
||||
allow_auto_completion: string_to_bool(@task.meta_data[:CodeOcean]&.dig(:allow_auto_completion)) || false,
|
||||
expected_difficulty: @task.meta_data[:CodeOcean]&.dig(:expected_difficulty) || 1,
|
||||
execution_environment_id: execution_environment_id,
|
||||
execution_environment_id:,
|
||||
|
||||
files: files
|
||||
files:
|
||||
)
|
||||
end
|
||||
|
||||
|
@ -17,7 +17,7 @@ module ProformaService
|
||||
exercise = base_exercise
|
||||
exercise_files = exercise&.files&.to_a
|
||||
|
||||
exercise = ConvertTaskToExercise.call(task: @task, user: @user, exercise: exercise)
|
||||
exercise = ConvertTaskToExercise.call(task: @task, user: @user, exercise:)
|
||||
exercise_files&.each(&:destroy) # feels suboptimal
|
||||
|
||||
exercise
|
||||
|
Reference in New Issue
Block a user