Search in sources :

Example 16 with QuizSubmissionQuestionResponse

use of com.instructure.canvasapi2.models.QuizSubmissionQuestionResponse in project instructure-android by instructure.

the class QuizManager method postQuizQuestionMultiChoice.

public static void postQuizQuestionMultiChoice(QuizSubmission quizSubmission, long answer, long questionId, boolean forceNetwork, @NonNull StatusCallback<QuizSubmissionQuestionResponse> callback) {
    final RestBuilder adapter = new RestBuilder(callback);
    final RestParams params = new RestParams.Builder().withPerPageQueryParam(true).withShouldIgnoreToken(false).withForceReadFromNetwork(forceNetwork).build();
    QuizAPI.postQuizQuestionMultiChoice(quizSubmission.getId(), quizSubmission.getAttempt(), questionId, answer, quizSubmission.getValidationToken(), adapter, params, callback);
}
Also used : RestParams(com.instructure.canvasapi2.builders.RestParams) RestBuilder(com.instructure.canvasapi2.builders.RestBuilder) RestBuilder(com.instructure.canvasapi2.builders.RestBuilder)

Aggregations

RestBuilder (com.instructure.canvasapi2.builders.RestBuilder)9 RestParams (com.instructure.canvasapi2.builders.RestParams)9 StatusCallback (com.instructure.canvasapi2.StatusCallback)5 QuizSubmissionQuestion (com.instructure.canvasapi2.models.QuizSubmissionQuestion)4 QuizSubmissionQuestionResponse (com.instructure.canvasapi2.models.QuizSubmissionQuestionResponse)4 QuizSubmissionResponse (com.instructure.canvasapi2.models.QuizSubmissionResponse)4 LinkHeaders (com.instructure.canvasapi2.utils.LinkHeaders)4 ApiType (com.instructure.canvasapi2.utils.ApiType)3 NonNull (android.support.annotation.NonNull)2 LinkedTreeMap (com.google.gson.internal.LinkedTreeMap)2 ArrayList (java.util.ArrayList)2 Response (retrofit2.Response)2 Bundle (android.os.Bundle)1 QuizSubmissionQuestionListRecyclerAdapter (com.instructure.candroid.adapter.QuizSubmissionQuestionListRecyclerAdapter)1 QuizFileUploadListener (com.instructure.candroid.interfaces.QuizFileUploadListener)1 QuizPostEssay (com.instructure.candroid.interfaces.QuizPostEssay)1 QuizPostMatching (com.instructure.candroid.interfaces.QuizPostMatching)1 QuizPostMultiChoice (com.instructure.candroid.interfaces.QuizPostMultiChoice)1 QuizPostMultipleDropdown (com.instructure.candroid.interfaces.QuizPostMultipleDropdown)1 QuizPostNumerical (com.instructure.candroid.interfaces.QuizPostNumerical)1