Class: SakaiInfo::PublishedQuizItem
- Inherits:
-
QuizItem
- Object
- SakaiObject
- QuizItem
- SakaiInfo::PublishedQuizItem
- Defined in:
- lib/sakai-info/quiz.rb
Instance Attribute Summary
Attributes inherited from QuizItem
#dbrow, #quiz, #section, #sequence, #typeid
Attributes inherited from SakaiObject
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from QuizItem
all_serializations, class_for_type, count_by_quiz_id, count_by_section_id, #default_serialization, find_by_quiz_id, find_by_section_id, #initialize, query_by_quiz_id, query_by_section_id, #quiz_summary_serialization, #section_summary_serialization, #summary_serialization, table_name_for_type, #texts, #texts_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::QuizItem
Class Method Details
.clear_cache ⇒ Object
744 745 746 |
# File 'lib/sakai-info/quiz.rb', line 744 def self.clear_cache @@cache = {} end |
.find(id) ⇒ Object
749 750 751 752 753 754 755 756 757 758 759 760 |
# File 'lib/sakai-info/quiz.rb', line 749 def self.find(id) id = id.to_s if @@cache[id].nil? row = DB.connect[:sam_publisheditem_t].where(:itemid => id).first if row.nil? raise ObjectNotFoundException.new(PublishedQuizItem, id) end @@cache[id] = PublishedQuizItem.new(row) end @@cache[id] end |
Instance Method Details
#item_type ⇒ Object
762 763 764 |
# File 'lib/sakai-info/quiz.rb', line 762 def item_type "published" end |
#itemtext_table ⇒ Object
766 767 768 |
# File 'lib/sakai-info/quiz.rb', line 766 def itemtext_table :sam_publisheditemtext_t end |