SnapContentInteractivateLesson Class Reference
[Content Modules]

Content Module for Interactivate Lesson Plans. More...

Inheritance diagram for SnapContentInteractivateLesson:

Inheritance graph
[legend]

List of all members.

Public Member Functions

 addFollowUp ($content)
 adds a follow up activity
 addKeyTerm ($term)
 Adds a key term for this lesson.
 addObjective ($obj)
 Adds an objective for what should be accomplished in the lesson.
 addPrerequisite ($cat, $pre)
 Adds a prerequisite If the given prerequisite category is not yet set this funciton will set it.
 addPrerequisiteCategory ($cat)
 Adds a new categy for Prerequisites Prerequisites are grouped into categories (eg: math, geometry, technology, etc...). The prerequisites themselves must then be added to these categories.
 addSection ($name, $content)
 Adds another section to the class This is a kind of pseudo-XML, allowing the writer to add any kind of other content they want.
 checkMedia ()
 INSERT BRIEF DESCRIPTION HERE.
 clearFollowUps ()
 clears the currently set follow ups
 clearKeyTerms ()
 Clears out the current key terms.
 clearObjectives ()
 Clears the currently set objectives.
 clearPrerequisites ()
 Clears the currently set Prerequisites.
 clearSections ()
 Clears out all the currently set Sections.
 getAbstract ()
 INSERT BRIEF DESCRIPTION HERE.
 getAlternate ()
 INSERT BRIEF DESCRIPTION HERE.
 getFollowUpIntro ()
 INSERT BRIEF DESCRIPTION HERE.
 getFollowUps ()
 INSERT BRIEF DESCRIPTION HERE.
 getKeyTerms ()
 INSERT BRIEF DESCRIPTION HERE.
 getLoadErrors ()
 INSERT BRIEF DESCRIPTION HERE.
 getObjectives ()
 INSERT BRIEF DESCRIPTION HERE.
 getPreparations ()
 INSERT BRIEF DESCRIPTION HERE.
 getPrerequisites ()
 INSERT BRIEF DESCRIPTION HERE.
 getSections ()
 INSERT BRIEF DESCRIPTION HERE.
 getTitle ()
 INSERT BRIEF DESCRIPTION HERE.
 getXML ()
 Retrieve raw XML from content module.
 loadFromXML ($content)
 INSERT BRIEF DESCRIPTION HERE.
 setAbstract ($abstract)
 Sets the lesson abstract, which briefly explains what the lesson involves.
 setAlternate ($content)
 Sets an alternate lesson outline.
 setFollowUpIntro ($content)
 sets the intro into the follow up.
 setPreparations ($content)
 Sets the various preparations necessary to teach this class.
 setTitle ($title)
 Sets the Title of the lesson that the user will see.
 updateFileList ()
 INSERT BRIEF DESCRIPTION HERE.

Static Public Member Functions

static initialValue ()
 Returns initial value for new versions of this type.

Protected Member Functions

 doGetHTML ($params)
 INSERT BRIEF DESCRIPTION HERE.
 generateXML ()
 INSERT BRIEF DESCRIPTION HERE.
 prepareAndValidateXML ($content, $field, $pre= '', $post= '')
 Massages and validates a chunk of XML.
 validate ()
 INSERT BRIEF DESCRIPTION HERE.

Private Member Functions

 grabBlockSection ($xml, $xpath, $trimTag= 'p')
 INSERT BRIEF DESCRIPTION HERE.
 grabListItems ($xml, $xpath)
 INSERT BRIEF DESCRIPTION HERE.


Detailed Description

Content Module for Interactivate Lesson Plans.

This content module contains support for lesson-plans for Interactivate, which is very different from standard lesson-plan XML (the two are not compatible). This generates HTML for the Interactivate Lesson Pages. (Note, however, that the information stored in the database is NOT Standard XML or HTML but rather the values of a number of attributes, from which HTML is generated when getHTML is called.) There were a number of fields in the old Interactivate database that made up the lesson plans. These have been replaced with fairly comparable fields in this ContentModule.

Definition at line 17 of file SnapContentInteractivateLesson.php5.


Member Function Documentation

SnapContentInteractivateLesson::addFollowUp ( content  ) 

adds a follow up activity

Returns:
[boolean]: success or failure.

Definition at line 270 of file SnapContentInteractivateLesson.php5.

References prepareAndValidateXML().

Referenced by loadFromXML().

SnapContentInteractivateLesson::addKeyTerm ( term  ) 

Adds a key term for this lesson.

Parameters:
$term [string]: The term to be associated.
Returns:
[boolean]: success or failure.

Definition at line 188 of file SnapContentInteractivateLesson.php5.

Referenced by loadFromXML().

SnapContentInteractivateLesson::addObjective ( obj  ) 

Adds an objective for what should be accomplished in the lesson.

Parameters:
$obj [string]: The new objective
Returns:
[boolean]: success or failure.

Definition at line 95 of file SnapContentInteractivateLesson.php5.

References prepareAndValidateXML().

Referenced by loadFromXML().

SnapContentInteractivateLesson::addPrerequisite ( cat,
pre 
)

Adds a prerequisite If the given prerequisite category is not yet set this funciton will set it.

Parameters:
$cat [string]: The category to add this prerequisite to.
$pre [string]: The prerequisite that must be completed.
Returns:
[boolean]: success or failure.

Definition at line 142 of file SnapContentInteractivateLesson.php5.

References prepareAndValidateXML().

Referenced by loadFromXML().

SnapContentInteractivateLesson::addPrerequisiteCategory ( cat  ) 

Adds a new categy for Prerequisites Prerequisites are grouped into categories (eg: math, geometry, technology, etc...). The prerequisites themselves must then be added to these categories.

Parameters:
$cat [string]: The new category
Returns:
[boolean]: success or failure.

Definition at line 121 of file SnapContentInteractivateLesson.php5.

References prepareAndValidateXML().

Referenced by loadFromXML().

SnapContentInteractivateLesson::addSection ( name,
content 
)

Adds another section to the class This is a kind of pseudo-XML, allowing the writer to add any kind of other content they want.

Parameters:
$name [string]: The name of the section
$content [string]: What you want this section to say.
Returns:
[boolean]: success or failure.

Definition at line 218 of file SnapContentInteractivateLesson.php5.

References prepareAndValidateXML().

Referenced by loadFromXML().

SnapContentInteractivateLesson::checkMedia (  ) 

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

Returns:
[TYPE]: RETURN DESCRIPTION

Reimplemented from SnapContent.

Definition at line 717 of file SnapContentInteractivateLesson.php5.

SnapContentInteractivateLesson::doGetHTML ( params  )  [protected]

INSERT BRIEF DESCRIPTION HERE.

For internal use only.

INSERT FULL DESCRIPTION HERE

Parameters:
$params [TYPE]: DESCRIPTION
Returns:
[TYPE]: RETURN DESCRIPTION

Reimplemented from SnapContent.

Definition at line 706 of file SnapContentInteractivateLesson.php5.

References SnapContent::getAll().

SnapContentInteractivateLesson::generateXML (  )  [protected]

INSERT BRIEF DESCRIPTION HERE.

For internal use only.

INSERT FULL DESCRIPTION HERE

Returns:
[TYPE]: RETURN DESCRIPTION

Definition at line 447 of file SnapContentInteractivateLesson.php5.

References XmlFormatter::finalGenerateXML(), and prepareAndValidateXML().

Referenced by getXML().

SnapContentInteractivateLesson::getAbstract (  ) 

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

Returns:
[TYPE]: RETURN DESCRIPTION

Definition at line 579 of file SnapContentInteractivateLesson.php5.

SnapContentInteractivateLesson::getAlternate (  ) 

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

Returns:
[TYPE]: RETURN DESCRIPTION

Definition at line 649 of file SnapContentInteractivateLesson.php5.

SnapContentInteractivateLesson::getFollowUpIntro (  ) 

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

Returns:
[TYPE]: RETURN DESCRIPTION

Definition at line 672 of file SnapContentInteractivateLesson.php5.

SnapContentInteractivateLesson::getFollowUps (  ) 

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

Returns:
[TYPE]: RETURN DESCRIPTION

Definition at line 660 of file SnapContentInteractivateLesson.php5.

SnapContentInteractivateLesson::getKeyTerms (  ) 

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

Returns:
[TYPE]: RETURN DESCRIPTION

Definition at line 625 of file SnapContentInteractivateLesson.php5.

SnapContentInteractivateLesson::getLoadErrors (  ) 

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

Returns:
[TYPE]: RETURN DESCRIPTION

Definition at line 683 of file SnapContentInteractivateLesson.php5.

SnapContentInteractivateLesson::getObjectives (  ) 

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

Returns:
[TYPE]: RETURN DESCRIPTION

Definition at line 590 of file SnapContentInteractivateLesson.php5.

SnapContentInteractivateLesson::getPreparations (  ) 

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

Returns:
[TYPE]: RETURN DESCRIPTION

Definition at line 614 of file SnapContentInteractivateLesson.php5.

SnapContentInteractivateLesson::getPrerequisites (  ) 

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

Returns:
[TYPE]: RETURN DESCRIPTION

Definition at line 602 of file SnapContentInteractivateLesson.php5.

SnapContentInteractivateLesson::getSections (  ) 

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

Returns:
[TYPE]: RETURN DESCRIPTION

Definition at line 637 of file SnapContentInteractivateLesson.php5.

SnapContentInteractivateLesson::getTitle (  ) 

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

Returns:
[TYPE]: RETURN DESCRIPTION

Definition at line 568 of file SnapContentInteractivateLesson.php5.

SnapContentInteractivateLesson::getXML (  ) 

Retrieve raw XML from content module.

Calling getHTML(), which is the normal method to extract content from a content module, will return translated XML => HTML. To get the raw XML, use this method.

Returns:
[string]: XML contained in this content module

Definition at line 426 of file SnapContentInteractivateLesson.php5.

References generateXML(), and SObject::setError().

SnapContentInteractivateLesson::grabBlockSection ( xml,
xpath,
trimTag = 'p' 
) [private]

INSERT BRIEF DESCRIPTION HERE.

For internal use only.

INSERT FULL DESCRIPTION HERE

Parameters:
$xml [TYPE]: DESCRIPTION
$xpath [TYPE]: DESCRIPTION
$trimTag [TYPE]: DESCRIPTION
Returns:
[TYPE]: RETURN DESCRIPTION

Definition at line 290 of file SnapContentInteractivateLesson.php5.

Referenced by loadFromXML().

SnapContentInteractivateLesson::grabListItems ( xml,
xpath 
) [private]

INSERT BRIEF DESCRIPTION HERE.

For internal use only.

INSERT FULL DESCRIPTION HERE

Parameters:
$xml [TYPE]: DESCRIPTION
$xpath [TYPE]: DESCRIPTION
Returns:
[TYPE]: RETURN DESCRIPTION

Definition at line 314 of file SnapContentInteractivateLesson.php5.

Referenced by loadFromXML().

static SnapContentInteractivateLesson::initialValue (  )  [static]

Returns initial value for new versions of this type.

For internal use only.

Definition at line 735 of file SnapContentInteractivateLesson.php5.

SnapContentInteractivateLesson::loadFromXML ( content  ) 

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

Parameters:
$content [TYPE]: DESCRIPTION
Returns:
[TYPE]: RETURN DESCRIPTION

Definition at line 333 of file SnapContentInteractivateLesson.php5.

References addFollowUp(), addKeyTerm(), addObjective(), addPrerequisite(), addPrerequisiteCategory(), addSection(), grabBlockSection(), grabListItems(), setAbstract(), setAlternate(), setFollowUpIntro(), setPreparations(), and setTitle().

SnapContentInteractivateLesson::prepareAndValidateXML ( content,
field,
pre = '',
post = '' 
) [protected]

Massages and validates a chunk of XML.

For internal use only.

This method is used to format a chunk of XML and validate it before putting it in the database. It gathers useful error information, which can be passed back to the user. The error information is stored in the $loadErrors member array.

Parameters:
$content [string]: raw XML to be processed
$field [string]: name of field from which XML came (e.g., alternate outline)
$pre [string]: prepend this string to the XML before processing it
$post [string]: append this string to the XML before processing it
Returns:
[string]: formatted and validated XML, or false on error

Definition at line 36 of file SnapContentInteractivateLesson.php5.

References SXMLHelper::formatXML(), and SXMLHelper::validateXML().

Referenced by addFollowUp(), addObjective(), addPrerequisite(), addPrerequisiteCategory(), addSection(), generateXML(), setAbstract(), setAlternate(), setFollowUpIntro(), and setPreparations().

SnapContentInteractivateLesson::setAbstract ( abstract  ) 

Sets the lesson abstract, which briefly explains what the lesson involves.

Parameters:
$abstract [string]: the new abstract
Returns:
[boolean]: success or failure.

Definition at line 75 of file SnapContentInteractivateLesson.php5.

References prepareAndValidateXML().

Referenced by loadFromXML().

SnapContentInteractivateLesson::setAlternate ( content  ) 

Sets an alternate lesson outline.

Parameters:
$content [string]: the alternate outline
Returns:
[boolean]: success or failure.

Definition at line 239 of file SnapContentInteractivateLesson.php5.

References prepareAndValidateXML().

Referenced by loadFromXML().

SnapContentInteractivateLesson::setFollowUpIntro ( content  ) 

sets the intro into the follow up.

Returns:
[boolean]: success or failure.

Definition at line 258 of file SnapContentInteractivateLesson.php5.

References prepareAndValidateXML().

Referenced by loadFromXML().

SnapContentInteractivateLesson::setPreparations ( content  ) 

Sets the various preparations necessary to teach this class.

Parameters:
$content [string]: the preparations.
Returns:
[boolean]: success or failure.

Definition at line 167 of file SnapContentInteractivateLesson.php5.

References prepareAndValidateXML().

Referenced by loadFromXML().

SnapContentInteractivateLesson::setTitle ( title  ) 

Sets the Title of the lesson that the user will see.

Parameters:
$title [string]: the new title
Returns:
[boolean]: success or failure.

Definition at line 66 of file SnapContentInteractivateLesson.php5.

Referenced by loadFromXML().

SnapContentInteractivateLesson::updateFileList (  ) 

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

Returns:
[TYPE]: RETURN DESCRIPTION

Reimplemented from SnapContent.

Definition at line 728 of file SnapContentInteractivateLesson.php5.

SnapContentInteractivateLesson::validate (  )  [protected]

INSERT BRIEF DESCRIPTION HERE.

For internal use only.

INSERT FULL DESCRIPTION HERE

Returns:
[TYPE]: RETURN DESCRIPTION

Reimplemented from SnapContent.

Definition at line 694 of file SnapContentInteractivateLesson.php5.


The documentation for this class was generated from the following file:

Generated on Wed Nov 24 02:06:21 2010 for Common by  doxygen 1.5.6