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;}