use of com.instructure.canvasapi2.models.QuizSubmissionQuestionResponse 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>() {
});
}
});
}
use of com.instructure.canvasapi2.models.QuizSubmissionQuestionResponse in project instructure-android by instructure.
the class QuizManager method postQuizQuestionMultipleDropdown.
public static void postQuizQuestionMultipleDropdown(QuizSubmission quizSubmission, long questionId, HashMap<String, Long> answers, 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.postQuizQuestionMultipleDropdown(quizSubmission, questionId, answers, adapter, params, callback);
}
use of com.instructure.canvasapi2.models.QuizSubmissionQuestionResponse in project instructure-android by instructure.
the class QuizManager method getQuizSubmissionQuestions.
public static void getQuizSubmissionQuestions(long quizSubmissionId, StatusCallback<QuizSubmissionQuestionResponse> callback) {
if (isTesting() || mTesting) {
QuizManager_Test.getQuizSubmissionQuestions(quizSubmissionId, callback);
} else {
RestBuilder adapter = new RestBuilder(callback);
RestParams params = new RestParams.Builder().withPerPageQueryParam(true).withShouldIgnoreToken(false).build();
QuizAPI.getQuizSubmissionQuestions(quizSubmissionId, adapter, callback, params);
}
}
use of com.instructure.canvasapi2.models.QuizSubmissionQuestionResponse in project instructure-android by instructure.
the class QuizManager method getNextPageSubmissionQuestions.
public static void getNextPageSubmissionQuestions(String nextUrl, 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.getNextPageSubmissionQuestions(nextUrl, adapter, params, callback);
}
use of com.instructure.canvasapi2.models.QuizSubmissionQuestionResponse in project instructure-android by instructure.
the class QuizManager method postQuizQuestionEssay.
public static void postQuizQuestionEssay(QuizSubmission quizSubmission, String 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.postQuizQuestionEssay(quizSubmission, questionId, answer, adapter, params, callback);
}
Aggregations