add warnings

This commit is contained in:
Karol
2019-10-08 18:31:29 +02:00
parent d6d8a803ae
commit 64f6f088f5
2 changed files with 6 additions and 4 deletions

View File

@ -123,9 +123,9 @@ class ExercisesController < ApplicationController
uuid = params[:uuid]
exercise = Exercise.find_by(uuid: uuid)
return render json: {exercise_found: false, message: t('exercises.export_codeharbor.check.no_exercise')} if exercise.nil?
return render json: {exercise_found: false, message: t('exercises.import_codeharbor.check.no_exercise')} if exercise.nil?
render json: {exercise_found: true, message: 'exercise found, be careful when overwriting or else!'}
render json: {exercise_found: true, message: t('exercises.import_codeharbor.check.exercise_found')}
end
def import_proforma_xml

View File

@ -316,9 +316,11 @@ en:
request_for_comments_sent: "Request for comments sent."
editor_file_tree:
file_root: Files
export_codeharbor:
import_codeharbor:
check:
no_exercise: No exercise found
no_exercise: No corresponding exercise found on Codeocean. Pushing this exercise will create a new one on Codeocean, which will be linked to this one on Codeharbor, any changes to either one can be pushed to the respective other platform.
exercise_found: A corresponding exercise has been found on Codeocean. You can either <ul><li>Create a new exercise as a duplicate of this one Codeharbor and push it to Codeocean, using the "Create new" button.</li><li>Overwrite the exercise on Codeocean, by pushing all changes. Only use "Overwrite" for bugfixes or very small changes - it will alter and may break published exercises.</li></ul>
export_codeharbor:
fail: Failed to push the exercise to CodeHarbor.
label: Export to Codeharbor
success: Successfully pushed the exercise to CodeHarbor.