public static function decipherCourseInsYear($year)
 {
     $arr = array();
     $arr['year'] = substr($year, 0, 4);
     $arr['term'] = helperFunctions::translateTerm(substr($year, 4));
     return $arr;
 }
 public function get()
 {
     $returnStr = "<div id='left'>";
     $returnStr .= $this->getMenuStud();
     if ($this->_menuOption < subMenuOptions::MAINTENANCE) {
         // courses and search menu styling
         $conn = Propel::getConnection();
         if (isset($this->_courseId)) {
             if (!isset($this->_ratingYearArray)) {
                 // get rating data
                 $this->_ratingYearArray = AutoCourseRatingPeer::getAvailableYearsForCourseId($this->_courseId, $conn);
             }
             if (!isset($this->_examYearArray)) {
                 // get exam data
                 $this->_examYearArray = ExamPeer::getAvailableYearsForCourseId($this->_courseId, $conn);
             }
             if ($this->_menuOption == subMenuOptions::COURSE) {
                 $returnStr .= "<dl><dt>" . $this->_courseId . "</dt>";
             } else {
                 $returnStr .= "<dl><dt>" . link_to($this->_courseId, "course/index?id=" . $this->_courseId) . "</dt>";
             }
             // critique
             $returnStr .= "<div class='popupmenu' id='subCritique' onmouseover='mcancelclosetime()' onmouseout='mclosetime()'>";
             if (count($this->_ratingYearArray) == 0) {
                 $returnStr .= "<a>None Available</a>";
             } else {
                 foreach ($this->_ratingYearArray as $year) {
                     $returnStr .= link_to(helperFunctions::translateTerm($year), "course/critique?id=" . $this->_courseId . "&year=" . $year);
                 }
             }
             $returnStr .= "</div>\n\t        \t<dd><a class='pointer' onmouseover='mopen(\"subCritique\")' onmouseout='mclosetime()'>Course Critiques</a></dd>";
             // exams
             $returnStr .= "<div class='popupmenu' id='subExam' onmouseover='mcancelclosetime()' onmouseout='mclosetime()'>";
             if (count($this->_examYearArray) == 0) {
                 $returnStr .= "<a>None Available</a>";
             } else {
                 foreach ($this->_examYearArray as $year) {
                     $returnStr .= link_to(helperFunctions::translateTerm($year), "course/exam?id=" . $this->_courseId . "&year=" . $year);
                 }
             }
             $returnStr .= "<a onclick='grayout(\"submitExam\");'>Submit Exams</a>";
             $returnStr .= "</div>\n\t        \t<dd><a class='pointer' onmouseover='mopen(\"subExam\")' onmouseout='mclosetime()'>Exams Repository</a></dd></dl>";
         }
     } elseif ($this->_menuOption == subMenuOptions::MAINTENANCE) {
         //TODO: make maintenance menu
         $returnStr .= "<dl><dt>" . link_to("Maintenance", "maintenance/index") . "</dt>";
         foreach (subMenuOptions::getMaintenanceSections() as $key => $value) {
             $returnStr .= "<dd>" . link_to($key, $value) . "</dd>";
         }
     } elseif ($this->_menuOption == subMenuOptions::ERROR) {
         $returnStr .= "<dl><dt>Error</dt></dl>";
     }
     $returnStr .= "</div>";
     return $returnStr;
 }
示例#3
0
		<th width="100">Applies To</th>
		<th width="100">Course</th>
		<th width="150">Criterion</th>
		<th width="150">Rating</th>
		<th width="150">Number</th>
	</tr>
	<?php 
foreach ($matchedData as $row) {
    ?>
	<tr>
		<td><?php 
    echo link_to(" ", "course/index", array("class" => "select", "title" => "Select to edit"));
    ?>
</td>
		<td><?php 
    echo helperFunctions::translateTerm($row->getCourseInstructorAssociation()->getYear());
    ?>
</td>
		<td><?php 
    echo $row->getCourseInstructorAssociation()->getCourseId();
    ?>
</td>
		<td><?php 
    echo $row->getRatingField()->getDescr();
    ?>
</td>
		<td>
			<?php 
    if ($row->getFieldId() == RatingFieldPeer::NUMBER_ENROLLED || $row->getFieldId() == RatingFieldPeer::NUMBER_RESPONDED) {
        ?>
			/
示例#4
0
<?php

include_partial("global/submenu", array("menuOption" => subMenuOptions::COURSE_EXAM, "courseId" => $courseObj->getId(), "ratingYearArray" => $ratingYearArray, "examYearArray" => $examYearArray));
?>
<div id="main"><div id="critique_content">
	<h2><?php 
echo $courseObj->getId();
?>
 (<?php 
echo $courseObj->getDescr();
?>
)</h2>
	<h3>Exams Repository of <?php 
echo helperFunctions::translateTerm($year);
?>
</h3>

	<?php 
if (isset($examArr)) {
    ?>
	<div class="critique_block">
		<div class="box">
			<div class="title_bar">Exams</div>
			<ul>
			  <?php 
    foreach ($examArr as $subArr) {
        ?>
			  <li><a href='/<?php 
        echo $subArr["path"];
        ?>
' target='_blank'><?php 
示例#5
0
			<td valign="top">
				<ul>
					<?php 
foreach ($ratingYearArray as $year) {
    ?>
					<li><?php 
    echo link_to(helperFunctions::translateTerm($year), "course/critique?id=" . $sf_request->getParameter('id') . "&year=" . $year);
    ?>
</li>
					<?php 
}
?>
				</ul>
			</td>
			<td valign="top">
				<ul>
					<?php 
foreach ($examYearArray as $year) {
    ?>
					<li><?php 
    echo link_to(helperFunctions::translateTerm($year), "course/exam?id=" . $sf_request->getParameter('id') . "&year=" . $year);
    ?>
</li>
					<?php 
}
?>
				</ul>
			</td>
		</tr>
	</table>
</div></div>
示例#6
0
        ?>
	<?php 
        foreach ($commentList->getResults() as $commentObj) {
            ?>
	<div class="critique_block">
		<div class="box">
			<?php 
            $a = strtotime($commentObj->getInputDt());
            ?>
			<div class="title_bar">
				Submitted: <?php 
            echo date('M d, Y h:i A', $a);
            ?>
&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;
				Applies To: <?php 
            echo helperFunctions::translateTerm($commentObj->getAppliesTo());
            ?>
			</div>
			<?php 
            echo $commentObj->getComment();
            ?>
		</div>
	</div>
	<?php 
        }
        ?>
	
	<div class="critique_block">
		<div class="box">
			<a class="btn" onclick="grayout('submitComment');">I would like to leave a comment for this course...</a>
		</div>
示例#7
0
        ?>
			
			<!-- exam -->
			<div class='popupmenu' id='subExam' onmouseover='mcancelclosetime()' onmouseout='mclosetime()'>
				<?php 
        if (!isset($examYearArray) || count($examYearArray) == 0) {
            ?>
					<a>None Available</a>
				<?php 
        } else {
            ?>
					<?php 
            foreach ($examYearArray as $year) {
                ?>
					<?php 
                echo link_to(helperFunctions::translateTerm($year), "course/exam?id=" . $courseId . "&year=" . $year);
                ?>
					<?php 
            }
            ?>
				<?php 
        }
        ?>
				<a onclick='grayout("submitExam");'>Submit Exams</a>
			</div>
			<dd class='pointer' onmouseover='mopen("subExam")' onmouseout='mclosetime()'>
			<?php 
        if ($menuOption == subMenuOptions::COURSE_EXAM) {
            ?>
Exams Repository<?php 
        } else {