Esempio n. 1
0
 public object QuestionView(TestQuestion model, int index, int count)
 {
     return(div
            .Class(GetQuestionClass(model) + " test-question entity-id-" + model.Id)[
                h2["Вопрос {0} из {1}".FormatWith(index + 1, count)],
                button.Class("mark-button")["Отметить"].Title("Отметьте вопрос, что бы потом к нему вернуться"),
                p[TestReadOnlyView.TestText(model.Description), div.Style("margin:5px;")[TestControls.QuestionFileView(model.Id, false)]],
                AnswerPart(model)].Style("display:none;"));
 }
Esempio n. 2
0
        object GetAnswerText(TestAnswer answer)
        {
            var file = TestControls.AnswerFileView(answer.Id, false);
            var desc = TestReadOnlyView.TestText(answer.Description);

            if (file == null)
            {
                return(desc);
            }
            return(H.l(desc, br, TestControls.AnswerFileView(answer.Id, false)));
        }
Esempio n. 3
0
 public override object Get()
 {
     return(H.div[Model.Questions.Select(x => TestReadOnlyView.QuestionView(x, 0, 0, true))]);
 }