Exemple #1
0
/**
 * A function which tests if a certain text string is on the screen, if its not there the function will kill the test process.
 * @param string $text The text you wish to see on the screen
 */
function IExpectToSee($text)
{
    $pageText = byPath("//*")->getText();
    echo "I expected to see \"" . $text . "\"...\n";
    if (stripos($pageText, "{$text}") == 0) {
        die("And I did <b>NOT</b> see <b>\"" . $text . "\"</b>, here is what I saw:<br>" . screenShot());
    } else {
        echo "And I saw \"" . substr($pageText, stripos($pageText, "{$text}"), strlen("{$text}")) . "\"...\n";
    }
}
Exemple #2
0
function writeContent()
{
    global $page;
    global $lang;
    switch ($page) {
        case 'screenshots':
            ?>
				<h2><?php 
            echo text('Screenshots', 'Bildschirmfotos');
            ?>
</h2>
				<div id="screenshotthumbs">
					<?php 
            echo screenShot("menu1", text("Menu page 1", "Men&uuml; Seite 1"));
            ?>
					<?php 
            echo screenShot("menu2", text("Menu page 2", "Men&uuml; Seite 2"));
            ?>
					<?php 
            echo screenShot("counting", text("Counting", "Z&auml;hlen"));
            ?>
					<?php 
            echo screenShot("addition", text("Addition", "Addition"));
            ?>
					<?php 
            echo screenShot("subtraction", text("Subtraction", "Subtraktion"));
            ?>
					<?php 
            echo screenShot("reading", text("Reading words", "W&ouml;rter lesen"));
            ?>
					<?php 
            echo screenShot("spelling", text("Spelling", "Buchstabieren"));
            ?>
					<?php 
            echo screenShot("readingclock1", text("Reading clock", "Uhr lesen"));
            ?>
					<?php 
            echo screenShot("readingclock2", text("Reading clocks", "Uhren lesen"));
            ?>
					<?php 
            echo screenShot("readingnotes", text("Reading notes", "Noten lesen"));
            ?>
					<?php 
            echo screenShot("readingintervals", text("Intervals", "Intervalle"));
            ?>
					<?php 
            echo screenShot("playingnotes", text("Playing notes", "Noten spielen"));
            ?>
				</div>
<?php 
            break;
        case 'status':
            ?>
				<h2><?php 
            echo text('Status', 'Status');
            ?>
</h2>
					<?php 
            echo text('<p>The progam Touch\'n\'learn was developed in 1998 in Turbo Delphi 1.0 for Windows 3.1.</p>' . '<p>In 2007, I released it on SourceForge and adjusted the source code to be compilabe with Turbo Delphi 2006 Express. I intended to afterwards port Touch\'n\'learn to the opensource and crossplatform <a href="http://www.lazarus.freepascal.org/">Free Pascal Lazarus</a>. Then I realized that unlike Delphi, Lazarus has no tools for loading and rendering vector graphics.</p>' . '<p>A basic concept of Touch\'n\'learn is, however, the fullscreen resolution independent UI, which relies on vector graphics. That lead to my conclusion that the program rather needs to be reimplemented with a modern framework like <a href="http://trolltech.com/products/qt">Trolltechs Qt</a>. The paint system of Qt supports <a href="http://doc.trolltech.com/4.3/paintsystem.html">SVG and antialiasing</a>.</p>' . '<p>The code reflects my coding style of 9 years, ago. German-english namings, weak design and wrong ambitions. So Touch\'n\'learn would definitely benefit from a complete reimplementation.</p>' . '<p>If there is enough interest for the project, I will love to create something new, better, bigger. Just contact me via the SourceForge page.</p>', '<p>Das Programm Touch\'n\'learn wurde 1998 mit Turbo Delphi für Windows 3.1 entwickelt.</p>' . '<p>2007 veröffentlichte ich es auf SourceForge und passte den Quelltext an, um ihn unter Turbo Delphi 2006 Express kompilierbar zu machen. Ich hatte vor, Touch\'n\'learn anschließend auf das quelloffene und plattformunabhängige <a href="http://www.lazarus.freepascal.org/">Free Pascal Lazarus</a> zu portieren. Dann stellte ich fest, dass Lazarus -anders als Delphi- keine Werkzeuge zum Laden und Zeichnen von Vektorgrafik hat.</p>' . '<p>Ein grundlegendes Konzept von Touch\'n\'learn ist allerdings eine bildschirmfüllende, auflösungsunabhängige Benutzeroberfläche. Dieses Konzept erfordert Vektorgrafik. Dies führte zu meiner Schlussfolgerung, dass eher eine Neuimplementierung mit einem modernen Werkzeug wie <a href="http://trolltech.com/products/qt">Trolltechs Qt</a> nötig sei. Das Grafiksystem von Qt unterstützt <a href="http://doc.trolltech.com/4.3/paintsystem.html">SVG und Bildkantenglättung</a>.</p>' . '<p>Der Quelltext spiegelt meinen Programmierstil von vor 9 Jahren wider. Deutsch-englische Namensgebungs, schwaches Design und falsche Ambitionen. Daher würde Touch\'n\'learn definitiv von einer kompletten Neuimplementierung profitieren.</p>' . '<p>Sollte es genug Interesse an dem Projekt würde ich sehr gerne etwas neues, besseres und größeres kreieren. Kontaktieren Sie mich einfach auf der SourceForge-seite.</p>');
            break;
        case 'license':
            ?>
				<h2><?php 
            echo text('License', 'Lizenz');
            ?>
</h2>
				<p>
					Touch'n'learn - <?php 
            echo tagLine();
            ?>
<br />
					Copyright (C) 1998, 2007 by Alessandro Portale<br />
					<a class="external" href="http://touchandlearn.sourceforge.net/<?php 
            echo text('', '?lang=german');
            ?>
">http://touchandlearn.sourceforge.net/</a>
				</p>
				<?php 
            echo text('', '<p><em>Der folgende Lizenztext ist in seiner englischen Originalfassung aufgef&uuml;hrt, da die <a class="external" href="http://www.gnu.de/gpl-ger.html">deutsche &Uuml;bersetzung</a> nicht offiziell oder im rechtlichen Sinne anerkannt ist.</em></p>');
            ?>
				<p>Touch'n'learn 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.</p>
				<p>Touch'n'learn 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 <a class="external" href="http://www.gnu.org/copyleft/gpl.html">GNU General Public License</a> for more details.</p>
<?php 
            break;
        default:
            ?>
				<h2><?php 
            echo text('About', '&Uuml;ber');
            ?>
</h2>
				<?php 
            echo text('<p>An educative software for physically challenged children which is completely usable with a touch screen. The elements of the user interface are big and clear.</p>' . '<p>It was created during a practical semestre. Since a few years, the <a href="http://www.luckenberger-schule.de/">Luckenberger elementary school</a> in <a href="http://www.stadt-brb.de/stadt-brandenburg/">Brandenburg an der Havel</a> integrates physically challenged children into the lessons. This software was concepted together with Heiko Nachtigall, the vice president of the school.</p>' . '<p>When a physically challenged child has problems using pen and paper or other pedagogical material, it may happen that th child stays behind other children with its learning pensum. Using the hands when is are very essential for learning at the age of 6 or 7. A learning program which is really easy to use with a touch screen and has big and uncomplicated user interface elements could maybe compensate those motorical problems a little bit.</p>', '<p>Ein Lernprogramm für körperlich behinderte Grundschulkinder, das für die Benutzung mit einem Touchscreen geeignet ist. Die Bedienelemente sind groß und deutlich.</p>' . '<p>Das Programm enstand im Zuge eines Praktikumssemesters. Die <a href="http://www.luckenberger-schule.de/">Luckenberger Grundschule</a> in <a href="http://www.stadt-brb.de/stadt-brandenburg/">Brandenburg an der Havel</a> integriert seit einigen Jahren körperlich behinderte und lernbehinderte Kinder in den Schulalltag. Zusammen mit Herrn Heiko Nachtigall, dem stellvertretenden Schulleiter der Schule, wurde es konzipiert.</p>' . '<p>Ein körperlich behindertes Kind kann, wenn es Schwierigkeiten im Umgang mit Stift und Papier oder pädagogischem Spielzeug hat, in den frühen Grundschuljahren evtl. mit dem Lernpensum zurück bleiben. Das Be-"greifen" spielt beim Lernen eine wichtige Rolle. Ein leicht per Touchscreen bedienbares Lernprogramm mit großen Bedienelementen kann diese motorischen Schwierigkeiten eventuell teilweise kompensieren.</p>');
    }
}