// GET: Activities/DisplaySAQLogForStudent public ActionResult DisplaySAQLogForStudent(long saqID, string StudentPhone) { ActivityData activityData = rsContext.getActivity(saqID); ShortAnswerQuestion saq = Adapting.getShortAnswerQuestionFromData((ShortAnswerQuestionData)activityData); AnswerByPhone answer = Adapting.getAnswerByPhoneFromData(rsContext.getAnswerByPhoneAndActivityID(saq.id, StudentPhone, saq.RoomId)); Student student = Adapting.getStudentFromData(rsContext.getStudent(StudentPhone, answer.RoomID)); TempData["StudentAnswer"] = answer.Answer; TempData["StudentName"] = student.FirstName + " " + student.LastName; return(View(saq)); }
// GET: Activities/DisplayTFQLogForStudent public ActionResult DisplayTFQLogForStudent(long tfqID, string StudentPhone) { ActivityData activityData = rsContext.getActivity(tfqID); TrueFalseQuestion tfq = Adapting.getTrueFalseQuestionFromData((TrueFalseQuestionData)activityData); AnswerByPhone answer = Adapting.getAnswerByPhoneFromData(rsContext.getAnswerByPhoneAndActivityID(tfq.id, StudentPhone, tfq.RoomId)); Student student = Adapting.getStudentFromData(rsContext.getStudent(StudentPhone, answer.RoomID)); TempData["StudentAnswer"] = answer.Answer; TempData["StudentName"] = student.FirstName + " " + student.LastName; return(View(tfq)); }