样式调整

This commit is contained in:
cxt 2015-11-20 09:54:46 +08:00
parent 08c7eb8d40
commit d583ca1d70
7 changed files with 24 additions and 15 deletions

View File

@ -16,15 +16,14 @@
<script type="text/javascript">
function poll_submit() {
var question_form = $("form.new_exercise_question");
<% current_score = get_current_score exercise %>
if($("#polls_head_edit").is(":visible")){
alert("请先保存测验标题及测验基本信息。");
} else if(question_form.length > 0) {
alert("请先保存正在编辑的题目。");
} else{
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'exercise_submit_info', locals: { :score => current_score,:is_remote => false}) %>');
showModal('ajax-modal', '310px');
$('#ajax-modal').css('height','120px');
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'exercise_submit_info', locals: { :exercise => exercise}) %>');
showModal('ajax-modal', '400px');
//$('#ajax-modal').css('height','120px');
$('#ajax-modal').siblings().remove();
$('#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>");

View File

@ -14,8 +14,18 @@
<div id="popbox02">
<div class="upload_con">
<div class="upload_box">
<p class="polls_box_p">当前测验分数为<span class="c_red"><%=score %></span>分,
<br />
<% current_score = get_current_score exercise %>
<% 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>
<div class="polls_btn_box">

View File

@ -12,15 +12,14 @@
<div class="fontGrey2">
<span class="mr130">发布时间:<%=format_time(exercise.publish_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>
</div>
<div class="testDesEdit mt5"><%= exercise.exercise_description.nil? ? "" : exercise.exercise_description.html_safe%></div>
<div class="cl"></div>
</div>
<% mc_question_list = exercise_questions.where("question_type=1") %>
<% mcq_question_list = exercise_questions.where("question_type=2") %>
<% single_question_list = exercise_questions.where("question_type=3") %>
<% mc_question_list = exercise.exercise_questions.where("question_type=1") %>
<% mcq_question_list = exercise.exercise_questions.where("question_type=2") %>
<% 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" %>">
<h3 class="fontGrey3">单选题</h3>
<% mc_question_list.each do |exercise_question| %>
@ -107,8 +106,8 @@
<% end %>
</div>
<div class="ur_buttons">
<%= link_to l(:button_submit),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 "确定",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", :style => "float:right"%>
</div>
<div class="cl"></div>
<!--contentbox end-->

View File

@ -1,6 +1,6 @@
<%= form_for(ExerciseQuestion.new,
:html => { :multipart => true },
:url=>create_exercise_question_exercise_path(exercise_question.id),
:url=>create_exercise_question_exercise_path(exercise.id),
:remote=>true ) do |f| %>
<div class="questionContainer">
<div class="ur_editor_title">

View File

@ -1,6 +1,6 @@
<%= form_for(ExerciseQuestion.new,
:html => { :multipart => true },
:url=>create_exercise_question_exercise_path(exercise_question.id),
:url=>create_exercise_question_exercise_path(exercise.id),
:remote=>true ) do |f| %>
<div class="questionContainer">
<div class="ur_editor_title">

View File

@ -1,6 +1,6 @@
<%= form_for(ExerciseQuestion.new,
:html => { :multipart => true },
:url=>create_exercise_question_exercise_path(exercise_question.id),
:url=>create_exercise_question_exercise_path(exercise.id),
:remote=>true ) do |f| %>
<div class="questionContainer">
<div class="ur_editor_title">

View File

@ -1,3 +1,4 @@
<%= stylesheet_link_tag 'polls', :media => 'all' %>
<% if @is_teacher %>
<%= render :partial => 'exercise_teacher', :locals =>{:exercise =>@exercise, :exercise_questions => @exercise_questions} %>
<% else %>