Example #1
0
                        $dataBlocks = array("gibbonPlannerEntryID" => $gibbonPlannerEntryID);
                        $sqlBlocks = "SELECT gibbonPlannerEntryOutcome.*, scope, name, category FROM gibbonPlannerEntryOutcome JOIN gibbonOutcome ON (gibbonPlannerEntryOutcome.gibbonOutcomeID=gibbonOutcome.gibbonOutcomeID) WHERE gibbonPlannerEntryID=:gibbonPlannerEntryID ORDER BY sequenceNumber";
                        $resultBlocks = $connection2->prepare($sqlBlocks);
                        $resultBlocks->execute($dataBlocks);
                    } catch (PDOException $e) {
                        print "<div class='error'>" . $e->getMessage() . "</div>";
                    }
                    $i = 1;
                    $usedArrayFill = "";
                    if ($resultBlocks->rowCount() < 1) {
                        print "<div id='outcomeOuter0'>";
                        print "<div style='color: #ddd; font-size: 230%; margin: 15px 0 0 6px'>Outcomes listed here...</div>";
                        print "</div>";
                    } else {
                        while ($rowBlocks = $resultBlocks->fetch()) {
                            makeBlockOutcome($guid, $i, "outcome", $rowBlocks["gibbonOutcomeID"], $rowBlocks["name"], $rowBlocks["category"], $rowBlocks["content"], "", TRUE, $allowOutcomeEditing);
                            $usedArrayFill .= "\"" . $rowBlocks["gibbonOutcomeID"] . "\",";
                            $i++;
                        }
                    }
                    ?>
									</div>
									<div style='width: 100%; padding: 0px 0px 0px 0px'>
										<div class="ui-state-default_dud" style='padding: 0px; min-height: 66px'>
											<table class='blank' cellspacing='0' style='width: 100%'>
												<tr>
													<td style='width: 50%'>
														<script type="text/javascript">
															<?php 
                    if ($i < 1) {
                        print "var outcomeCount=1;";
Gibbon, Flexible & Open School System
Copyright (C) 2010, Ross Parker

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/
include "../../functions.php";
include "../../config.php";
include "./moduleFunctions.php";
@session_start();
//Set timezone from session variable
date_default_timezone_set($_SESSION[$guid]["timezone"]);
$id = $_GET["id"];
$type = $_GET["type"];
$gibbonOutcomeID = $_GET["gibbonOutcomeID"];
$title = $_GET["title"];
$category = $_GET["category"];
$contents = $_GET["contents"];
$allowOutcomeEditing = $_GET["allowOutcomeEditing"];
makeBlockOutcome($guid, $id, $type, $gibbonOutcomeID, $title, $category, $contents, "", FALSE, $allowOutcomeEditing);