separate file for editor in edit view

This commit is contained in:
yqbk
2016-08-17 15:37:36 +02:00
parent 9a47f126e4
commit 476188990f
4 changed files with 47 additions and 14 deletions

View File

@ -6,7 +6,7 @@ class ExercisesController < ApplicationController
before_action :handle_file_uploads, only: [:create, :update]
before_action :set_execution_environments, only: [:create, :edit, :new, :update]
before_action :set_exercise, only: MEMBER_ACTIONS + [:clone, :implement, :edit, :run, :statistics, :submit, :reload]
before_action :set_exercise, only: MEMBER_ACTIONS + [:clone, :implement, :run, :statistics, :submit, :reload]
before_action :set_external_user, only: [:statistics]
before_action :set_file_types, only: [:create, :edit, :new, :update]
@ -63,8 +63,7 @@ class ExercisesController < ApplicationController
end
def edit
@files = (@submission ? @submission.collect_files : @exercise.files).select(&:visible).sort_by(&:name_with_extension)
@paths = collect_paths(@files)
end
def import_proforma_xml