Song.Site/Mobile/TestScene.ashx.cs

(开头部分) 7KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using WeiSha.Common;
using Song.ServiceInterfaces;
using VTemplate.Engine;
using Song.Entities;

namespace Song.Site.Mobile
{
    /// <summary>
    /// 模拟考试现场
    /// </summary>
    public class TestScene : BasePage
    {

        //考试id
        protected int tpid = WeiSha.Common.Request.QueryString["id"].Int32 ?? 0;
        //行为
        protected string action = WeiSha.Common.Request.QueryString["action"].String;
        //当前学员收藏的试题
        Song.Entities.Questions[] collectQues = null;
        string[] types = null;
        //当前试卷
        Song.Entities.TestPaper paper = null;
        protected override void InitPageTemplate(HttpContext context)
        {
            this.Document.SetValue("action", action);
            this.Document.SetValue("tpid", tpid);
            //唯一值
            string uid = WeiSha.Common.Request.UniqueID();
            this.Document.Variables.SetValue("uid", uid);
            //服务器端时间
            string time = new WeiSha.Common.Param.Method.ConvertToAnyValue(DateTime.Now.ToString()).JavascriptTime;
            this.Document.Variables.SetValue("Time", time);
            if (!Extend.LoginState.Student.IsLogin)
                this.Response.Redirect("Entry.ashx");
            //当前试卷
            paper = Business.Do<ITestPaper>().PagerSingle(tpid);
            this.Document.SetValue("pager", paper);
            //试卷所属课程
            Song.Entities.Course course = Business.Do<ICourse>().CourseSingle(paper.Cou_ID);
            this.Document.SetValue("course", course);
            //启始页状态
            if (string.IsNullOrWhiteSpace(action))
            {
                //
            }
            //开始考试
            if (action == "start")
            {
                //题型
                this.Document.SetValue("quesType", WeiSha.Common.App.Get["QuesType"].Split(','));
                //取果是第一次打开,则随机生成试题,此为获取试卷
                //难度区间
                int diff1 = paper.Tp_Diff > paper.Tp_Diff2 ? (int)paper.Tp_Diff2 : (int)paper.Tp_Diff;
                int diff2 = paper.Tp_Diff > paper.Tp_Diff2 ? (int)paper.Tp_Diff : (int)paper.Tp_Diff2;
                //当前选中的课程
                Song.Entities.Course currCourse = Extend.LoginState.Student.Course();
后面还有 133 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读 AI

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。