rename action, translation fixes
This commit is contained in:
@ -12,9 +12,9 @@ class ExercisesController < ApplicationController
|
||||
before_action :set_file_types, only: [:create, :edit, :new, :update]
|
||||
before_action :set_course_token, only: [:implement]
|
||||
|
||||
skip_before_action :verify_authenticity_token, only: [:import_proforma_xml, :import_uuid_check, :export_external_confirm]
|
||||
skip_after_action :verify_authorized, only: [:import_proforma_xml, :import_uuid_check, :export_external_confirm]
|
||||
skip_after_action :verify_policy_scoped, only: [:import_proforma_xml, :import_uuid_check, :export_external_confirm], raise: false
|
||||
skip_before_action :verify_authenticity_token, only: [:import_exercise, :import_uuid_check, :export_external_confirm]
|
||||
skip_after_action :verify_authorized, only: [:import_exercise, :import_uuid_check, :export_external_confirm]
|
||||
skip_after_action :verify_policy_scoped, only: [:import_exercise, :import_uuid_check, :export_external_confirm], raise: false
|
||||
|
||||
def authorize!
|
||||
authorize(@exercise || @exercises)
|
||||
@ -36,7 +36,6 @@ class ExercisesController < ApplicationController
|
||||
}
|
||||
end
|
||||
|
||||
|
||||
def experimental_course?(course_token)
|
||||
experimental_courses.has_value?(course_token)
|
||||
end
|
||||
@ -183,7 +182,7 @@ class ExercisesController < ApplicationController
|
||||
render json: {exercise_found: true, update_right: true, message: t('exercises.import_codeharbor.check.exercise_found')}
|
||||
end
|
||||
|
||||
def import_proforma_xml
|
||||
def import_exercise
|
||||
tempfile = Tempfile.new('codeharbor_import.zip')
|
||||
tempfile.write request.body.read.force_encoding('UTF-8')
|
||||
tempfile.rewind
|
||||
|
@ -330,7 +330,7 @@ en:
|
||||
successfully_exported: 'Exercise has successfully been exported.<br>ID: %{id}<br>Title: %{title}'
|
||||
export_failed: 'Export has failed.<br>ID: %{id}<br>Title: %{title}<br><br>Error: %{error}'
|
||||
error: 'An error occurred while contacting Codeharbor<br>Error: %{message}'
|
||||
checking_codeharbor: Checking whether exercise exists on Codeharbor.
|
||||
checking_codeharbor: Checking if the exercise exists on Codeharbor.
|
||||
buttons:
|
||||
retry: ' Retry'
|
||||
export: ' Export'
|
||||
|
@ -66,7 +66,7 @@ Rails.application.routes.draw do
|
||||
end
|
||||
end
|
||||
|
||||
post '/import_proforma_xml' => 'exercises#import_proforma_xml'
|
||||
post '/import_exercise' => 'exercises#import_exercise'
|
||||
post '/import_uuid_check' => 'exercises#import_uuid_check'
|
||||
|
||||
resources :exercises do
|
||||
|
Reference in New Issue
Block a user