translations and whitespaces
This commit is contained in:
@@ -236,7 +236,6 @@ $(document).on('turbolinks:load', function() {
|
||||
$('#exercise_unpublished').prop('checked', true);
|
||||
}
|
||||
})
|
||||
|
||||
};
|
||||
|
||||
var observeExportButtons = function(){
|
||||
|
@@ -141,7 +141,6 @@ class ExercisesController < ApplicationController
|
||||
exported: false
|
||||
}
|
||||
)
|
||||
|
||||
}, status: 200
|
||||
end
|
||||
|
||||
|
@@ -7,7 +7,6 @@ module CodeOcean
|
||||
def validate(record)
|
||||
existing_files = File.where(name: record.name, path: record.path, file_type_id: record.file_type_id,
|
||||
context_id: record.context_id, context_type: record.context_type).to_a
|
||||
|
||||
unless existing_files.empty?
|
||||
if (not record.context.is_a?(Exercise)) || (record.context.new_record?)
|
||||
record.errors[:base] << 'Duplicate'
|
||||
|
@@ -55,8 +55,8 @@ module ProformaService
|
||||
end
|
||||
|
||||
filenames.select { |f| f[/\.xml$/] }.any?
|
||||
# rescue Zip::Error
|
||||
# raise Proforma::InvalidZip
|
||||
rescue Zip::Error
|
||||
raise Proforma::InvalidZip
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@@ -1,18 +1,18 @@
|
||||
- if error
|
||||
= button_tag type: 'button', class:'btn btn-primary pull-right export-button export-retry-button', data: {exercise_id: exercise.id} do
|
||||
i.fa.fa-refresh.confirm-icon
|
||||
= ' Retry'
|
||||
= t('exercises.export_codeharbor.buttons.retry')
|
||||
- else
|
||||
- unless exported
|
||||
- if update_right
|
||||
= button_tag type: 'button', class:'btn btn-primary pull-right export-action export-button', data: {exercise_id: exercise.id, export_type: 'export'} do
|
||||
i.fa.fa-check.confirm-icon
|
||||
= ' Export'
|
||||
= t('exercises.export_codeharbor.buttons.export')
|
||||
- else
|
||||
= button_tag type: 'button', class:'btn btn-primary pull-right export-action export-button', data: {exercise_id: exercise.id, export_type: 'create_new'} do
|
||||
i.fa.fa-check.confirm-icon
|
||||
= ' Create new'
|
||||
= t('exercises.export_codeharbor.buttons.create_new')
|
||||
|
||||
= button_tag type: 'submit', class:'btn btn-secondary pull-right export-button', data: {dismiss: 'modal'} do
|
||||
i.fa.fa-remove.abort-icon
|
||||
= exported ? ' Close' : ' Abort'
|
||||
= exported ? t('exercises.export_codeharbor.buttons.close') : t('exercises.export_codeharbor.buttons.abort')
|
||||
|
@@ -1,5 +1,3 @@
|
||||
#export-exercise
|
||||
.export-message
|
||||
= 'This should not be seen'
|
||||
.export-exercise-actions
|
||||
= 'This neither'
|
||||
|
@@ -11,7 +11,7 @@
|
||||
= f.pagedown :description, input_html: { preview: true, rows: 10 }
|
||||
.form-group
|
||||
= f.label(:execution_environment_id)
|
||||
= f.collection_select(:execution_environment_id, @execution_environments, :id, :name, {include_blank: 'None'}, class: 'form-control')
|
||||
= f.collection_select(:execution_environment_id, @execution_environments, :id, :name, {include_blank: t('exercises.form.none')}, class: 'form-control')
|
||||
/.form-group
|
||||
= f.label(:instructions)
|
||||
= f.hidden_field(:instructions)
|
||||
|
Reference in New Issue
Block a user