Location: PHPKode > projects > Community Learning Network > cln/modules/Tutorial/TutorialStepsEditForm.html
<?php
/*
 * Bookmark Links Edit Form
 *
 * Copyright (c) 2003-4 St. Christopher House
 *
 * Developed by The Working Group Inc.
 *
 * 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 2
 * 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, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.  
 *
 * @version $Id: TutorialStepsEditForm.html,v 1.12 2005/01/20 07:50:23 cbooth7575 Exp $
 *
 */

// Set title
$GLOBALS['CLN_PAGE_TITLE'] = 'Edit Tutorial Steps';

$cleanURL = cleanURL($GLOBALS['path']);;
$params = 'editKoId=' . $this->_super->koId . '&amp;editProcess=Content';
$fullURL = appendToURL($cleanURL, $params);
?>

<p>All the steps currently in your tutorial are displayed below.
  For each step, click on the appropriate links to add or delete
  blocks, or edit a step's layout. At the bottom of the
  page is a link to add a new step.</p>


<?php
foreach ($this->steps as $stepNumber => $stepInfo) {
	?>
	<div class="tutorialEditStep">
		<h3>Step #<?php echo ($stepNumber + 1) . ': ' . $stepInfo['title']; ?></h3>
		
		<div class="tutorialEditEditLinks">
			<p><a href="<?php echo $fullURL; ?>&amp;subprocess=EditStepDetails&amp;tutorialStep=<?php echo $stepNumber; ?>">Edit  Title</a> | 
			<a href="<?php echo $fullURL; ?>&amp;subprocess=MoveStepUp&amp;tutorialStep=<?php echo $stepNumber; ?>">Move Up</a> | 
			<a href="<?php echo $fullURL; ?>&amp;subprocess=MoveStepDown&amp;tutorialStep=<?php echo $stepNumber; ?>">Move Down</a> | 
			<a href="<?php echo $fullURL; ?>&amp;subprocess=AddBlock&amp;tutorialStep=<?php echo $stepNumber; ?>">Add Block</a> | 
			<a href="<?php echo $fullURL; ?>&amp;subprocess=EditBlock&amp;tutorialStep=<?php echo $stepNumber; ?>">Edit Block</a> | 
			<a href="<?php echo $fullURL; ?>&amp;subprocess=DeleteBlock&amp;tutorialStep=<?php echo $stepNumber; ?>">Delete Block</a> | 
			<a href="<?php echo $fullURL; ?>&amp;subprocess=EditLayout&amp;tutorialStep=<?php echo $stepNumber; ?>">Edit Layout</a> | 
			<a href="<?php echo $fullURL; ?>&amp;subprocess=DeleteStep&amp;tutorialStep=<?php echo $stepNumber; ?>">Delete Step</a></p>
		</div>
		<div class="content">
	    	<div class="tutorialEditLayoutStepOutput">
				<?php 
				// Parse the layout
				require_once("LayoutParser.php");
				
				$xml_parser = new LayoutParser();
				$layoutToParse = $stepInfo['layout'];
			
				if($layoutContent = $xml_parser->parse($layoutToParse)) {
					echo $layoutContent;
					unset($xml_parser);
				} 
				else {
					PEAR::raiseError("LayoutParser could not process tutorial step layout", E_WARNING);
					return FALSE;
				}
				?>
			</div>
		</div>
		<div class="clear"></div>
	</div>
	<div class="clear"></div>
	<?php
}
?>

<div class="tutorialEditStep">
	<h3>Other Functions</h3>
	
	<form name="tutorialDetails" action="<?php echo $fullURL; ?>&amp;subprocess=EditSteps" method="post">
		<input class="clnFormInput" id="returnToPanel" type="submit" name="returnToPanel" value="Return to the Panel" /> 
		<input class="clnFormInput" id="submitTutorialAddStep" type="submit" name="submitTutorialAddStep" value="Add a New Step to this Tutorial" />
	</form>
	<div class="clear"></div>
</div>

Return current item: Community Learning Network