class LUSI::API::Course::ModuleEvaluationCohort
Attributes
cohort_identity[RW]
@!attribute [rw] cohort identity
@return [String, nil] the identity code of the cohort
evaluation_date[RW]
@!attribute [rw] evaluation_date
@return [DateTime, nil] the start date of module evaluation for the cohort
week_identity[RW]
@!attribute [rw] week_identity
@return [String, nil] the starting week identity of module evaluation for the cohort
Public Class Methods
new(xml = nil, lookup = nil, cohort_identity: nil, evaluation_date: nil, week_identity: nil)
click to toggle source
Initialises a new ModuleEvaluationCohort
instance @param xml [Nokogiri::XML::Document, Nokogiri::XML::Node] the parsed XML root of the module evaluation cohort @param lookup [LUSI::API::Core::Lookup::LookupService, nil] the lookup service for object resolution @param cohort_identity
[String, nil] the default cohort identity code @param evaluation_date
[DateTime, nil] the default evaluation start date @param week_identity
[String, nil] the default evaluation start week identity @return [void]
# File lib/lusi_api/course.rb, line 834 def initialize(xml = nil, lookup = nil, cohort_identity: nil, evaluation_date: nil, week_identity: nil) @cohort_identity = LUSI::API::Core::XML.xml_int_at(xml, 'xmlns:CohortIdentity', cohort_identity) @evaluation_date = LUSI::API::Core::XML.xml_datetime_at(xml, 'xmlns:EvaluationDate', evaluation_date) @week_identity = LUSI::API::Core::XML.xml_content_at(xml, 'xmlns:WeekIdentity', week_identity) end
Public Instance Methods
to_s()
click to toggle source
Returns a string representation of the ModuleEvaluationCohort
instance @return [String] the string representation of the ModuleEvaluationCohort
instance
# File lib/lusi_api/course.rb, line 842 def to_s "#{@cohort_identity}: #{@evaluation_date}" end