1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798 |
- @using Bowin.Web.Controls.Mvc;
- @using EMISOnline.Entities;
- @using EMISOnline.Web.Controls;
- @{
- ViewBag.Title = "PracticeSetting";
- }
- <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
- @Html.Position()
- <div class="p_SearchTitle">
- <div style="float: left; margin-left: 10px; font-size: 12px; line-height: 30px;">
- 查询条件</div>
- </div>
- <div class="search_list">
- <div class="practice-container">
- <div class="practice-tip">
- <b>温馨提示:</b> 试卷一共有<span class="num"><span id="txtQuestionCount" style="color: Blue">@ViewBag.txtQuestionCount</span></span>
- 道, 当前第<span class="num"><span id="txtDone"></span></span>道, 还有<span class="num"> <span
- id="txtTodo"></span></span>道 <a href="PracticeSetting.aspx">退出练习</a>
- </div>
- <div class="practice-contont">
- <div id="questionContent">
- </div>
- </div>
- <div class="practice-button">
- @Html.Button(new ButtonOptions() { ID = "btnPrev", Text = "上一题" })
- @Html.Button(new ButtonOptions() { ID = "btnNext", Text = "下一题" })
- @Html.Button(new ButtonOptions() { ID = "btnShowAnswer", Text = "结束作业" })
- <input type="hidden" id="hd_right_questionid" runat="server" />
- <input type="hidden" id="hd_right_answers" runat="server" />
- </div>
- <div id="info" style="display: none">
- 无法找到对应的题目,请返回<a href="PracticeSetting.aspx">设置页面</a>重设练习条件.</div>
- </div>
- </div>
- </div>
- @section scripts{
- <script type="text/javascript" src="~/Scripts/Examinee/jquery-jtemplates_uncompressed.js"></script>
- <script type="text/javascript" src="~/Scripts/Business/student.parctite.js"></script>
- <script type="text/javascript" src="~/Scripts/NewEMIS.Comm.js"></script>
- <script type="text/jscript">
- var question = @Html.Raw(ViewBag.question);
- var currentIndex = @ViewBag.currentIndex;
- var fileServerUrl="@Html.Raw(ViewBag.fileServerUrl)";
- var QeustionSet=@Html.Raw(ViewBag.QeustionSet);
- var right_answers="";
- $(function () {
- $('#btnSave').click(function () {
- $(document.forms[0]).submit();
- })
- if (typeof (question) != 'undefined') {
- var builder = new parctiteBuilder();
- builder.buildPaper();
- }
- else {
- var info = $("#info");
- var container = $("#questionContent");
- container.append(info);
- info.show();
- }
- $('#btnPrev').click(function(){
- toggleQuestion( currentIndex-1);
- })
- $('#btnNext').click(function(){
- toggleQuestion(currentIndex+1);
- })
- $('#btnShowAnswer').click(function(){
- var questionid =QeustionSet[currentIndex];
- Invoke('@Url.Content("~/MyCoursework/TakePaper")',{workid:"@(ViewBag.Workid)",questionid:questionid,currentIndex:currentIndex,right_answers:right_answers});
- self.opener=null;
- self.close();
- })
- showButton();
- })
- function toggleQuestion(index){
- var questionid =QeustionSet[currentIndex];
- currentIndex=index;
- question = Invoke('@Url.Content("~/MyCoursework/GetQuestion")',{questionid:questionid,currentIndex:currentIndex,right_answers:right_answers});
- if (typeof (question) != 'undefined') {
- var builder = new parctiteBuilder();
- builder.buildPaper();
- }
- showButton();
- }
- function showButton(){
- $('#btnPrev').show();
- $('#btnNext').show();
- if(currentIndex==0){
- $('#btnPrev').hide();
- $('#btnNext').show();
- }else if((currentIndex+1)==QeustionSet.length){
- $('#btnPrev').show();
- $('#btnNext').hide();
- }
- $('#txtDone').text((currentIndex + 1));
- $('#txtTodo').text(QeustionSet.length - currentIndex - 1);
- }
- </script>
- }
|