<?php
function build_student_content($student_heading, $student_content, $part_index, $heading_class, $anchor)
{
// Preload formatted html templates for student content
// For each step included above, the following will be printed, with variables substituted.
// Each step MUST supply:
// $student_heading
// $student_content
// $part_index
$student_content_div =<<<STUDENTCONTENT
<a name="$anchor" class="anchor"></a>
<div class="stepQuestionContainerOuter" id="stepQuestionContainerOuter$part_index">
<h3 class="$heading_class"> $student_heading </h3>
<div class="stepQuestionStudentContainer">
$student_content
</div>
<div class="stepQuestionContainerOuter" id="stepQuestionContainerOuter$part_index">
STUDENTCONTENT;
return $student_content_div;
}
function build_teacher_content($teacher_heading, $teacher_goal, $teacher_content, $teacher_extended_heading, $teacher_extended_content, $teacher_resource_links, $display_extended, $student_heading, $student_content, $part_index, $heading_class, $anchor, $student_anchor)
{
// Determine whether to display the extended content or not.
$display_type="none";
if ($display_extended)
{
$display_type="block";
}
else $display_type="none";
// Load formatted html templates for the teacher info.
// Each step MUST supply:
// $teacher_heading
// $student_heading
// $teacher_content
// $teacher_extended_content
// $student_content
// $part_index
$teacher_content_div =<<<TEACHERCONTENT
<div class="stepQuestionContainerOuter" id="stepQuestionContainerOuter$part_index">
<div class="stepQuestionStudentContainerInset" id="stepQuestionStudentContainer$part_index">
<a name="$student_anchor" class="anchor"></a>
<h4 class='headingSubtext'>Student sees:</h4>
<div class="stepQuestionStudentContainerContent">
<h3 class="stepQuestion">$student_heading</h3>
$student_content
</div>
</div>
<div class="stepQuestionTeacherContainer">
<a name="$anchor" class="anchor"></a>
<h3 class="$heading_class">$teacher_heading</h3>
TEACHERCONTENT;
if (!empty($teacher_goal))
{
$teacher_content_div .=<<<TEACHERCONTENT
<div class="teacherGoal">
$teacher_goal
TEACHERCONTENT;
}
if (!empty($teacher_extended_content))
{
$teacher_content_div .=<<<TEACHERCONTENT
<div class="expandLinks">
<img align="top" src="images/expand.gif" id="teacher-more-$part_index-img" class="expandIcon" alt="Small triangle icon" />
<a href="javascript:expand_section('teacher-more-$part_index');">
$teacher_extended_heading
</a>
</div>
TEACHERCONTENT;
}
// Close the goal div...
if (!empty($teacher_goal)) $teacher_content_div .= "\n </div>\n\n";
// Finally, put in the rest of the unhidden content, unconditionally.
$teacher_content_div .= $teacher_content . "\n\n";
// Only insert the hidden content if some was provided.
if (!empty($teacher_extended_content))
{
$teacher_content_div .=<<<TEACHERCONTENT
<div class="hidden" id="teacher-more-$part_index" style="display:$display_type;">
$teacher_extended_content
<div class="expandLinks">
<a href="javascript:expand_section('teacher-more-$part_index');">
Hide <img align="top" src="images/collapse.gif" id="teacher-more-$part_index-hide-img" class="expandIcon" alt="Small triangle icon" />
</a>
</div>
</div>
TEACHERCONTENT;
}
// Include any resource links provided...
if (!empty($teacher_resource_links))
{
$teacher_content_div .=<<<TEACHERCONTENT
<div class="teacherResourceLinks">
$teacher_resource_links
</div>
TEACHERCONTENT;
}
$teacher_content_div .=<<<TEACHERCONTENT
</div>
</div>
TEACHERCONTENT;
return $teacher_content_div;
}
function build_teacher_prelude($prelude_heading, $prelude_content, $heading_class, $anchor)
{
$teacher_prelude_div =<<<TEACHERPRELUDE
<a name="$anchor" class="anchor"></a>
<div class="StepQuestionContainerOuter" id="stepQuestionContainerOuterPrelude">
<div class="stepQuestionTeacherContainerAbout">
<h3 class="$heading_class">$prelude_heading</h3>
$prelude_content
</div>
</div>
TEACHERPRELUDE;
return $teacher_prelude_div;
}
// Format quotations for print.
// Pass in the quote as a string and author as a string.
function build_quote($quote_text, $quote_author)
{
$quote =<<<QUOTE
<div class="quoteContainer">
<div class="quoteBorder"><img src="images/quote-l.gif" class="quoteImg" alt="Quote icon" /></div>
<div class="quoteBorderHoriz"><img src="images/quote-top.gif" class="quoteImg" alt="Quote icon" /></div>
<blockquote>
“$quote_text”
</blockquote>
<div class="quoteBorder"><img src="images/quote-r.gif" class="quoteImg" alt="Quote icon" /></div>
<span class="quoteAuthor">~ $quote_author</span>
<div class="quoteBorderHoriz"><img src="images/quote-bottom.gif" class="quoteImg" alt="Quote icon" /></div>
</div>
QUOTE;
return $quote;
}
function build_resources_list_box($stepnum)
{
$list_box =<<<LISTBOX
<div class="resourceBox" id="teacherResourceBox">
<ul>
<li><img class="documentLinkIconRight" src="images/clock.gif" alt="Clock icon" /><a href="no_time.php#step$stepnum">No time? Suggestions for condensing this step</a></li>
<li><img class="documentLinkIconRight" src="images/question.gif" alt="Question icon" /><a href="guiding_questions.php#step$stepnum">Guiding questions</a></li>
<li><a href="support_materials.php#step$stepnum">Support materials</a></li>
</ul>
</div>
LISTBOX;
return $list_box;
}
?>