use of com.instructure.canvasapi2.models.CanvasContext in project instructure-android by instructure.
the class QuizManager method getDetailedQuiz.
public static void getDetailedQuiz(final CanvasContext canvasContext, long quizId, final boolean forceNetwork, final StatusCallback<Quiz> callback) {
final RestBuilder adapter = new RestBuilder(callback);
final RestParams params = new RestParams.Builder().withPerPageQueryParam(true).withShouldIgnoreToken(false).withForceReadFromNetwork(forceNetwork).build();
QuizAPI.getDetailedQuiz(canvasContext, quizId, adapter, params, callback);
}
use of com.instructure.canvasapi2.models.CanvasContext in project instructure-android by instructure.
the class QuizManager method postQuizSubmit.
public static void postQuizSubmit(CanvasContext canvasContext, QuizSubmission quizSubmission, boolean forceNetwork, final StatusCallback<QuizSubmissionResponse> callback) {
final RestBuilder adapter = new RestBuilder(callback);
final RestParams params = new RestParams.Builder().withPerPageQueryParam(true).withShouldIgnoreToken(false).withForceReadFromNetwork(forceNetwork).build();
QuizAPI.postQuizSubmit(canvasContext, quizSubmission, adapter, params, callback);
}
use of com.instructure.canvasapi2.models.CanvasContext in project instructure-android by instructure.
the class QuizManager method getQuizSubmissions.
public static void getQuizSubmissions(CanvasContext canvasContext, long quizId, final boolean forceNetwork, StatusCallback<QuizSubmissionResponse> callback) {
if (isTesting() || mTesting) {
QuizManager_Test.getQuizSubmissions(callback);
} else {
RestBuilder adapter = new RestBuilder(callback);
RestParams params = new RestParams.Builder().withPerPageQueryParam(true).withShouldIgnoreToken(false).withForceReadFromNetwork(forceNetwork).build();
QuizAPI.getQuizSubmissions(canvasContext, quizId, adapter, callback, params);
}
}
use of com.instructure.canvasapi2.models.CanvasContext in project instructure-android by instructure.
the class QuizManager method submitQuiz.
public static void submitQuiz(CanvasContext canvasContext, QuizSubmission quizSubmission, final boolean forceNetwork, final StatusCallback<QuizSubmissionResponse> callback) {
final RestBuilder adapter = new RestBuilder(callback);
final RestParams params = new RestParams.Builder().withPerPageQueryParam(true).withShouldIgnoreToken(false).withForceReadFromNetwork(forceNetwork).build();
QuizAPI.submitQuiz(canvasContext, quizSubmission, adapter, params, callback);
}
use of com.instructure.canvasapi2.models.CanvasContext in project instructure-android by instructure.
the class SubmissionManager method postTextSubmission.
public static void postTextSubmission(CanvasContext canvasContext, long assignmentId, String text, StatusCallback<Submission> callback) {
if (isTesting() || mTesting) {
// TODO
} else {
RestBuilder adapter = new RestBuilder(callback);
RestParams params = new RestParams.Builder().withCanvasContext(canvasContext).build();
SubmissionAPI.postTextSubmission(canvasContext.getId(), assignmentId, text, adapter, params, callback);
}
}
Aggregations