Exemple #1
0
        public JsonResult SubmitReview()
        {
            if (!Permission.PremissionNeed(Request, Response, Session, UserRank.TEACHER))
            {
                return(Json(false));
            }

            User user  = (User)Session["user"];
            int  eid   = Convert.ToInt32(Request["eid"]);
            int  uid   = Convert.ToInt32(Request["uid"]);
            int  score = Convert.ToInt32(Request["score"]);

            Result result = ResultView.GetResult(eid, uid);

            result.score    = score;
            result.reviewer = user.uid;

            return(Json(ResultView.SubmitScore(result)));
        }