Class: SakaiInfo::PendingQuizItem
- Inherits:
-
QuizItem
- Object
- SakaiObject
- QuizItem
- SakaiInfo::PendingQuizItem
- 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
716 717 718 |
# File 'lib/sakai-info/quiz.rb', line 716 def self.clear_cache @@cache = {} end |
.find(id) ⇒ Object
721 722 723 724 725 726 727 728 729 730 731 732 |
# File 'lib/sakai-info/quiz.rb', line 721 def self.find(id) id = id.to_s if @@cache[id].nil? row = DB.connect[:sam_item_t].where(:itemid => id).first if row.nil? raise ObjectNotFoundException.new(PendingQuizItem, id) end @@cache[id] = PendingQuizItem.new(row) end @@cache[id] end |
Instance Method Details
#item_type ⇒ Object
734 735 736 |
# File 'lib/sakai-info/quiz.rb', line 734 def item_type "pending" end |
#itemtext_table ⇒ Object
738 739 740 |
# File 'lib/sakai-info/quiz.rb', line 738 def itemtext_table :sam_itemtext_t end |