去掉关闭、导入等功能
This commit is contained in:
parent
da34083a2a
commit
c9ba57f64b
|
@ -284,13 +284,7 @@ class ExerciseController < ApplicationController
|
|||
@exercise.exercise_status = 2
|
||||
@exercise.publish_time = Time.now
|
||||
if @exercise.save
|
||||
if params[:is_remote]
|
||||
redirect_to exercise_index_url(:course_id => @course.id)
|
||||
else
|
||||
respond_to do |format|
|
||||
format.js
|
||||
end
|
||||
end
|
||||
redirect_to exercise_index_url(:course_id=> @course.id)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -430,7 +424,7 @@ class ExerciseController < ApplicationController
|
|||
def commit_exercise
|
||||
# 老师不需要提交
|
||||
if User.current.allowed_to?(:as_teacher,@course)
|
||||
@exercise.update_attributes(:show_result => params[:exercise][:show_result])
|
||||
@exercise.update_attributes(:show_result => params[:show_result])
|
||||
redirect_to exercise_url(@exercise)
|
||||
# REDO: 提示提交成功
|
||||
else
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
<% if exercise.exercise_status == 1 %>
|
||||
<li><a href="javascript:" class="pollsbtn btn_pu fl ml5" onclick="exercise_submit(<%= exercise.id%>,<%= exercise.exercise_name.length %>);">发布试卷</a></li>
|
||||
<% else %>
|
||||
<li><a href="javascript:" class="pollsbtn btn_de fl ml5" onclick="republish_exercise(<%= exercise.id%>);">取消发布</a></li>
|
||||
<li class="pollsbtn fl ml5 pollsbtn_grey">发布试卷</li>
|
||||
<% end%>
|
||||
|
||||
<%= link_to(l(:button_delete), exercise,:method => :delete, :confirm => l(:text_are_you_sure), :remote => true, :class => "polls_de fr ml5 mr10") %>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<%= form_for(exercise,
|
||||
<%= form_for('',
|
||||
:html => { :multipart => true },
|
||||
:url => {:controller => 'exercise',
|
||||
:action => 'commit_exercise',
|
||||
|
@ -7,8 +7,8 @@
|
|||
<div class="ur_buttons">
|
||||
<a class="ur_button_submit" onclick="poll_submit();"> 提交 </a>
|
||||
<div class="polls_cha">
|
||||
<%= f.check_box :show_result, :value => exercise.show_result%>
|
||||
<%= label_tag 'exercise_show_result', '允许学生查看测验结果' %>
|
||||
<%= f.check_box 'show_result', :value => exercise.show_result%>
|
||||
<%= label_tag '_show_result', '允许学生查看测验结果' %>
|
||||
<!--<input name="exercise[show_result]" value="<%#exercise.show_result %>" type="checkbox" checked="true">
|
||||
<label for="">允许学生查看测验结果</label>-->
|
||||
</div>
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
$('#ajax-modal').html("<div id='popbox02'>" +
|
||||
"<div class='upload_con'>" +
|
||||
"<div class='upload_box'>" +
|
||||
"<p class='polls_box_p'>问卷发布后将不能对问卷进行修改,<br />是否确定发布该问卷?</p>" +
|
||||
"<p class='polls_box_p'>测验发布后将不能对测验进行修改,<br />是否确定发布该测验?</p>" +
|
||||
"<div class='polls_btn_box'>" +
|
||||
"<a href='/exercise/"+ exercise_id +"/publish_exercise' class='upload_btn' onclick='clickCanel();' data-remote='true'>确 定</a>" +
|
||||
"<a class='upload_btn upload_btn_grey' onclick='clickCanel();'>取 消</a>" +
|
||||
|
|
Loading…
Reference in New Issue