提交作品时左侧导航栏对应班级的导航栏
This commit is contained in:
parent
f880ab1c14
commit
abdc08c7af
|
@ -85,6 +85,14 @@ class HomeworkCommonController < ApplicationController
|
||||||
homework_detail_manual = @homework.homework_detail_manual || HomeworkDetailManual.new
|
homework_detail_manual = @homework.homework_detail_manual || HomeworkDetailManual.new
|
||||||
@homework.end_time = params[:homework_common][:end_time] || Time.now
|
@homework.end_time = params[:homework_common][:end_time] || Time.now
|
||||||
@homework.course_id = params[:course_id]
|
@homework.course_id = params[:course_id]
|
||||||
|
if params[:homework_type] && params[:homework_type].to_i != @homework.homework_type
|
||||||
|
if @homework.homework_type == 2
|
||||||
|
@homework.homework_detail_programing.destroy if @homework.homework_detail_programing
|
||||||
|
@homework.homework_tests.destroy_all
|
||||||
|
elsif @homework.homework_type == 3
|
||||||
|
@homework.homework_detail_group.destroy if @homework.homework_detail_group
|
||||||
|
end
|
||||||
|
end
|
||||||
@homework.homework_type = params[:homework_type].to_i || @homework.homework_type
|
@homework.homework_type = params[:homework_type].to_i || @homework.homework_type
|
||||||
anonymous = params[:homework_common][:anonymous_comment] ? params[:homework_common][:anonymous_comment].to_i : 1
|
anonymous = params[:homework_common][:anonymous_comment] ? params[:homework_common][:anonymous_comment].to_i : 1
|
||||||
if anonymous != @homework.anonymous_comment
|
if anonymous != @homework.anonymous_comment
|
||||||
|
|
|
@ -571,7 +571,7 @@ class StudentWorkController < ApplicationController
|
||||||
@student_work = StudentWork.new
|
@student_work = StudentWork.new
|
||||||
#end
|
#end
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html{ render :layout => "new_base_user"}
|
format.html{ render :layout => "base_courses"}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -657,7 +657,7 @@ class StudentWorkController < ApplicationController
|
||||||
render_403
|
render_403
|
||||||
else
|
else
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html{ render :layout => "new_base_user"}
|
format.html{ render :layout => "base_courses"}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
<%= import_ke(enable_at: true, prettify: false, init_activity: false) %>
|
<%= import_ke(enable_at: true, prettify: false, init_activity: false) %>
|
||||||
<%= javascript_include_tag 'homework','baiduTemplate' %>
|
<%= javascript_include_tag 'homework','baiduTemplate' %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
<div class="homepageRight mt0 ml10">
|
||||||
<div class="homepageRightBanner mb10">
|
<div class="homepageRightBanner mb10">
|
||||||
<div class="NewsBannerName">编辑作品</div>
|
<div class="NewsBannerName">编辑作品</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -83,6 +84,7 @@
|
||||||
<% end%>
|
<% end%>
|
||||||
</div><!----HomeWorkCon end-->
|
</div><!----HomeWorkCon end-->
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
<% if @homework.homework_detail_group %>
|
<% if @homework.homework_detail_group %>
|
||||||
$(function(){
|
$(function(){
|
||||||
|
|
|
@ -197,7 +197,8 @@
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="homepageRightBanner mb10">
|
<div class="homepageRight mt0 ml10">
|
||||||
|
<div class="homepageRightBanner mb10 ml10">
|
||||||
<div class="NewsBannerName">提交作品</div>
|
<div class="NewsBannerName">提交作品</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
|
@ -298,3 +299,4 @@
|
||||||
<% end%>
|
<% end%>
|
||||||
</div><!----HomeWorkCon end-->
|
</div><!----HomeWorkCon end-->
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue