From c6e7e2e83b2f33e832abba8a21fb2dbf18755a0e Mon Sep 17 00:00:00 2001 From: cxt Date: Thu, 25 Feb 2016 10:23:38 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A8=A1=E6=8B=9F=E7=AD=94=E9=A2=98=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E5=A2=9E=E5=8A=A0=E8=BF=94=E5=9B=9E=E6=8C=89=E9=92=AE?= =?UTF-8?q?=EF=BC=8C=E9=A1=B5=E9=9D=A2=E7=9A=84layout=E6=94=B9=E6=88=90?= =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E7=9B=B8=E5=85=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/users_controller.rb | 3 ++- app/views/users/new_user_commit_homework.html.erb | 13 ++++++++++--- public/stylesheets/public.css | 1 + 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index fb35d8495..d1f98668c 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -532,9 +532,10 @@ class UsersController < ApplicationController if @student_work.nil? @student_work = StudentWork.new end + @course = @homework.course respond_to do |format| format.js - format.html {render :layout => 'new_base_user'} + format.html {render :layout => 'base_courses'} end else render_403 diff --git a/app/views/users/new_user_commit_homework.html.erb b/app/views/users/new_user_commit_homework.html.erb index eed789a29..02bfc9203 100644 --- a/app/views/users/new_user_commit_homework.html.erb +++ b/app/views/users/new_user_commit_homework.html.erb @@ -4,7 +4,12 @@ <%= stylesheet_link_tag "/assets/codemirror/codemirror" %> <% end %> - + -
+
@@ -91,7 +96,9 @@
测试代码 - <% unless @is_test %> + <% if @is_test %> + <%=link_to '返 回',course_path(@course),:class=>'fr mt6' %> + <% else @is_test %> 提交代码 <% end %>
diff --git a/public/stylesheets/public.css b/public/stylesheets/public.css index 80c219350..7112bd3f3 100644 --- a/public/stylesheets/public.css +++ b/public/stylesheets/public.css @@ -113,6 +113,7 @@ h4{ font-size:14px; color:#3b3b3b;} .mt0 {margin-top:0px !important;} .mt3{ margin-top:3px;} .mt5{ margin-top:5px;} +.mt6{ margin-top:6px;} .mt8{ margin-top:8px;} .mt10{ margin-top:10px !important;} .mt20{margin-top: 20px;}