All Downloads are FREE. Search and download functionalities are using the official Maven repository.

edu.ksu.canvas.interfaces.QuizSubmissionWriter Maven / Gradle / Ivy

There is a newer version: 2.0.0
Show newest version
package edu.ksu.canvas.interfaces;

import edu.ksu.canvas.model.assignment.QuizSubmission;
import edu.ksu.canvas.requestOptions.CompleteQuizSubmissionOptions;
import edu.ksu.canvas.requestOptions.StartQuizSubmissionOptions;

import java.io.IOException;
import java.util.Optional;

public interface QuizSubmissionWriter extends CanvasWriter {

    /**
     * Opens a quiz submission which can be used to answer questions and submit answers
     * @param options API options to be used to open a submission
     * @return The quiz submission object created by Canvas
     * @throws IOException If there is an error talking to Canvas
     */
    Optional startQuizSubmission(StartQuizSubmissionOptions options)throws IOException;

    /**
     * Finish a quiz submission. This turns it in and grades it. After this call, no further modifications are allowed.
     * @param options API options to be used in closing the submission
     * @return The quiz submission object returned by Canvas
     * @throws IOException If there is an error talking to Canvas
     */
    Optional completeQuizSubmission(CompleteQuizSubmissionOptions options) throws IOException;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy