Search in sources :

Example 1 with QuizPostNumerical

use of com.instructure.candroid.interfaces.QuizPostNumerical in project instructure-android by instructure.

the class QuizSubmissionQuestionListRecyclerAdapter method addNumericalQuestion.

private void addNumericalQuestion(QuizSubmissionQuestion baseItem, QuizNumericalViewHolder holder, int position, int courseColor) {
    addAnsweredQuestion(baseItem);
    QuizNumericalBinder.bind(holder, baseItem, courseColor, position, shouldLetAnswer, getContext(), flagStateCallback, embeddedWebViewCallback, webViewClientCallback, new QuizPostNumerical() {

        @Override
        public void postNumerical(long questionId, String answer) {
            addAnsweredQuestion(questionId);
            // note: this is the same as the essay question on purpose. Numerical is just text.
            QuizManager.postQuizQuestionEssay(quizSubmission, answer, questionId, true, new StatusCallback<QuizSubmissionQuestionResponse>() {
            });
        }
    });
}
Also used : QuizPostNumerical(com.instructure.candroid.interfaces.QuizPostNumerical) StatusCallback(com.instructure.canvasapi2.StatusCallback)

Aggregations

QuizPostNumerical (com.instructure.candroid.interfaces.QuizPostNumerical)1 StatusCallback (com.instructure.canvasapi2.StatusCallback)1