Class: SakaiInfo::QuizAuthorization
- Inherits:
-
SakaiObject
- Object
- SakaiObject
- SakaiInfo::QuizAuthorization
- Includes:
- ModProps
- Defined in:
- lib/sakai-info/quiz.rb
Overview
authorization
Direct Known Subclasses
Instance Attribute Summary collapse
-
#dbrow ⇒ Object
readonly
Returns the value of attribute dbrow.
-
#ends_at ⇒ Object
readonly
Returns the value of attribute ends_at.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#starts_at ⇒ Object
readonly
Returns the value of attribute starts_at.
Instance Method Summary collapse
- #default_serialization ⇒ Object
-
#initialize(dbrow) ⇒ QuizAuthorization
constructor
A new instance of QuizAuthorization.
- #quiz_summary_serialization ⇒ Object
Methods included from ModProps
Methods inherited from SakaiObject
all_serializations, #dbrow_only_serialization, #dbrow_serialization, descendants, #object_type_serialization, #serialize, #shell_serialization, #summary_serialization, #to_csv, #to_json, #to_yaml
Constructor Details
#initialize(dbrow) ⇒ QuizAuthorization
Returns a new instance of QuizAuthorization.
1459 1460 1461 1462 1463 1464 1465 1466 1467 |
# File 'lib/sakai-info/quiz.rb', line 1459 def initialize(dbrow) @dbrow = dbrow @id = dbrow[:id] @agent_id = dbrow[:agentid] @name = dbrow[:functionid] @quiz_id = dbrow[:qualifierid] @starts_at = dbrow[:effectivedate] @ends_at = dbrow[:expirationdate] end |
Instance Attribute Details
#dbrow ⇒ Object (readonly)
Returns the value of attribute dbrow.
1451 1452 1453 |
# File 'lib/sakai-info/quiz.rb', line 1451 def dbrow @dbrow end |
#ends_at ⇒ Object (readonly)
Returns the value of attribute ends_at.
1451 1452 1453 |
# File 'lib/sakai-info/quiz.rb', line 1451 def ends_at @ends_at end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
1451 1452 1453 |
# File 'lib/sakai-info/quiz.rb', line 1451 def id @id end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
1451 1452 1453 |
# File 'lib/sakai-info/quiz.rb', line 1451 def name @name end |
#starts_at ⇒ Object (readonly)
Returns the value of attribute starts_at.
1451 1452 1453 |
# File 'lib/sakai-info/quiz.rb', line 1451 def starts_at @starts_at end |
Instance Method Details
#default_serialization ⇒ Object
1469 1470 1471 1472 1473 1474 1475 1476 |
# File 'lib/sakai-info/quiz.rb', line 1469 def default_serialization { "id" => self.id, "quiz" => self.quiz.serialize(:summary), "name" => self.name, "agent" => @agent_id, } end |
#quiz_summary_serialization ⇒ Object
1478 1479 1480 1481 1482 1483 |
# File 'lib/sakai-info/quiz.rb', line 1478 def quiz_summary_serialization { "name" => self.name, "agent" => @agent_id, } end |