Class Assignment

  • All Implemented Interfaces:
    java.lang.Cloneable

    public class Assignment
    extends java.lang.Object
    implements java.lang.Cloneable
    An Assignment indicates the various files and directories that will be employed during grading.
    • Constructor Summary

      Constructors 
      Constructor Description
      Assignment()
      Create an empty assignment.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Assignment clone()
      Copy an assignment.
      java.nio.file.Path getGoldDirectory()
      The gold directory is the location of an instructor's solution to the assignment.
      java.nio.file.Path getGoldStage()
      Get the staging directory for the gold version.
      boolean getHasInstructorCode()  
      boolean getInPlace()
      Should this assignment be graded "in place", rather than using a separate stage and recording area?
      java.nio.file.Path getInstructorCodeDirectory()
      The instructor code directory is the location of an instructor's code intended to be included along with the student-supplied code as part of the total build.
      java.nio.file.Path getManual()
      Instructors can assign manually assign grades to be included in the report.
      java.nio.file.Path getRecordingDirectory()
      The recording directory is the location where the student code will be compiled and tested.
      java.lang.String getSelectedStudent()  
      java.nio.file.Path getStagingDirectory()
      The staging directory is the location where the student code will be compiled and tested.
      java.nio.file.Path getSubmissionsDirectory()
      The submissions directory is the location of the collected submissions from an entire class.
      java.nio.file.Path getSubmitterStage​(Submission submission)
      Get the staging directory for the submitted version.
      java.nio.file.Path getTestSuiteDirectory()
      The test suite directory is the location of the test suite that will be used to evaluate the submissions.
      Assignment setGoldDirectory​(java.nio.file.Path path)
      Set the path to the gold directory.
      Assignment setHasInstructorCode​(boolean hasCode)
      Indicate whether instructor is supplying source code.
      void setInPlace​(boolean gradeInPlace)
      Mark this assignment as being graded "in place", rather than using a separate stage and recording area.
      Assignment setInstructorCodeDirectory​(java.nio.file.Path path)
      Set the path to the instructor code directory.
      Assignment setManual​(java.nio.file.Path path)
      Set the path to the manually assigned grades.
      Assignment setRecordingDirectory​(java.nio.file.Path path)
      Set the path to the recording directory.
      void setSelectedStudent​(java.lang.String selected)  
      Assignment setStagingDirectory​(java.nio.file.Path path)
      Set the path to the staging directory.
      Assignment setSubmissionsDirectory​(java.nio.file.Path path)
      Set the path to the submissions directory.
      Assignment setTestSuiteDirectory​(java.nio.file.Path path)
      Set the path to the test suite directory.
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Assignment

        public Assignment()
        Create an empty assignment.
    • Method Detail

      • getInstructorCodeDirectory

        public java.nio.file.Path getInstructorCodeDirectory()
        The instructor code directory is the location of an instructor's code intended to be included along with the student-supplied code as part of the total build. When a gold version (instructor's solution) is available, the instructor code directory will usually be the instructor code directory as well.
        Returns:
        the path to the directory containing instructor-supplied code or null if no instructor's code is supplied.
      • getHasInstructorCode

        public boolean getHasInstructorCode()
        Returns:
        true if there is instructor code to be copied along with the code from the submitter.
      • setHasInstructorCode

        public Assignment setHasInstructorCode​(boolean hasCode)
        Indicate whether instructor is supplying source code.
        Parameters:
        hasCode - true if there is instructor code to be copied along with the code from the submitter.
        Returns:
        the assignment
      • setInstructorCodeDirectory

        public Assignment setInstructorCodeDirectory​(java.nio.file.Path path)
        Set the path to the instructor code directory.
        Parameters:
        path - the path to use
        Returns:
        the modified assignment
      • getGoldDirectory

        public java.nio.file.Path getGoldDirectory()
        The gold directory is the location of an instructor's solution to the assignment. If available (non-null), the instructor's solution is run prior to each test of the student's submission in order to collect expected output and timing data.
        Returns:
        the path to the gold directory or null if no instructor's solution is being used.
      • setGoldDirectory

        public Assignment setGoldDirectory​(java.nio.file.Path path)
        Set the path to the gold directory.
        Parameters:
        path - the path to use
        Returns:
        the modified assignment
      • getSubmissionsDirectory

        public java.nio.file.Path getSubmissionsDirectory()
        The submissions directory is the location of the collected submissions from an entire class. Each subdirectory of this one represents one submission and should be named with the identifier of the student who submitted it.
        Returns:
        the path to the submissions directory.
      • setSubmissionsDirectory

        public Assignment setSubmissionsDirectory​(java.nio.file.Path path)
        Set the path to the submissions directory.
        Parameters:
        path - the path to use
        Returns:
        the modified assignment
      • getTestSuiteDirectory

        public java.nio.file.Path getTestSuiteDirectory()
        The test suite directory is the location of the test suite that will be used to evaluate the submissions. Each subdirectory of this one represents one test case and should be named with the identifier of the test case.
        Returns:
        the path to the test suite directory.
      • setTestSuiteDirectory

        public Assignment setTestSuiteDirectory​(java.nio.file.Path path)
        Set the path to the test suite directory.
        Parameters:
        path - the path to use
        Returns:
        the modified assignment
      • getStagingDirectory

        public java.nio.file.Path getStagingDirectory()
        The staging directory is the location where the student code will be compiled and tested.
        Returns:
        the path to the staging directory.
      • setStagingDirectory

        public Assignment setStagingDirectory​(java.nio.file.Path path)
        Set the path to the staging directory.
        Parameters:
        path - the path to use
        Returns:
        the modified assignment
      • getRecordingDirectory

        public java.nio.file.Path getRecordingDirectory()
        The recording directory is the location where the student code will be compiled and tested.
        Returns:
        the path to the recording directory.
      • setRecordingDirectory

        public Assignment setRecordingDirectory​(java.nio.file.Path path)
        Set the path to the recording directory.
        Parameters:
        path - the path to use
        Returns:
        the modified assignment
      • getManual

        public java.nio.file.Path getManual()
        Instructors can assign manually assign grades to be included in the report. These appear in ...TBD
        Returns:
        the path to the manually assigned grades.
      • setManual

        public Assignment setManual​(java.nio.file.Path path)
        Set the path to the manually assigned grades.
        Parameters:
        path - the path to use
        Returns:
        the modified assignment
      • clone

        public Assignment clone()
        Copy an assignment.
        Overrides:
        clone in class java.lang.Object
      • getSubmitterStage

        public java.nio.file.Path getSubmitterStage​(Submission submission)
        Get the staging directory for the submitted version.
        Parameters:
        submission - Identifies the submitter
        Returns:
        a subdirectory within the staging area.
      • getGoldStage

        public java.nio.file.Path getGoldStage()
        Get the staging directory for the gold version.
        Returns:
        a subdirectory within the staging area or null if no gold version is supplied.
      • setInPlace

        public void setInPlace​(boolean gradeInPlace)
        Mark this assignment as being graded "in place", rather than using a separate stage and recording area. Student code will be compiled and run in the submission directory and grade info will be recorded in the test suite directory.
        Parameters:
        gradeInPlace - true if this should be graded in place. False (default) if the original submission directory and test suite directory should left unchanged.
      • getInPlace

        public boolean getInPlace()
        Should this assignment be graded "in place", rather than using a separate stage and recording area?
        Returns:
        true iff in-place grading is desired
      • getSelectedStudent

        public java.lang.String getSelectedStudent()
      • setSelectedStudent

        public void setSelectedStudent​(java.lang.String selected)