Exemplo n.º 1
0
 function generateContent()
 {
     $content = '
     <h1>' . _('Exercises list') . '</h1>
     ';
     $results = DatabaseManager::getQuery("SELECT * FROM exercises  ");
     $content .= '<table>
             <thead>
                 <th>' . _('Name') . '</th>
                 <th>' . _('Description') . '</th>
                 <th>' . _('Language') . '</th>
                 <th>' . _('Word count') . '</th>
                 <th>' . _('Action') . '</th>
                 
             </thead>
             <tbody>
         ';
     while ($result = $results->fetchArray()) {
         $content .= '<tr>';
         $content .= '<td>' . $result['name'] . '</td>';
         $content .= '<td>' . $result['description'] . '</td>';
         $content .= '<td>' . $result['language'] . '</td>';
         $content .= '<td>' . $result['word_count'] . '</td>';
         $content .= '<td>
                 <a href="' . RessourceManager::getInnerUrl('exercises/show') . '?id=' . $result['id'] . '">' . _('Details') . '</a><br/>
                 <a href="' . $result['file'] . '">' . _('Download') . '</a>
                     </td>';
         $content .= '</tr>';
     }
     $content .= '<tbody></table>';
     return $content;
 }
Exemplo n.º 2
0
    function displayForm()
    {
        $content = '';
        $content .= '
        <form action="' . RessourceManager::getInnerUrl('exercises/add_exercise') . '"  method="post">
              <label for="exercise_name">' . _('Name: ') . '</label><input id="exercise_name" type="text" name="exercise_name"  /><br />
              <label for="exercise_group">' . _('Group: ') . '</label><input type="text" id="exercise_group"  name="exercise_group"  /><br />
              <label for="exercise_code">' . _('Id: ') . '</label><input type="text" id="exercise_code"  name="exercise_code"  /><br />
              <label for="propose_description">' . _('Description: ') . '</label><input type="text" id="propose_description"  name="propose_description"  /><br />
              <label for="exercise_word_count">' . _('Word count: ') . '</label><input type="text" id="exercise_word_count"  name="exercise_word_count"  /><br />
              <label for="exercise_licence">' . _('Licence: ') . '</label><input type="text" id="exercise_licence"  name="exercise_licence"  /><br />
              <label for="exercise_language">' . _('Languague (en, fr, ...): ') . '</label><input type="text" id="exercise_language"  name="exercise_language"  /><br />
              <label for="exercise_media_type">' . _('Media type (video, audio, ...): ') . '</label><input type="text" id="exercise_media_type"  name="exercise_media_type"  /><br />
              <label for="exercise_exercise_version">' . _('Exercise version: ') . '</label><input type="text" id="exercise_exercise_version"  name="exercise_exercise_version"  /><br />
              <label for="exercise_author">' . _('Author: ') . '</label><input type="text" id="exercise_author"  name="exercise_author"  /><br />
              <label for="exercise_author_website">' . _('Author website: ') . '</label><input type="text" id="exercise_author_website"  name="exercise_author_website"  /><br />
              <label for="exercise_author_contact">' . _('Author contact: ') . '</label><input type="text" id="exercise_author_contact"  name="exercise_author_contact"  /><br />
              <label for="exercise_packager">' . _('Packager: ') . '</label><input type="text" id="exercise_packager"  name="exercise_packager"  /><br />
              <label for="exercise_packager_website">' . _('Packager website: ') . '</label><input type="text" id="exercise_packager_website"  name="exercise_packager_website"  /><br />
              <label for="exercise_packager_contact">' . _('Packager contact: ') . '</label><input type="text" id="exercise_packager_contact"  name="exercise_packager_contact"  /><br />
              <label for="exercise_translations">' . _('Translation (en, fr, ...): ') . '</label><input type="text" id="exercise_translations"  name="exercise_translations"  /><br />
              <label for="exercise_file">' . _('Package file: ') . '</label><input type="text" id="exercise_file"  name="exercise_file"  /><br />
                  <label for="exercise_proposer">' . _('Proposer: ') . '</label><input type="text" id="exercise_proposer"  name="exercise_proposer"  /><br />

              <br />
              <input type="submit" value="' . _('Propose') . '" />
        </form>
        ';
        return $content;
    }
Exemplo n.º 3
0
 function generateContent()
 {
     $content = '<h1>' . _('Contribute') . '</h1>';
     $content .= '<p>' . _('Perroquet is open to extern contribution. There is a lot of things beside programming that can help us. There is work on the Perroquet software, but also on exercise repository and on this website.') . '</p>';
     $content .= '<p>' . _('If no special link is provide, please contact us: ') . '<a href="' . RessourceManager::getInnerUrl('contacts') . '">' . _('Contact perroquet team</a>.') . '</p>';
     $content .= '<h2>' . _('Help on Perroquet software') . '</h2>';
     $content .= '<ul>
          <li>' . _('Signal a bug or a translation error in Perroquet: <a href="https://bugs.launchpad.net/perroquet" >Perroquet bugtracker</a>') . '</li>
          <li>' . _('Packaging or adding in distributions') . '</li>
          <li>' . _('Send a patch: <a href="https://code.launchpad.net/~perroquet-team/perroquet/trunk2" >Perroquet code</a>') . '</li>
          <li>' . _('Help to translate Perroquet: <a href="https://translations.launchpad.net/perroquet" >Perroquet online translation</a>') . '</li>
          <li>' . _('Suggest a new feature or make a suggestion') . '</li>
              </ul>';
     $content .= '<h2>' . _('Help on exercise repositoy') . '</h2>';
     $content .= '<ul>
          <li>' . _('Signal error on exercise') . '</li>
          <li>' . _('Signal usable video or audio file (with or without subtitles)') . '</li>
          <li>' . _('Propose an exercise:') . '<a href="' . RessourceManager::getInnerUrl('exercises/propose_form') . '">' . _('propose a new exercise') . '</a></li>
          <li>' . _('Write subtitles') . '</li>
              </ul>';
     $content .= '<h2>' . _('Help on Perroquet website') . '</h2>';
     $content .= '<ul>
          <li>' . _('Write documentation') . '</li>
          <li>' . _('Signal a bug or a translation error in this website: <a href="https://bugs.launchpad.net/perroquet/website" >Perroquet website bugtracker</a>') . '</li>
          <li>' . _('Help to translate the website: <a href="https://translations.launchpad.net/perroquet/website/+translations" >Perroquet website online translation</a>') . '</li>
          <li>' . _('Improve this website: <a href="https://code.launchpad.net/~perroquet-team/perroquet/website" >Perroquet website code</a> ') . '</li>
              </ul>';
     $content .= '<h2>' . _('Others helps') . '</h2>';
     $content .= '<p>' . _('All others help is welcome. If you want to participate more to perroquet, you can ask to join the team.') . '</p>';
     return $content;
 }
Exemplo n.º 4
0
 function generateContent()
 {
     $content = '<h1>' . _('Contacts') . '</h1>';
     $content .= '<p>' . _('If you want to participate to Perroquet or report a problem, begin to visit the "contribute" page: ') . '<a href="' . RessourceManager::getInnerUrl('contribute') . '">' . _('Contribute to Perroquet') . '</a>.</p>';
     $content .= '<p>' . _('For general or public questions:  <a href="mailto:perroquet-team@lists.launchpad.net">perroquet-team@lists.launchpad.net</a>.') . '</p>';
     $content .= '<p>' . _('For private questions:  <a href="mailto:pfred.bertolus@gmail.com">fred.bertolus@gmail.com</a>.') . '</p>';
     return $content;
 }
Exemplo n.º 5
0
    function generateUserMenu()
    {
        $menu = HtmlPage::generateSubMenu();
        $menu .= '
            <li ' . ($this->startswith($this->id, 'exercises/my_propose_list') ? 'class= "active"' : '') . '><a href="' . RessourceManager::getInnerUrl('exercises/my_propose_list') . '/">' . _('My proposed exercises') . '</a></li>

            ';
        return $menu;
    }
Exemplo n.º 6
0
 function generateContent()
 {
     $content = '
         <h1>' . _('Login') . '</h1>';
     $content .= '
         <p>' . $this->error . '</p>';
     $content .= '
     <p><a href="' . RessourceManager::getInnerUrl('special/login/login_form') . '">' . _('Return to login page') . '</a></p>';
     return $content;
 }
Exemplo n.º 7
0
 function generateContent()
 {
     $content = '
     <h1>' . _('Screenshots') . '</h1>
             <h2>' . _('Perroquet in use') . '</h2>
             <p>' . RessourceManager::getImage('perroquet_screenshot1.png', _('Perroquet in use')) . '</p>
                 <h2>' . _('Perroquet exercises manager') . '</h2>
             <p>' . RessourceManager::getImage('perroquet_exercises_manager1.png', _('Perroquet exercises manager')) . '</p>
     ';
     return $content;
 }
Exemplo n.º 8
0
 function generateContent()
 {
     $content = '
     <h1>' . _('Proposed exercised') . '</h1>
     ';
     if (LoginManager::isLogged() && LoginManager::isAdministrator()) {
         $content .= $this->displayContent();
     } else {
         $content .= "<p>You must be logged as administrator to access to proposed exercises.</p>";
         $content .= '<p><a href="' . RessourceManager::getInnerUrl('special/login/login_form') . '">' . _('Go to login page') . '</a></p>';
     }
     return $content;
 }
Exemplo n.º 9
0
    function generateContent()
    {
        $content = '
        <h1>' . _('Login') . '</h1>';
        $content .= '
<form action="' . RessourceManager::getInnerUrl('special/login/perform_login') . '"  method="get">
      <label for="openid" >' . _('OpenID: ') . '</label><input id="openid" type="text" name="openid" size="30" />
      <br />
      <input type="submit" value="' . _('Log In') . '" />
</form>
';
        return $content;
    }
Exemplo n.º 10
0
 function generateSubMenu()
 {
     $menu = HtmlPage::generateSubMenu();
     $menu .= '
         <li ' . ($this->startswith($this->id, 'documentation/installation') ? 'class= "active"' : '') . '><a href="' . RessourceManager::getInnerUrl('documentation/installation/index') . '/">' . _('Installation') . '</a></li>
         <li ' . ($this->startswith($this->id, 'documentation/use') ? 'class= "active"' : '') . '><a href="' . RessourceManager::getInnerUrl('documentation/use/index') . '/">' . _('Use perroquet') . '</a></li>
         <li ' . ($this->startswith($this->id, 'documentation/help') ? 'class= "active"' : '') . '><a href="' . RessourceManager::getInnerUrl('documentation/help/index') . '/">' . _('Help tools') . '</a></li>
         <li ' . ($this->startswith($this->id, 'documentation/repositories') ? 'class= "active"' : '') . '><a href="' . RessourceManager::getInnerUrl('documentation/repositories/index') . '/">' . _('Reporitories') . '</a></li>
         <li ' . ($this->startswith($this->id, 'documentation/exercise_creation') ? 'class= "active"' : '') . '><a href="' . RessourceManager::getInnerUrl('documentation/exercise_creation/index') . '/">' . _('Exercise creation') . '</a></li>
         <li ' . ($this->startswith($this->id, 'documentation/development') ? 'class= "active"' : '') . '><a href="' . RessourceManager::getInnerUrl('documentation/development/index') . '/">' . _('Development') . '</a></li>
         ';
     return $menu;
 }
Exemplo n.º 11
0
 function execute()
 {
     $this->content = '
     <h1>' . _('Logout') . '</h1>';
     if (LoginManager::isLogged()) {
         $this->content .= '
             <p>' . sprintf(_('Logout from \'%s\' success.'), LoginManager::getLogin()) . '</p>';
     } else {
         $this->content .= '
             <p>' . _('You are not logged.') . '</p>';
     }
     $this->content .= '
         <p><a href="' . RessourceManager::getInnerUrl('index') . '">' . _('Return to index') . '</a></p>';
     LoginManager::logout();
 }
Exemplo n.º 12
0
 function generateContent()
 {
     $content = '';
     $content .= '
     <h1>' . _('Documentation - Use') . '</h1>';
     $content .= '<p>' . _('In this part, you will lear to works with perroquet.') . '</p>';
     $content .= '<p>' . _('The principle of perroquet is to transform a vidéo or audio file in a cloze test with the help of a subtitles  file.') . '</p>';
     $content .= '<p>' . _('Perroquet works with exercises. An exercise is a set of video or audio sequences that we will just call sequences. A sequence last only few seconds and correspond to a part of a dialog. The part of a video without dialogue can be in none sequence.') . '</p>';
     $content .= '<p>' . _('For each sequence of an exercise, you will listen it then type words you hear. Perroquet show you the number of word to found and show the punctuation, you must complete the cloze test.') . '</p>';
     $content .= '<p>' . _('This part is subdivised in three chapters: ') . '</p><ul>';
     $content .= '<li>' . sprintf(_('<a href="%s">Interface</a> : this chapter descripte the interface.'), RessourceManager::getInnerUrl('documentation/use/ui')) . '</li>';
     $content .= '<li>' . sprintf(_('<a href="%s">Navigate</a> : this chapter explain how to navigate in an exercise.'), RessourceManager::getInnerUrl('documentation/use/navigate')) . '</li>';
     $content .= '<li>' . sprintf(_('<a href="%s">Works</a> : this chapter explain how to work on an exercise.'), RessourceManager::getInnerUrl('documentation/use/work')) . '</li>';
     $content .= '</ul>';
     return $content;
 }
Exemplo n.º 13
0
 function displayForm()
 {
     $content = '';
     $content .= '
         <p>' . _('Propose an exercise permit to help to full the official perroquet exercises\'s repository.') . '</p>
         <p>' . _('Before beeing accessible from the exercise manager, the proposed exercise will be examinated. Also, be sure that you use free licenced file as public domain, CC-by-sa, GPL, Free Art, ...') . '</p>';
     $content .= '
     <form action="' . RessourceManager::getInnerUrl('exercises/propose_form') . '"  method="post">
           <label for="name">' . _('Name: ') . '</label><input id="name" type="text" name="propose_name" /><br />
           <label for="description">' . _('Short description: ') . '</label><input type="text" id="description"  name="propose_description"  /><br />
           <label for="links">' . _('Others informations : links to ressources, comments, authors, licence, ... : ') . '</label><br /><textarea id="links"  name="propose_links"  ></textarea><br />
           <br />
           <input type="submit" value="' . _('Propose') . '" />
     </form>
     ';
     return $content;
 }
Exemplo n.º 14
0
 function generateContent()
 {
     $content = '
     <h1>' . _('Select language') . '</h1>';
     $langs = Config::getLanguagelist();
     $content .= '<form action="' . RessourceManager::getInnerUrl('special/language/select') . '" method="GET">';
     $content .= '
             <label for="language">' . _('Choose the new language : ') . '</label>
             <select name="language" id="language">';
     foreach ($langs as $lang) {
         if ($lang['choosable']) {
             $content .= '
             <option value="' . $lang['code'] . '" ' . ($lang['code'] == LanguageManager::getLanguage() ? 'selected="selected"' : '') . '>' . $lang['label'] . '</option>';
         }
     }
     $content .= '</select><br /><input type="submit" value="' . _("Select") . '"></form>';
     return $content;
 }
Exemplo n.º 15
0
 function generateContent()
 {
     $content = '';
     $content .= '
     <h1>' . _('Documentation') . '</h1>
         <p>' . _('You will find here the documentation of Perroquet. This documentation is far to be complete but don\'t hesitate to contact us for question.') . '</p>';
     $content .= '<p>' . _('This documentation is subdivised in six section: ') . '</p><ul>';
     $content .= '<li>' . sprintf(_('<a href="%s">Installation</a> : explains how install, compile or only run perroquet.'), RessourceManager::getInnerUrl('documentation/installation/index')) . '</li>';
     $content .= '<li>' . sprintf(_('<a href="%s">Use perroquet</a> : describe the user interface and explains how to create an simple exercise and work on it.'), RessourceManager::getInnerUrl('documentation/use/index')) . '</li>';
     $content .= '<li>' . sprintf(_('<a href="%s">Help tools</a> : if an exercise is too difficult for you, you can use help tools to give you hint or speed down the playback. This part also explain how to increase the difficulty of an exercise.'), RessourceManager::getInnerUrl('documentation/help/index')) . '</li>';
     $content .= '<li>' . sprintf(_('<a href="%s">Repositories</a> : this part explain how to add a new exercise source or create it own exercise repository.'), RessourceManager::getInnerUrl('documentation/repositories/index')) . '</li>';
     $content .= '<li>' . sprintf(_('<a href="%s">Exercise creation</a> : explains how to create an exercise using advanced features as teacher locks or multi files exercises.'), RessourceManager::getInnerUrl('documentation/exercise_creation/index')) . '</li>';
     $content .= '<li>' . sprintf(_('<a href="%s">Development</a> : installation from source, code global structure.'), RessourceManager::getInnerUrl('documentation/development/index')) . '</li>';
     $content .= '</ul>';
     $content .= '<p>' . _('There is also 2 special documentation page: ') . '</p><ul>';
     $content .= '<li>' . sprintf(_('<a href="%s">FAQ</a> : for common or strange questions.'), RessourceManager::getInnerUrl('documentation/faq')) . '</li>';
     $content .= '<li>' . sprintf(_('<a href="%s">Shortcuts</a> : to stop to use the mouse.'), RessourceManager::getInnerUrl('documentation/shortcuts')) . '</li>';
     $content .= '</ul>';
     return $content;
 }
Exemplo n.º 16
0
 function generateContent()
 {
     $content = '
         <h1>' . _('Select language') . '</h1>';
     if ($this->language == "None") {
         $content .= '
         <p>' . _('No language selected.') . '</p>';
     } else {
         if ($this->language == "Invalid") {
             $content .= '
         <p>' . _('Invalid language selected.') . '</p>';
         } else {
             $langList = Config::getLanguageList();
             $content .= '
         <p>' . sprintf('Language \'%s\' selected.', $langList[$this->language]['label']) . '</p>';
         }
     }
     $content .= '
     <p><a href="' . RessourceManager::getInnerUrl('index') . '">' . _('Return to index') . '</a></p>';
     return $content;
 }
Exemplo n.º 17
0
    function generateContent()
    {
        $content = '';
        $content .= '
        <h1>' . _('Exercises') . '</h1>
            <p>' . _('Perroquet works with exercises. An exercises in perroquet is the association of one or more media files and the corresponding subtitles files.') . '</p>
            <p>' . _('There is various ways to get an exercise.') . '</p>

            <h2>' . _('Manual exercises creation') . '</h2>
                <p>' . _('If you have a media file with an audio track in the language you want to works and a subtitle in the same language, you can manually create an exercises.') . '</p>
                    <p>' . _('Read the documentation to lear to create an exercise: ') . '<a href=' . RessourceManager::getInnerUrl('documentation/index') . ' >' . _('documentation') . '</a>.</p>

            <h2>' . _('Online exercises repositories') . '</h2>
            <p>' . _('Although perroquet works with every media file with a subtile file in the same language, a exercise manager in perroquet provide the access to an exercises\'s online database.') . '</p>';
        $content .= '<p>' . _('The exercises manager (Edit>Exercise Manager) contains by default only one repository and this repository contains few exercises but no configuration is needed for these exercises.') . '</p>';
        $content .= '<p>' . _('Your help is welcome to fill the repositories with others exercises: ') . '<a href="' . RessourceManager::getInnerUrl('exercises/propose_form') . '">' . _('Propose a new exercise or an update of an existing exercise.') . '</a></p>';
        //$content .= '<p><a href="'.RessourceManager::getInnerUrl('exercises/search').'">'._('Browse, not and comments exercises.').'</a></p>';
        //$content .= '<p><a href="'.RessourceManager::getInnerUrl('exercises/search').'">'._('Signal a problem on an exercise.').'</a></p>';
        //$content .= '<p><a href="'.RessourceManager::getInnerUrl('exercises/search').'">'._('Find others exercises.').'</a></p>';
        $content .= '<p>The perroquet team provide a test repository : http://perroquet.b219.org/exercises/1.1.0/exercises_test.xml. To learn to add a new repository in perroquet, read this page : <a href="' . RessourceManager::getInnerUrl('documentation/repositories/add_new repository') . '">' . _('Add new repository') . '</a>.</p>';
        return $content;
    }
Exemplo n.º 18
0
    function generateContent()
    {
        $content = '
        <h1>' . _('Presentation') . '</h1>
                    ' . RessourceManager::getImage('perroquet_screenshot1_400.png', _('Perroquet in use')) . '
                    <p>Perroquet is a educational program to improve playfully your listening in a foreign language</p>
                <h2>' . _('How it works') . '</h2>
                    <p>The principe of Perroquet is to use a video or audio file and the associated subtitles to make you listen and understand the dialogue or lyrics. After having idendified the files to use, Perroquet will read a piece of video then pause. It will show you the number of words to find and you will have to type them to continue. You can listen a sequence as many times as necessary. If you do not understand, Perroquet offers several means to help you.</p>

                <h2>' . _('Try now') . '</h2>
                    <p>If you want to test parrot but you have no video available, here is an  archive containing the film Elephant Dream with English subtitles match: <a href="/ressources/elephant_dream_en.tar.gz" >Files demo pages Elephant Dream</a></p>
                    <p>For now, this demo only allows you to practice understanding English.</p>


                    <p>You must then <a href="' . RessourceManager::getInnerUrl('download') . '" >download and install</a> Perroquet, run it, create a new exercise and put the video file in the first field, the file of English subtitles in the second file and the subtitle in the French final. To learn to use all the features of parrot, see the <a href="/en/documentation.html" >documentation</a>.</p>

                <h2>' . _('News') . '</h2>

                    <h3>Version 1.0.1</h3>
                    <ul>
                        <li>Improve window resize</li>
                        <li>Add new shortcuts</li>
                        <li>Remove html tags in srt files</li>
                        <li>Replace | by new line in srt</li>
                        <li>Handle perroquet file, add mime type and icons on perroquet exercise</li>
                        <li>Improve exercice creation dialog</li>
                        <li>Add tooltips</li>
                        <li>Reimplement input system to support specials characters</li>
                        <li>Fix various bugs</li>
                        <li>Translation updates</li>
                    </ul>
                <h2>Licence</h2>
                    <p>Perroquet  is a free software distributed under the GNU Public License version 3 or higher. The source code of this software is available here: <a href="https://launchpad.net/perroquet/+download" >Download page at launchpad</a></p>

                    <p>The full text of the license is available here <a href="http://www.gnu.org/licenses/gpl.html">GPL</a>.</p>
        ';
        return $content;
    }
Exemplo n.º 19
0
 function generateContent()
 {
     $content = '';
     $content .= '
     <h1>' . _('Documentation - Use - Interface') . '</h1>';
     $content .= '<p>' . _('Perroquet\'s user interface has as goal to make easy to navigate between different sequences and inside a sequence. Perroquet doesn\'t aim to be a great video player but be good to learn foreign languages.') . '</p>';
     $content .= '<p>' . _('This is the interface with annotation showing the differents components of the interface:') . '</p>';
     $content .= '<p>' . RessourceManager::getImage('perroquet_ui_zones.png', _('Annotated Perroquet interface')) . '</p>';
     $content .= '<ul>' . _('These components are:');
     $content .= '<li>' . _('1 - Title bar. It display the project name and the current save state of the exercise.') . '</li>';
     $content .= '<li>' . _('2 - Menu bar. It permit an access to most of Perroquet\'s features.') . '</li>';
     $content .= '<li>' . _('3 - Tools bar. It permet a fast access to important of Perroquet\'s features.') . '</li>';
     $content .= '<li>' . _('4 - Video zone. The video is displayed in this zone.') . '</li>';
     $content .= '<li>' . _('5 - Statistic\'s zone. It displays informations about exercise progress.') . '</li>';
     $content .= '<li>' . _('6 - Filter field. Allow to filter words in words list.') . '</li>';
     $content .= '<li>' . _('7 - Words list. It contains all words you have to find in the whole exercise.') . '</li>';
     $content .= '<li>' . _('8 - Response zone. It displays the cloze test.') . '</li>';
     $content .= '<li>' . _('9 - Translation zone. It displays the translation of the current sequence. This zone is hidden by default') . '</li>';
     $content .= '<li>' . _('10 - Sequence slider. It permit to navigate in the current sequence.') . '</li>';
     $content .= '<li>' . _('11 - Exercise slider. It permit to navigate in the exercise.') . '</li>';
     $content .= '</ul>';
     $content .= '<ul>' . _('The tools bar button are (from left to right):');
     $content .= '<li>' . _('New exercise.') . '</li>';
     $content .= '<li>' . _('Open en exercise.') . '</li>';
     $content .= '<li>' . _('Save the exercise.') . '</li>';
     $content .= '<li>' . _('Previous sequence.') . '</li>';
     $content .= '<li>' . _('Next sequence.') . '</li>';
     $content .= '<li>' . _('Listen the sequence again.') . '</li>';
     $content .= '<li>' . _('Hint.') . '</li>';
     $content .= '<li>' . _('Show/hide translation.') . '</li>';
     $content .= '<li>' . _('Show/hide correction.') . '</li>';
     $content .= '<li>' . _('Slow down playback.') . '</li>';
     $content .= '<li>' . _('Exercise properties.') . '</li>';
     $content .= '<li>' . _('Reset the exercise.') . '</li>';
     $content .= '</ul>';
     return $content;
 }
Exemplo n.º 20
0
    function generateContent()
    {
        $content = '
        <h1>' . _('Presentation') . '</h1>
                    ' . RessourceManager::getImageLeft('perroquet_screenshot1_400.png', _('Perroquet in use')) . '
                    <p>' . _('Perroquet is a educational program to improve playfully your listening in a foreign language') . '</p>
                <h2>' . _('How it works') . '</h2>
                    <p>' . _('The principe of Perroquet is to use a video or audio file and the associated subtitles to make you listen and understand the dialogue or lyrics. After having idendified the files to use, Perroquet will read a piece of video then pause. It will show you the number of words to find and you will have to type them to continue. You can listen a sequence as many times as necessary. If you do not understand, Perroquet offers several means to help you.') . '</p>

                <h2>' . _('Try now') . '</h2>
                    <p>' . sprintf(_('Perroquet work with every media file your computer can read. Choose one video ou a audio book in the language you want to work and download the corresponding subtitle in the same language (srt format). <a href="%s" >Download</a>, install and launch perroquet.'), RessourceManager::getInnerUrl('download')) . '</p>
                    <p>' . sprintf(_('You must download Perroquet, run it, create a new exercise and put the video file in the first field and the subtitles in the same language then video in the second field. To learn to use all the features of Perroquet, see the <a href="%s" >documentation</a>.'), RessourceManager::getInnerUrl('documentation')) . '</p>
                    <p>' . _('If you want to test perroquet but you have no video available, you can use the integrated exercises manager. You can find it in "Edit > Exercices Manager" and provide a easy way to install exercises from a online database.') . '</p>
                    <p>' . _('If you want plan to test perroquet without internet connection, you also can download an exercises now from the online exercise repository and import it in perroquet later (File > Import): <a href="/exercises/" >Exercises repository</a>') . '</p>
                    <p>' . _('For now, the online exercises only allows you to practice understanding English.') . '</p>

                    

                <h2>' . _('News') . '</h2>

                    <h3>' . _('Version 1.1.1 - 2011-05-08') . '</h3>
                    <ul>
                        <li>' . _('No more display subtitles embeded is a mkv file') . '</li>
                        <li>' . _('Fix a project loading bug in in progress sequences') . '</li>
                        <li>' . _('Place the cursor at the end of a moved word') . '</li>
                        <li>' . _('Fix deletion bug') . '</li>
                        <li>' . _('Fix the cursor position when an alias is used') . '</li>
                        <li>' . _('Fix the cursor position whe the last word is completed') . '</li>
                        <li>' . _('Fix the cursor position after using hint') . '</li>
                        <li>' . _('Fix crash if a config key is missing in the config') . '</li>
                        <li>' . _('Update the translation') . '</li>
                    </ul>

                    <h3>' . _('Version 1.1.0 - 2010-06-21') . '</h3>
                    <ul>
                        <li>' . _('Add repository manager') . '</li>
                        <li>' . _('Packages import and export') . '</li>
                        <li>' . _('Refactoring most of the code') . '</li>
                        <li>' . _('Add others exercise languages') . '</li>
                        <li>' . _('Added aliases and synonyms') . '</li>
                        <li>' . _('Show last open files') . '</li>
                        <li>' . _('Add many teaching tools') . '</li>
                        <li>' . _('Change exercise properties') . '</li>
                        <li>' . _('Add many navigation toots') . '</li>
                        <li>' . _('Add many new help tools') . '</li>
                        <li>' . _('Support multi files exercises') . '</li>
                        <li>' . _('Automatic move of wrong placed words') . '</li>
                        <li>' . _('Fix various bugs') . '</li>
                        <li>' . _('Translation updates') . '</li>
                    </ul>

                    <h3>' . _('Version 1.0.1 - 2010-01-13') . '</h3>
                    <ul>
                        <li>' . _('Improve window resize') . '</li>
                        <li>' . _('Add new shortcuts') . '</li>
                        <li>' . _('Remove html tags in srt files') . '</li>
                        <li>' . _('Replace | by new line in srt') . '</li>
                        <li>' . _('Handle perroquet file, add mime type and icons on perroquet exercise') . '</li>
                        <li>' . _('Improve exercice creation dialog') . '</li>
                        <li>' . _('Add tooltips') . '</li>
                        <li>' . _('Reimplement input system to support specials characters') . '</li>
                        <li>' . _('Fix various bugs') . '</li>
                        <li>' . _('Translation updates') . '</li>
                    </ul>
                <h2>' . _('Licence') . '</h2>
                    <p>' . _('Perroquet  is a free software distributed under the GNU Public License version 3 or higher. The source code of this software is available here: <a href="https://launchpad.net/perroquet/+download" >Download page at launchpad</a>') . '</p>

                    <p>' . _('The full text of the license is available here <a href="http://www.gnu.org/licenses/gpl.html">GPL</a>.') . '</p>
        ';
        return $content;
    }
Exemplo n.º 21
0
    function generateAdminMenu()
    {
        $menu = '';
        $menu .= '
            <li ' . ($this->startswith($this->id, 'admin/user_list') ? 'class= "active"' : '') . '><a href="' . RessourceManager::getInnerUrl('admin/user_list') . '/">' . _('Users list') . '</a></li>
            <li ' . ($this->startswith($this->id, 'exercises/propose_list') ? 'class= "active"' : '') . '><a href="' . RessourceManager::getInnerUrl('exercises/propose_list') . '/">' . _('Proposed exercises') . '</a></li>
                <li ' . ($this->startswith($this->id, 'exercises/add_exercise') ? 'class= "active"' : '') . '><a href="' . RessourceManager::getInnerUrl('exercises/add_exercise') . '/">' . _('Add an exercise') . '</a></li>

            ';
        return $menu;
    }
Exemplo n.º 22
0
 function displayContent()
 {
     $content = '';
     $content .= '
         <h2>' . _('Administrators') . '</h2>';
     $results = DatabaseManager::getQuery("SELECT * FROM users WHERE admin=1 ");
     $content .= '<table>
             <thead>
                 <th>' . _('OpenID') . '</th>
                 <th>' . _('Name') . '</th>
                 <th>' . _('Email') . '</th>
                 <th>' . _('Admin rights') . '</th>
                 <th>' . _('Delete') . '</th>
             </thead>
             <tbody>
         ';
     while ($result = $results->fetchArray()) {
         $content .= '<tr>';
         $content .= '<td>' . $result['openid'] . '</td>';
         $content .= '<td>' . $result['name'] . '</td>';
         $content .= '<td>' . $result['email'] . '</td>';
         $content .= '<td><a href="' . RessourceManager::getInnerUrl('admin/user_list') . '?remove_rights=' . $result['openid'] . '">' . _('Remove') . '</a></td>';
         $content .= '<td><a href="' . RessourceManager::getInnerUrl('admin/user_list') . '?delete=' . $result['openid'] . '">' . _('Delete') . '</a></td>';
         $content .= '</tr>';
     }
     $content .= '<tbody></table>';
     $content .= '
         <h2>' . _('Users') . '</h2>';
     $results = DatabaseManager::getQuery("SELECT * FROM users WHERE admin=0 ");
     $content .= '<table>
             <thead>
                 <th>' . _('OpenID') . '</th>
                 <th>' . _('Name') . '</th>
                 <th>' . _('Email') . '</th>
                 <th>' . _('Admin rights') . '</th>
                     <th>' . _('Delete') . '</th>
             </thead>
             <tbody>
         ';
     while ($result = $results->fetchArray()) {
         $content .= '<tr>';
         $content .= '<td>' . $result['openid'] . '</td>';
         $content .= '<td>' . $result['name'] . '</td>';
         $content .= '<td>' . $result['email'] . '</td>';
         $content .= '<td><a href="' . RessourceManager::getInnerUrl('admin/user_list') . '?add_rights=' . $result['openid'] . '">' . _('Add') . '</a></td>';
         $content .= '<td><a href="' . RessourceManager::getInnerUrl('admin/user_list') . '?delete=' . $result['openid'] . '">' . _('Delete') . '</a></td>';
         $content .= '</tr>';
     }
     $content .= '<tbody></table>';
     return $content;
 }