样式调整
This commit is contained in:
parent
08c7eb8d40
commit
d583ca1d70
|
@ -16,15 +16,14 @@
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
function poll_submit() {
|
function poll_submit() {
|
||||||
var question_form = $("form.new_exercise_question");
|
var question_form = $("form.new_exercise_question");
|
||||||
<% current_score = get_current_score exercise %>
|
|
||||||
if($("#polls_head_edit").is(":visible")){
|
if($("#polls_head_edit").is(":visible")){
|
||||||
alert("请先保存测验标题及测验基本信息。");
|
alert("请先保存测验标题及测验基本信息。");
|
||||||
} else if(question_form.length > 0) {
|
} else if(question_form.length > 0) {
|
||||||
alert("请先保存正在编辑的题目。");
|
alert("请先保存正在编辑的题目。");
|
||||||
} else{
|
} else{
|
||||||
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'exercise_submit_info', locals: { :score => current_score,:is_remote => false}) %>');
|
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'exercise_submit_info', locals: { :exercise => exercise}) %>');
|
||||||
showModal('ajax-modal', '310px');
|
showModal('ajax-modal', '400px');
|
||||||
$('#ajax-modal').css('height','120px');
|
//$('#ajax-modal').css('height','120px');
|
||||||
$('#ajax-modal').siblings().remove();
|
$('#ajax-modal').siblings().remove();
|
||||||
$('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +
|
$('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +
|
||||||
"<a href='javascript:' onclick='clickCanel();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
|
"<a href='javascript:' onclick='clickCanel();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
|
||||||
|
|
|
@ -14,8 +14,18 @@
|
||||||
<div id="popbox02">
|
<div id="popbox02">
|
||||||
<div class="upload_con">
|
<div class="upload_con">
|
||||||
<div class="upload_box">
|
<div class="upload_box">
|
||||||
<p class="polls_box_p">当前测验分数为<span class="c_red"><%=score %></span>分,
|
<% current_score = get_current_score exercise %>
|
||||||
<br />
|
<% question_count = exercise.exercise_questions.count %>
|
||||||
|
<% mc_count = exercise.exercise_questions.where("question_type=1").count %>
|
||||||
|
<% mcq_count = exercise.exercise_questions.where("question_type=2").count %>
|
||||||
|
<% single_count = exercise.exercise_questions.where("question_type=3").count %>
|
||||||
|
<p class="f14">当前测验
|
||||||
|
<% if question_count > 0 %>共有<%= question_count %>道题,其中<% end %>
|
||||||
|
<% if mc_count > 0 %><%= mc_count %>道单选、<% end %>
|
||||||
|
<% if mcq_count > 0 %><%= mcq_count %>道多选、<% end %>
|
||||||
|
<% if single_count > 0%><%= single_count %>道填空,<% end %>
|
||||||
|
总分为<span class="c_red"><%=current_score %></span>分。
|
||||||
|
<br /><br />
|
||||||
是否确定提交该测验?
|
是否确定提交该测验?
|
||||||
</p>
|
</p>
|
||||||
<div class="polls_btn_box">
|
<div class="polls_btn_box">
|
||||||
|
|
|
@ -12,15 +12,14 @@
|
||||||
<div class="fontGrey2">
|
<div class="fontGrey2">
|
||||||
<span class="mr130">发布时间:<%=format_time(exercise.publish_time.to_s) %></span>
|
<span class="mr130">发布时间:<%=format_time(exercise.publish_time.to_s) %></span>
|
||||||
<span class="mr130">截止时间:<%=format_time(exercise.end_time.to_s) %></span>
|
<span class="mr130">截止时间:<%=format_time(exercise.end_time.to_s) %></span>
|
||||||
<% time = exercise_user.end_at - exercise_user.start_at %>
|
|
||||||
<span class="fr">测验时长:<%=exercise.time %>分钟</span>
|
<span class="fr">测验时长:<%=exercise.time %>分钟</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="testDesEdit mt5"><%= exercise.exercise_description.nil? ? "" : exercise.exercise_description.html_safe%></div>
|
<div class="testDesEdit mt5"><%= exercise.exercise_description.nil? ? "" : exercise.exercise_description.html_safe%></div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</div>
|
</div>
|
||||||
<% mc_question_list = exercise_questions.where("question_type=1") %>
|
<% mc_question_list = exercise.exercise_questions.where("question_type=1") %>
|
||||||
<% mcq_question_list = exercise_questions.where("question_type=2") %>
|
<% mcq_question_list = exercise.exercise_questions.where("question_type=2") %>
|
||||||
<% single_question_list = exercise_questions.where("question_type=3") %>
|
<% single_question_list = exercise.exercise_questions.where("question_type=3") %>
|
||||||
<div class="testStatus" id="mc_question_list" style="display: <%=mc_question_list.count > 0 ? "" : "none" %>">
|
<div class="testStatus" id="mc_question_list" style="display: <%=mc_question_list.count > 0 ? "" : "none" %>">
|
||||||
<h3 class="fontGrey3">单选题</h3>
|
<h3 class="fontGrey3">单选题</h3>
|
||||||
<% mc_question_list.each do |exercise_question| %>
|
<% mc_question_list.each do |exercise_question| %>
|
||||||
|
@ -107,8 +106,8 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<div class="ur_buttons">
|
<div class="ur_buttons">
|
||||||
<%= link_to l(:button_submit),exercise_index_path(:course_id => @course.id),:class => "ur_button_submit" %>
|
<%= link_to "确定",exercise_index_path(:course_id => @course.id),:class => "ur_button_submit" %>
|
||||||
<%= link_to l(:button_edit), edit_exercise_path(exercise.id), :class => "ur_button_submit fr"%>
|
<%= link_to l(:button_edit), edit_exercise_path(exercise.id), :class => "ur_button_submit", :style => "float:right"%>
|
||||||
</div>
|
</div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<!--contentbox end-->
|
<!--contentbox end-->
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<%= form_for(ExerciseQuestion.new,
|
<%= form_for(ExerciseQuestion.new,
|
||||||
:html => { :multipart => true },
|
:html => { :multipart => true },
|
||||||
:url=>create_exercise_question_exercise_path(exercise_question.id),
|
:url=>create_exercise_question_exercise_path(exercise.id),
|
||||||
:remote=>true ) do |f| %>
|
:remote=>true ) do |f| %>
|
||||||
<div class="questionContainer">
|
<div class="questionContainer">
|
||||||
<div class="ur_editor_title">
|
<div class="ur_editor_title">
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<%= form_for(ExerciseQuestion.new,
|
<%= form_for(ExerciseQuestion.new,
|
||||||
:html => { :multipart => true },
|
:html => { :multipart => true },
|
||||||
:url=>create_exercise_question_exercise_path(exercise_question.id),
|
:url=>create_exercise_question_exercise_path(exercise.id),
|
||||||
:remote=>true ) do |f| %>
|
:remote=>true ) do |f| %>
|
||||||
<div class="questionContainer">
|
<div class="questionContainer">
|
||||||
<div class="ur_editor_title">
|
<div class="ur_editor_title">
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<%= form_for(ExerciseQuestion.new,
|
<%= form_for(ExerciseQuestion.new,
|
||||||
:html => { :multipart => true },
|
:html => { :multipart => true },
|
||||||
:url=>create_exercise_question_exercise_path(exercise_question.id),
|
:url=>create_exercise_question_exercise_path(exercise.id),
|
||||||
:remote=>true ) do |f| %>
|
:remote=>true ) do |f| %>
|
||||||
<div class="questionContainer">
|
<div class="questionContainer">
|
||||||
<div class="ur_editor_title">
|
<div class="ur_editor_title">
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
<%= stylesheet_link_tag 'polls', :media => 'all' %>
|
||||||
<% if @is_teacher %>
|
<% if @is_teacher %>
|
||||||
<%= render :partial => 'exercise_teacher', :locals =>{:exercise =>@exercise, :exercise_questions => @exercise_questions} %>
|
<%= render :partial => 'exercise_teacher', :locals =>{:exercise =>@exercise, :exercise_questions => @exercise_questions} %>
|
||||||
<% else %>
|
<% else %>
|
||||||
|
|
Loading…
Reference in New Issue