SnapContentLessonPlan Class Reference
[Content Modules]

Lesson Plan Content Module. More...

Inheritance diagram for SnapContentLessonPlan:

Inheritance graph
[legend]

List of all members.

Public Member Functions

 cctHelper ($matches)
 INSERT BRIEF DESCRIPTION HERE.
 checkMedia ()
 INSERT BRIEF DESCRIPTION HERE.
 clearErrors ()
 INSERT BRIEF DESCRIPTION HERE.
 fixLitBlocks ($matches)
 INSERT BRIEF DESCRIPTION HERE.
 fixPreBlocks ($matches)
 INSERT BRIEF DESCRIPTION HERE.
 getErrors ()
 INSERT BRIEF DESCRIPTION HERE.
 getEvent ($whichEvent)
 Retrieves a particular event; each step in a lesson outline is an "event" and has an estimated time to be spent on the event and paragraph or two describing what should be done at this phase of the lesson plan.
 getEventContent ($whichEvent)
 Retrieves content of specified event.
 getEventName ($whichEvent)
 Retrives name of specified event.
 getEvents ()
 Retrieves list of all events.
 getEventTime ($whichEvent)
 Retrieves time of specified event.
 getGradeLevel ()
 Retrieves grade level that lesson plan applies to This is a string such as "Grade 6," "Kindergarten," "Year 2," or "Preschool.".
 getKeyTerms ()
 INSERT BRIEF DESCRIPTION HERE.
 getLessonAbstract ()
 Retrieves abstract that describes lesson.
 getLessonTitle ()
 Retrieves lesson title.
 getMediaUsed ()
 Retrieves a list of media items used in this lesson.
 getObjectives ()
 Retrieves list of objectives of this lesson.
 getOutlineFieldNames ()
 INSERT BRIEF DESCRIPTION HERE.
 getOutlineFields ()
 INSERT BRIEF DESCRIPTION HERE.
 getOutlineType ()
 INSERT BRIEF DESCRIPTION HERE.
 getPrereqs ()
 Retrieves a description of prerequisites required for this lesson.
 getRequiredEquipment ()
 Retrieves a list of equipment required for this lesson.
 getRequiredMaterials ()
 Retrieves list of materials needed for this lesson.
 getSafety ()
 Retrieves safety information for this lesson.
 getStandardsAddressed ()
 Retrieves list of standards that are addressed by the lesson.
 getTeacherPrep ()
 Retrieves a description of what the teacher should do to prepare for the lesson.
 getWhichOutline ()
 Retrieves the 'whichOutline' key for this lesson plan.
 getXML ()
 Retrieves XML form of this lesson plan.
 litHelper ($matches)
 INSERT BRIEF DESCRIPTION HERE.
 setOutlineField ($sname, $time, $content)
 INSERT BRIEF DESCRIPTION HERE.
 setOutlineType ($type)
 INSERT BRIEF DESCRIPTION HERE.
 setStandardFields ($contentArray)
 Sets the content of the lesson plan.
 updateFileList ()
 INSERT BRIEF DESCRIPTION HERE.

Static Public Attributes

static $NICE_NAMES

Protected Member Functions

 doGetHTML ($params)
 INSERT BRIEF DESCRIPTION HERE.
 isKeyValid ($key, &$array)
 INSERT BRIEF DESCRIPTION HERE.
 validate ()
 INSERT BRIEF DESCRIPTION HERE.

Private Member Functions

 generateXML ($save=false)
 INSERT BRIEF DESCRIPTION HERE.
 prepareXML ($str, $field)
 INSERT BRIEF DESCRIPTION HERE.


Detailed Description

Lesson Plan Content Module.

This content module contains support for lesson-plan XML (which is just Standard XML 3.0 with a special translator: STransLessonPlan). A lesson plan contains many sections which have special code to deal with them in this class. But ultimately, Standard XML is generated. (Note, however, that the information stored in the database is NOT Standard XML but rather the values of a number of attributes, from which XML is generated when getXML is called.)

Definition at line 13 of file SnapContentLessonPlan.php5.


Member Function Documentation

SnapContentLessonPlan::cctHelper ( matches  ) 

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

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

Definition at line 296 of file SnapContentLessonPlan.php5.

SnapContentLessonPlan::checkMedia (  ) 

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

Returns:
[TYPE]: RETURN DESCRIPTION

Reimplemented from SnapContent.

Definition at line 824 of file SnapContentLessonPlan.php5.

SnapContentLessonPlan::clearErrors (  ) 

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

Returns:
[TYPE]: RETURN DESCRIPTION

Definition at line 284 of file SnapContentLessonPlan.php5.

SnapContentLessonPlan::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 813 of file SnapContentLessonPlan.php5.

References SnapContent::getAll().

SnapContentLessonPlan::fixLitBlocks ( matches  ) 

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

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

Definition at line 361 of file SnapContentLessonPlan.php5.

SnapContentLessonPlan::fixPreBlocks ( matches  ) 

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

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

Definition at line 349 of file SnapContentLessonPlan.php5.

SnapContentLessonPlan::generateXML ( save = false  )  [private]

INSERT BRIEF DESCRIPTION HERE.

For internal use only.

INSERT FULL DESCRIPTION HERE

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

Definition at line 510 of file SnapContentLessonPlan.php5.

References prepareXML(), SObject::setWarning(), and SXMLHelper::validateXML().

Referenced by getXML(), and setStandardFields().

SnapContentLessonPlan::getErrors (  ) 

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

Returns:
[TYPE]: RETURN DESCRIPTION

Definition at line 273 of file SnapContentLessonPlan.php5.

SnapContentLessonPlan::getEvent ( whichEvent  ) 

Retrieves a particular event; each step in a lesson outline is an "event" and has an estimated time to be spent on the event and paragraph or two describing what should be done at this phase of the lesson plan.

Parameters:
$whichEvent [integer]: number of event to retrieve from events array. Events are ordered by their order in the lesson plan.
Returns:
[array]: event specified by $whichEvent, which has three keys: name (the name of the event), time (the estimated time to be spent on event), and content (paragraphs formatted in Standard XML describing the event).

Definition at line 751 of file SnapContentLessonPlan.php5.

References getEvents().

Referenced by getEventContent(), getEventName(), and getEventTime().

SnapContentLessonPlan::getEventContent ( whichEvent  ) 

Retrieves content of specified event.

Parameters:
$whichEvent [integer]: event to retrieve content for
Returns:
[string]: content of event, in Standard XML format.

Definition at line 789 of file SnapContentLessonPlan.php5.

References getEvent().

SnapContentLessonPlan::getEventName ( whichEvent  ) 

Retrives name of specified event.

Parameters:
$whichEvent [integer]: event to retrieve name for
Returns:
[string]: name of event

Definition at line 769 of file SnapContentLessonPlan.php5.

References getEvent().

SnapContentLessonPlan::getEvents (  ) 

Retrieves list of all events.

Returns:
[array]: list of events; each event is an array with three keys. (see getEvent)

Definition at line 760 of file SnapContentLessonPlan.php5.

Referenced by getEvent().

SnapContentLessonPlan::getEventTime ( whichEvent  ) 

Retrieves time of specified event.

Parameters:
$whichEvent [integer]: event to retrieve time for
Returns:
[string]: time of event

Definition at line 779 of file SnapContentLessonPlan.php5.

References getEvent().

SnapContentLessonPlan::getGradeLevel (  ) 

Retrieves grade level that lesson plan applies to This is a string such as "Grade 6," "Kindergarten," "Year 2," or "Preschool.".

Returns:
[string]: grade level

Definition at line 660 of file SnapContentLessonPlan.php5.

SnapContentLessonPlan::getKeyTerms (  ) 

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

Returns:
[TYPE]: RETURN DESCRIPTION

Definition at line 742 of file SnapContentLessonPlan.php5.

SnapContentLessonPlan::getLessonAbstract (  ) 

Retrieves abstract that describes lesson.

Returns:
[string]: lesson abstract

Definition at line 668 of file SnapContentLessonPlan.php5.

SnapContentLessonPlan::getLessonTitle (  ) 

Retrieves lesson title.

Returns:
[string]: title of lesson

Definition at line 651 of file SnapContentLessonPlan.php5.

SnapContentLessonPlan::getMediaUsed (  ) 

Retrieves a list of media items used in this lesson.

Returns:
[array]: list of media items

Definition at line 715 of file SnapContentLessonPlan.php5.

SnapContentLessonPlan::getObjectives (  ) 

Retrieves list of objectives of this lesson.

Returns:
[array]: list of objectives

Definition at line 684 of file SnapContentLessonPlan.php5.

SnapContentLessonPlan::getOutlineFieldNames (  ) 

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

Returns:
[TYPE]: RETURN DESCRIPTION

Definition at line 458 of file SnapContentLessonPlan.php5.

SnapContentLessonPlan::getOutlineFields (  ) 

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

Returns:
[TYPE]: RETURN DESCRIPTION

Definition at line 469 of file SnapContentLessonPlan.php5.

SnapContentLessonPlan::getOutlineType (  ) 

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

Returns:
[TYPE]: RETURN DESCRIPTION

Definition at line 447 of file SnapContentLessonPlan.php5.

SnapContentLessonPlan::getPrereqs (  ) 

Retrieves a description of prerequisites required for this lesson.

Returns:
[string]: description of prerequisites

Definition at line 692 of file SnapContentLessonPlan.php5.

SnapContentLessonPlan::getRequiredEquipment (  ) 

Retrieves a list of equipment required for this lesson.

Returns:
[array]: list of required equipment

Definition at line 723 of file SnapContentLessonPlan.php5.

SnapContentLessonPlan::getRequiredMaterials (  ) 

Retrieves list of materials needed for this lesson.

Returns:
[array]: list of materials

Definition at line 707 of file SnapContentLessonPlan.php5.

SnapContentLessonPlan::getSafety (  ) 

Retrieves safety information for this lesson.

Returns:
[string]: safety information

Definition at line 731 of file SnapContentLessonPlan.php5.

SnapContentLessonPlan::getStandardsAddressed (  ) 

Retrieves list of standards that are addressed by the lesson.

Returns:
[array]: list of standards

Definition at line 676 of file SnapContentLessonPlan.php5.

SnapContentLessonPlan::getTeacherPrep (  ) 

Retrieves a description of what the teacher should do to prepare for the lesson.

Returns:
[string]: teacher preparation for the lesson

Definition at line 699 of file SnapContentLessonPlan.php5.

SnapContentLessonPlan::getWhichOutline (  ) 

Retrieves the 'whichOutline' key for this lesson plan.

The 'whichOutline' key specifies which type of lesson plan is being used (for those components that differ among the lesson plan types)

Returns:
[integer]: an index to refer to which outline is being used. Currently, only one exists--the default, outline 1. (Zero is not a valid outline.)

Definition at line 482 of file SnapContentLessonPlan.php5.

SnapContentLessonPlan::getXML (  ) 

Retrieves XML form of this lesson plan.

This method converts the information about the lesson plan to Standard XML 3.0 and returns that. The XML returned is meant to be translated by STransLessonPlan.

Returns:
[string]: string of XML representing lesson plan

Definition at line 494 of file SnapContentLessonPlan.php5.

References generateXML().

SnapContentLessonPlan::isKeyValid ( key,
&$  array 
) [protected]

INSERT BRIEF DESCRIPTION HERE.

For internal use only.

INSERT FULL DESCRIPTION HERE

Parameters:
$key [TYPE]: DESCRIPTION
&$array [TYPE]: DESCRIPTION
Returns:
[TYPE]: RETURN DESCRIPTION

Definition at line 381 of file SnapContentLessonPlan.php5.

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

Referenced by setStandardFields().

SnapContentLessonPlan::litHelper ( matches  ) 

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

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

Definition at line 308 of file SnapContentLessonPlan.php5.

SnapContentLessonPlan::prepareXML ( str,
field 
) [private]

INSERT BRIEF DESCRIPTION HERE.

For internal use only.

INSERT FULL DESCRIPTION HERE

Parameters:
$str [TYPE]: DESCRIPTION
$field [TYPE]: DESCRIPTION
Returns:
[TYPE]: RETURN DESCRIPTION

Definition at line 321 of file SnapContentLessonPlan.php5.

References EscapeParser::parseString().

Referenced by generateXML(), isKeyValid(), and setOutlineField().

SnapContentLessonPlan::setOutlineField ( sname,
time,
content 
)

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

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

Definition at line 211 of file SnapContentLessonPlan.php5.

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

SnapContentLessonPlan::setOutlineType ( type  ) 

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

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

Definition at line 177 of file SnapContentLessonPlan.php5.

SnapContentLessonPlan::setStandardFields ( contentArray  ) 

Sets the content of the lesson plan.

The $contentArray parameter takes the following keys:

  • lessonTitle [string]: Title of lesson (required)
  • gradeLevel [string]: Grade level of lesson (required)
  • lessonAbstract [string]: Abstract describing lesson (required)
  • standardsAddressed [array]: Array of strings naming standards that lesson addresses (optional)
  • objectives [array]: Array of strings naming objectives of this lesson (optional)
  • prereqs [string]: Description of prerequisites needed for lesson (required)
  • teacherPrep [string]: Preparation that the teacher should undertake before doing the lesson (required)
  • requiredMaterials [array]: Array of strings giving materials needed for lesson (optional)
  • mediaUsed [array]: Array of strings giving media items and resources needed for lesson (optional)
  • requiredEquipment [array]: Array of strings giving pieces of equipment needed for lesson (optional)
  • safety [string]: Discussion of any safety issues related to lesson (required)
  • events [array]: Each element should be an array with three named elements: 'name', which is the name of the template item; 'time': the amount of time required for the item; and 'content' which is a description of the item. Each lesson plan template has its own set of items that need to be filled and those are not checked here. The entries need not have any values (that is, they are 'optional').
  • whichOutline [int]: Which lesson plan template to use; index into $PLANEVENTS array above.
Optional means that no real value need be provided. The key must still be there and must be set to either the empty string or an empty array. All fields should be valid XML except for the name/time fields in the events array, lessonTitle and gradeLevel and then any of the array based optional fields, such as requiredMaterials. Those should be strings. They should use XML entities, however, for characters such as < and >.

It is best to look at TKSnapLessonPlanEditor to see how to use this method as it is currently the only user of this method.

Parameters:
$contentArray [array]: array of information needed to build the lesson plan
Returns:
[boolean]: success

Definition at line 130 of file SnapContentLessonPlan.php5.

References generateXML(), SnapContent::getAll(), isKeyValid(), and SnapContent::setAll().

SnapContentLessonPlan::updateFileList (  ) 

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

Returns:
[TYPE]: RETURN DESCRIPTION

Reimplemented from SnapContent.

Definition at line 835 of file SnapContentLessonPlan.php5.

SnapContentLessonPlan::validate (  )  [protected]

INSERT BRIEF DESCRIPTION HERE.

For internal use only.

INSERT FULL DESCRIPTION HERE

Returns:
[TYPE]: RETURN DESCRIPTION

Reimplemented from SnapContent.

Definition at line 801 of file SnapContentLessonPlan.php5.


Member Data Documentation

SnapContentLessonPlan::$NICE_NAMES [static]

The text field name (value) for the given database field (key)

Definition at line 81 of file SnapContentLessonPlan.php5.


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

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