/// <summary>
        /// 返回学生电子学档
        /// </summary>
        /// <param name="courseid"></param>
        /// <param name="moduleTag"></param>
        /// <returns></returns>
        public ActionResult WorksDetail(int courseid, string moduleTag)
        {
            ViewBag.courseid = courseid;
            //-------------------------------------------返回学生的最后得分-------------------------------------------------
            int      mTag   = 1;//如果是第一次其他页面请求过来,mTag的值为1,则默认显示该课程的第一个模块
            CouScore cScore = null;

            if (!string.IsNullOrEmpty(moduleTag))
            {
                mTag = Convert.ToInt32(moduleTag);
            }
            cScore         = db.CouScore.Where(cs => cs.CourseId == courseid && cs.ModuleTag == mTag).FirstOrDefault();
            ViewBag.cScore = cScore;
            //--------------------------------------返回课程某一模块的详细----------------------------------------------------------
            Module module = db.Module.Where(m => m.CourseId == courseid && m.ModuleTag == mTag).FirstOrDefault();

            ViewBag.module = module;

            //----------------------------------------------返回学生对某一模块的作业----------------------------------------------------
            StudentWork sWork = db.StudentWork.Where(sw => sw.CourseId == courseid && sw.StudentId == studentId && sw.ModuleTag == mTag).FirstOrDefault();

            ViewBag.sWork = sWork;
            //---------------------------------------返回某一模块的考试题目 学生的答案 及评分-------------------------------------
            if (module != null)
            {
                List <Erecord> listErecord = mHelp.SqlQuery <Erecord>("select pq.QTitle,psa.Answer,psa.AnswerScore from PaperStudentAnswers as psa join PaperQuestions as pq on psa.QuestionId=pq.Id where psa.MouduleTag=@mTag and StudentId=@studentId", new SqlParameter[] { new SqlParameter("@mTag", mTag), new SqlParameter("@studentId", studentId) }).ToList();
                ViewBag.listErecord = listErecord;
            }
            //--------------------------------------------------------------------------------------------------------------------
            return(View());
        }
        public string SetScore(FormCollection form)
        {
            int  courseId  = Convert.ToInt32(form["CourseId"]);
            Guid studentId = new Guid(form["StudentId"]);
            int  moduleTag = Convert.ToInt32(form["ModuleTag"]);

            CouScore cScore = db.CouScore.Where(c => c.CourseId == courseId && c.StudentId == studentId && c.ModuleTag == moduleTag).FirstOrDefault();

            if (cScore != null)
            {
                cScore.ModuleScore = form["score"];
            }
            else
            {
                cScore = new CouScore()
                {
                    CourseId    = courseId,
                    StudentId   = studentId,
                    ModuleTag   = moduleTag,
                    ModuleScore = form["score"]
                };
                db.CouScore.Add(cScore);
            }
            db.SaveChanges();
            return("OK");
        }