From 893ae35039c579a96b189e86583a411bf0f64e6e Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Wed, 2 Sep 2015 19:52:44 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=BB=BA=E4=BD=9C=E5=93=81=E3=80=81?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E4=BD=9C=E5=93=81=E7=95=8C=E9=9D=A2=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/student_work_controller.rb | 3 +- app/views/attachments/_new_form.html.erb | 1 + app/views/student_work/edit.html.erb | 92 +++++++++++----------- app/views/student_work/new.html.erb | 4 +- public/javascripts/new_user.js | 46 +++++++++++ public/stylesheets/new_user.css | 2 +- 6 files changed, 99 insertions(+), 49 deletions(-) diff --git a/app/controllers/student_work_controller.rb b/app/controllers/student_work_controller.rb index 30922230e..61105bc45 100644 --- a/app/controllers/student_work_controller.rb +++ b/app/controllers/student_work_controller.rb @@ -182,11 +182,12 @@ class StudentWorkController < ApplicationController end def edit + @user = User.current if !User.current.admin? && @homework.homework_type == 2 #编程作业不能修改作业 render_403 else respond_to do |format| - format.html + format.html{ render :layout => "new_base_user"} end end end diff --git a/app/views/attachments/_new_form.html.erb b/app/views/attachments/_new_form.html.erb index 38b471897..47f6fd202 100644 --- a/app/views/attachments/_new_form.html.erb +++ b/app/views/attachments/_new_form.html.erb @@ -23,6 +23,7 @@ <% end %> <% end %> +
<% project = project %>