private static RealExamQuestion GetQuestionElement(questionAssign question, List <OptionAssign> allOptions) { return(new RealExamQuestion { type = question.type, title = question.title, multiple = question.type == "Single"?false:true, options = OptionUtils.OptionsToRealOptions(allOptions), answer = OptionUtils.OptionsToAnswers(allOptions), score = question.score, questionId = question.Id, }); }
public static RealExamQuestion GetExamElement(questionAssign question, List <OptionAssign> allOptions, StudentQuestionTable studentExamQuestion, OptionAssignController optionAssignController) { return(new RealExamQuestion { type = question.type, title = question.title, multiple = question.type == "Single" ? false : true, options = OptionUtils.OptionsToRealOptions(allOptions), studentAnswer = GetStudentAnswers(studentExamQuestion, optionAssignController), answer = OptionUtils.OptionsToAnswers(allOptions), studentScore = studentExamQuestion.score, score = question.score, questionId = question.Id, }); }