Record Class PrairieLearnService.AssessmentInfo

java.lang.Object
java.lang.Record
edu.ucsb.cs.scaffold.services.PrairieLearnService.AssessmentInfo
Enclosing class:
PrairieLearnService

public static record PrairieLearnService.AssessmentInfo(Long assessmentId, String assessmentName, String assessmentNumber, Long assessmentOrderBy, String title, String assessmentSetAbbreviation, Integer assessmentSetNumber, String assessmentSetHeading, String assessmentSetColor) extends Record
One assessment from the /course_instances/{id}/assessments response — the fields PlAssessment stores (issue #71). assessmentName matches the assessment's directory name in the GitHub repo (PlAssessment.name), which is how the two sources are joined.
  • Constructor Details

    • AssessmentInfo

      public AssessmentInfo(Long assessmentId, String assessmentName, String assessmentNumber, Long assessmentOrderBy, String title, String assessmentSetAbbreviation, Integer assessmentSetNumber, String assessmentSetHeading, String assessmentSetColor)
      Creates an instance of a AssessmentInfo record class.
      Parameters:
      assessmentId - the value for the assessmentId record component
      assessmentName - the value for the assessmentName record component
      assessmentNumber - the value for the assessmentNumber record component
      assessmentOrderBy - the value for the assessmentOrderBy record component
      title - the value for the title record component
      assessmentSetAbbreviation - the value for the assessmentSetAbbreviation record component
      assessmentSetNumber - the value for the assessmentSetNumber record component
      assessmentSetHeading - the value for the assessmentSetHeading record component
      assessmentSetColor - the value for the assessmentSetColor record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • assessmentId

      public Long assessmentId()
      Returns the value of the assessmentId record component.
      Returns:
      the value of the assessmentId record component
    • assessmentName

      public String assessmentName()
      Returns the value of the assessmentName record component.
      Returns:
      the value of the assessmentName record component
    • assessmentNumber

      public String assessmentNumber()
      Returns the value of the assessmentNumber record component.
      Returns:
      the value of the assessmentNumber record component
    • assessmentOrderBy

      public Long assessmentOrderBy()
      Returns the value of the assessmentOrderBy record component.
      Returns:
      the value of the assessmentOrderBy record component
    • title

      public String title()
      Returns the value of the title record component.
      Returns:
      the value of the title record component
    • assessmentSetAbbreviation

      public String assessmentSetAbbreviation()
      Returns the value of the assessmentSetAbbreviation record component.
      Returns:
      the value of the assessmentSetAbbreviation record component
    • assessmentSetNumber

      public Integer assessmentSetNumber()
      Returns the value of the assessmentSetNumber record component.
      Returns:
      the value of the assessmentSetNumber record component
    • assessmentSetHeading

      public String assessmentSetHeading()
      Returns the value of the assessmentSetHeading record component.
      Returns:
      the value of the assessmentSetHeading record component
    • assessmentSetColor

      public String assessmentSetColor()
      Returns the value of the assessmentSetColor record component.
      Returns:
      the value of the assessmentSetColor record component