Class: SakaiInfo::PendingQuizSection
- Inherits:
-
QuizSection
- Object
- SakaiObject
- QuizSection
- SakaiInfo::PendingQuizSection
- 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
506 507 508 |
# File 'lib/sakai-info/quiz.rb', line 506 def self.clear_cache @@cache = {} end |
.find(id) ⇒ Object
511 512 513 514 515 516 517 518 519 520 521 522 |
# File 'lib/sakai-info/quiz.rb', line 511 def self.find(id) id = id.to_s if @@cache[id].nil? row = DB.connect[:sam_section_t].where(:sectionid => id).first if row.nil? raise ObjectNotFoundException.new(PendingQuizSection, id) end @@cache[id] = PendingQuizSection.new(row) end @@cache[id] end |
Instance Method Details
#section_type ⇒ Object
524 525 526 |
# File 'lib/sakai-info/quiz.rb', line 524 def section_type "pending" end |