parent
c73637a4ca
commit
2466184d8a
|
@ -51,8 +51,14 @@ class HomeworkCommonController < ApplicationController
|
|||
@user = User.current
|
||||
@is_in_course = params[:is_in_course].to_i
|
||||
@course_activity = params[:course_activity].to_i
|
||||
respond_to do |format|
|
||||
format.html{render :layout => 'new_base_user'}
|
||||
if @is_in_course == 1 || @course_activity == 1
|
||||
respond_to do |format|
|
||||
format.html{render :layout => 'base_courses'}
|
||||
end
|
||||
else
|
||||
respond_to do |format|
|
||||
format.html{render :layout => 'new_base_user'}
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -1,4 +1,10 @@
|
|||
<script type="text/javascript">
|
||||
<% if @is_in_course == 1 || @course_activity == 1 %>
|
||||
$(function(){
|
||||
$("#RSide").removeAttr("id");
|
||||
$("#Container").css("width","1000px");
|
||||
});
|
||||
<% end %>
|
||||
function reset_homework(){
|
||||
$("#homework_name").val("");
|
||||
$("#homework_publish_time").val("");
|
||||
|
@ -24,7 +30,7 @@
|
|||
<% end %>
|
||||
}
|
||||
</script>
|
||||
<div class="homepageRightBanner mb10">
|
||||
<div class="homepageRightBanner mb10 <%= (@is_in_course == 1 || @course_activity == 1) ? 'ml10' : '' %>">
|
||||
<div class="NewsBannerName">编辑作业</div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
|
|
@ -194,9 +194,10 @@
|
|||
</div>
|
||||
<div class="cl"></div>
|
||||
|
||||
<div class="mt10 <%= defined?(select_course) ? 'none' : ''%>">
|
||||
<%= select_tag :course_id, options_for_select(get_as_teacher_courses(User.current), homework.course_id), {:class => "InputBox w709",:value => "请选择发布作业的课程"} %>
|
||||
</div>
|
||||
<!--<div class="mt10 <%= defined?(select_course) ? 'none' : ''%>">
|
||||
<%#= select_tag :course_id, options_for_select(get_as_teacher_courses(User.current), homework.course_id), {:class => "InputBox w709",:value => "请选择发布作业的课程"} %>
|
||||
</div>-->
|
||||
<%= hidden_field_tag :course_id, params[:course_id], :value =>homework.course_id %>
|
||||
<p id="homework_course_id_span" class="c_red mt5"></p>
|
||||
<p id="e_tip" class="c_grey"></p>
|
||||
<p id="e_tips" class="c_grey"></p>
|
||||
|
|
Loading…
Reference in New Issue