Class: SakaiInfo::PublishedQuizSection
- Inherits:
-
QuizSection
- Object
- SakaiObject
- QuizSection
- SakaiInfo::PublishedQuizSection
- Defined in:
- lib/sakai-info/quiz.rb
Instance Attribute Summary
Attributes inherited from QuizSection
#dbrow, #description, #quiz, #sequence, #status, #title, #typeid
Attributes inherited from SakaiObject
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from QuizSection
all_serializations, count_by_quiz_id, #default_serialization, find_by_quiz_id, #initialize, #item_count, #items, #items_serialization, query_by_quiz_id, #quiz_summary_serialization, #summary_serialization
Methods included from ModProps
Methods inherited from SakaiObject
all_serializations, #dbrow_only_serialization, #dbrow_serialization, #default_serialization, descendants, #object_type_serialization, #serialize, #shell_serialization, #summary_serialization, #to_csv, #to_json, #to_yaml
Constructor Details
This class inherits a constructor from SakaiInfo::QuizSection
Class Method Details
.clear_cache ⇒ Object
530 531 532 |
# File 'lib/sakai-info/quiz.rb', line 530 def self.clear_cache @@cache = {} end |
.find(id) ⇒ Object
535 536 537 538 539 540 541 542 543 544 545 546 |
# File 'lib/sakai-info/quiz.rb', line 535 def self.find(id) id = id.to_s if @@cache[id].nil? row = DB.connect[:sam_publishedsection_t].where(:sectionid => id).first if row.nil? raise ObjectNotFoundException.new(PublishedQuizSection, id) end @@cache[id] = PublishedQuizSection.new(row) end @@cache[id] end |
Instance Method Details
#section_type ⇒ Object
548 549 550 |
# File 'lib/sakai-info/quiz.rb', line 548 def section_type "published" end |