parent
602373812f
commit
9aee23507c
@ -0,0 +1,12 @@
|
||||
<div id="popbox" style="text-align: center;margin-top: 25px">
|
||||
<% if status == 0 %>
|
||||
<h3 style="font-weight: normal;color: green">提交成功!您的分数是:<%=@score %>分。</h3>
|
||||
<%= link_to "确定", exercise_path(),:class => 'commit'%>
|
||||
<% elsif status == 1 %>
|
||||
<h3 style="font-weight: normal;color: red">您还有尚未作答的题目请完成后再提交!</h3>
|
||||
<%= link_to "确定", "javascript:void(0)",:onclick => 'hidden_atert_form();',:class => 'commit'%>
|
||||
<% else %>
|
||||
<h3 style="font-weight: normal;color: red">发生未知错误,请检查您的网络。</h3>
|
||||
<%= link_to "确定", "javascript:void(0)",:onclick => 'hidden_atert_form();',:class => 'commit'%>
|
||||
<% end %>
|
||||
</div>
|
@ -0,0 +1,117 @@
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
$("#RSide").removeAttr("id");
|
||||
$("#homework_page_right").css("min-height",$("#LSide").height()-30);
|
||||
$("#Container").css("width","1000px");
|
||||
});
|
||||
</script>
|
||||
<div class="homepageRight mt0 ml10">
|
||||
<div class="resources">
|
||||
<div class="testStatus"><!--头部显示 start-->
|
||||
<h1 class="ur_page_title" id="polls_name_h"><%= exercise.exercise_name%></h1>
|
||||
<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") %>
|
||||
<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| %>
|
||||
<div id="poll_questions_<%= exercise_question.id%>">
|
||||
<div id="show_poll_questions_<%= exercise_question.id %>">
|
||||
<div>
|
||||
<div class="testEditTitle"> 第<%= exercise_question.question_number%>题.(<%= exercise_question.question_score %>分)<br />
|
||||
<%= exercise_question.question_title %><br />
|
||||
标准答案:<%= convert_to_char(exercise_question.exercise_standard_answers.first.exercise_choice_id.to_s) %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div class="ur_inputs">
|
||||
<table class="ur_table" style="width:675px;">
|
||||
<tbody>
|
||||
<% exercise_question.exercise_choices.reorder("choice_position").each_with_index do |exercise_choice,index| %>
|
||||
<tr>
|
||||
<td>
|
||||
<label>
|
||||
<input class="ur_radio" type="radio" name="<%= exercise_question %>" value="<%= exercise_choice.choice_text%>" >
|
||||
<%= convert_to_char((index+1).to_s)%> <%= exercise_choice.choice_text%>
|
||||
</label>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="testStatus" id="mcq_question_list" style="display: <%=mcq_question_list.count > 0 ? "" : "none" %>">
|
||||
<h3 class="fontGrey3">多选题</h3>
|
||||
<% mcq_question_list.each do |exercise_question| %>
|
||||
<div id="poll_questions_<%= exercise_question.id%>">
|
||||
<div id="show_poll_questions_<%= exercise_question.id %>">
|
||||
<div>
|
||||
<div class="testEditTitle"> 第<%= exercise_question.question_number%>题.(<%= exercise_question.question_score %>分)<br />
|
||||
<%= exercise_question.question_title %><br />
|
||||
标准答案:<%= convert_to_char(exercise_question.exercise_standard_answers.first.exercise_choice_id.to_s) %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div class="ur_inputs">
|
||||
<table class="ur_table" style="width:675px;">
|
||||
<tbody>
|
||||
<% exercise_question.exercise_choices.reorder("choice_position").each_with_index do |exercise_choice,index| %>
|
||||
<tr>
|
||||
<td>
|
||||
<label>
|
||||
<input class="ur_radio" type="checkbox" name="<%= exercise_question %>" value="<%= exercise_choice.choice_text%>" >
|
||||
<%= convert_to_char((index+1).to_s)%> <%= exercise_choice.choice_text%>
|
||||
</label>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div><!--多选题显示 end-->
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="testStatus" id="single_question_list" style="display: <%=single_question_list.count > 0 ? "" : "none" %>">
|
||||
<h3 class="fontGrey3">填空题</h3>
|
||||
<% single_question_list.each do |exercise_question| %>
|
||||
<div id="poll_questions_<%= exercise_question.id%>">
|
||||
<div id="show_poll_questions_<%= exercise_question.id %>">
|
||||
<div>
|
||||
<div class="testEditTitle"> 第<%= exercise_question.question_number%>题.(<%= exercise_question.question_score %>分)<br />
|
||||
<%= exercise_question.question_title %><br />
|
||||
标准答案:<%= convert_to_char(exercise_question.exercise_standard_answers.first.exercise_choice_id.to_s) %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div>
|
||||
<% exercise_question.exercise_standard_answers.reorder("created_at").each_with_index do |exercise_choice,index| %>
|
||||
候选答案:<%= exercise_choice.answer_text%><br />
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% 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"%>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<!--contentbox end-->
|
||||
</div>
|
||||
<!--RSide end-->
|
||||
</div>
|
@ -0,0 +1,9 @@
|
||||
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'commit_alert',:locals => {:status => @status}) %>');
|
||||
showModal('ajax-modal', '270px');
|
||||
$('#ajax-modal').css('height','110px');
|
||||
$('#ajax-modal').siblings().remove();
|
||||
$('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +
|
||||
"<a href='javascript:' onclick='hidden_atert_form();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
|
||||
$('#ajax-modal').parent().removeClass("alert_praise");
|
||||
$('#ajax-modal').parent().css("top","").css("left","");
|
||||
$('#ajax-modal').parent().addClass("alert_box");
|
@ -1,5 +1,9 @@
|
||||
<% if @is_teacher %>
|
||||
|
||||
<%= render :partial => 'exercise_teacher', :locals =>{:exercise =>@exercise, :exercise_questions => @exercise_questions} %>
|
||||
<% else %>
|
||||
<%=render :partial => 'exercise_student', :locals => {:exercise =>@exercise, :exercise_questions => @exercise_questions,:exercise_student => @exercise_student} %>
|
||||
<% if @can_edit_excercise %>
|
||||
<%=render :partial => 'exercise_student', :locals => {:exercise =>@exercise, :exercise_questions => @exercise_questions,:exercise_user => @exercise_user} %>
|
||||
<% else %>
|
||||
<%=render :partial => 'exercise_student_result', :locals => {:exercise =>@exercise, :exercise_questions => @exercise_questions,:exercise_user => @exercise_user} %>
|
||||
<% end %>
|
||||
<% end %>
|
Loading…
Reference in new issue