diff options
Diffstat (limited to 'tpl/study')
-rw-r--r-- | tpl/study/batch.php | 23 | ||||
-rw-r--r-- | tpl/study/batch_review.php | 15 | ||||
-rw-r--r-- | tpl/study/deck.php | 68 | ||||
-rw-r--r-- | tpl/study/index.php | 43 | ||||
-rw-r--r-- | tpl/study/lib_sidebar.php | 50 | ||||
-rw-r--r-- | tpl/study/list.php | 55 | ||||
-rw-r--r-- | tpl/study/setrate.php | 18 |
7 files changed, 0 insertions, 272 deletions
diff --git a/tpl/study/batch.php b/tpl/study/batch.php deleted file mode 100644 index 6eaa99c..0000000 --- a/tpl/study/batch.php +++ /dev/null @@ -1,23 +0,0 @@ -<?php - -$title = $info['uname'] . ':' . $info['lname'] . ' - ' . $info['bname']; - -$javascript = "\nconst batchid = " . $info['batchid'] . "\n\n". - "const batch_data = " . $info['json_data'] . ";\n\n". - "const reviews_data = $reviews;\n\n". - "var notes = " . $info['notes'] . ";\n\n"; -$js_include = array("js/prototype.js", "js/liststudy.js"); -$onload_js = 'show_batch_table();'; - -require("tpl/general/top.php"); - -echo '<div class="small_right"><a href="batchreview-study-' . $info['batchid'] . '">test now</a> | <a href="list-study-' . $info['studyid'] . '#batch_' . $info['batchid'] . '">back</a></div>'; - -echo '<h2>Items in this list</h2>'; -echo '<div id="items">Please wait, processing...</div>'; -echo '<h2>Reviews</h2>'; -echo '<div id="reviews">Please wait, processing...</div>'; - -require("tpl/study/lib_sidebar.php"); -require("tpl/general/bottom.php"); - diff --git a/tpl/study/batch_review.php b/tpl/study/batch_review.php deleted file mode 100644 index abe1944..0000000 --- a/tpl/study/batch_review.php +++ /dev/null @@ -1,15 +0,0 @@ -<?php - -$title = "Testing " . $info['uname'] . ':' . $info['lname'] . ' - ' . $info['bname']; - -$javascript = "\n\nconst batchid = " . $info['batchid'] . "\n". - "const batch_data = " . $info['json_data'] . ";\n\n". - "var notes = " . $info['notes'] . ";\n\n"; -$js_include = array("js/prototype.js", "js/reviewdesu.js"); -$onload_js = 'start_review();'; - -require("tpl/general/top.php"); - -echo '<div id="core">Please wait, processing...</div>'; - -require("tpl/general/bottom.php"); diff --git a/tpl/study/deck.php b/tpl/study/deck.php deleted file mode 100644 index 42ef784..0000000 --- a/tpl/study/deck.php +++ /dev/null @@ -1,68 +0,0 @@ -<?php - -$title = "Studying " . $study['deckowner'] . ':' . $study['deckname']; -require("tpl/general/top.php"); - -echo '<div class="small_right"><a href="deckrm-study-' . $studyid . '">stop studying</a> | <a href="view-deck-' . $study['deckid'] . '">view whole deck</a></div>'; - -echo '<div style="margin-top: 20px;text-align: center; font-size: 1.2em;">'; -echo 'Load : ' . $load . '/' . $study['learn_rate'] . ' - <a href="setrate-study-' . $studyid . '">change study rate</a></div>'; - -if (isset($next_card)) { - if ($next_card) { - echo '<div class="study_card">'; - echo '<div class="small_right"><a href="setcard-study-'.$next_card['id'].'-0">skip this card (0)</a><br />'; - echo '<a href="setcard-study-'.$next_card['id'].'-1">learn this card (1)</a><br />'; - echo '<a href="setcard-study-'.$next_card['id'].'-4">I know this already (4)</a><br />'; - echo '<a href="setcard-study-'.$next_card['id'].'-7">I totally know this already (7)</a></div>'; - echo '<code style="font-weight: bold">(next card) #'.$next_card['number'].': '.$next_card['name'].'</code>'; - echo $next_card['text_html']; - echo '<div style="clear: both"></div></div>'; - } else { - echo '<p>No more cards to study !</p>'; - } -} - -echo '<div class="ordering_links">' . filters_html_full() . '</div>'; - -if (count($study_cards) == 0) { - echo '<br /><div class="message">No cards in this view. Switch to another view to see more stuff.</div>'; -} else { - foreach($study_cards as $card) { - echo '<div class="study_card scb'.$card['level'].'">'; - - $l = array(); - if ($card['level'] > 0) { - $l[] = '<a href="setcard-study-'.$card['id'].'-0">'. ($card['level'] >= 4 ? 'put in skip list' : 'skip this card') . '</a>'; - } - if ($card['must_study'] || $card['level'] == 0 || $card['level'] == 7) { - $l[] = '<a href="setcard-study-'.$card['id'].'-1">'. ($card['level'] == 0 ? 'learn this card' : 'I forgot all about this'). ' (1)</a>'; - if ($card['level'] > 0 and $card['level'] < 3) { - $l[] = '<a href="setcard-study-'.$card['id'].'-'.($card['level']+1).'" style="font-weight: bold">I\'m learning this ('.($card['level']+1).')</a>'; - } - if ($card['level'] < 4) { - $l[] = '<a href="setcard-study-'.$card['id'].'-4"'. - ($card['level'] == 3 ? ' style="font-weight: bold"' : '') - .'>I know this (4)</a>'; - } - if ($card['level'] > 3 and $card['level'] < 6) { - $l[] = '<a href="setcard-study-'.$card['id'].'-'.($card['level']+1).'" style="font-weight: bold">I know this ('.($card['level']+1).')</a>'; - } - } - if ($card['level'] < 7) { - $l[] = '<a href="setcard-study-'.$card['id'].'-7"' . - ($card['level'] == 6 && $card['must_study'] ? ' style="font-weight: bold"' : '') - .'>I totally know this (7)</a>'; - } - echo '<div class="small_right">'; - echo implode("<br />\n", $l); - echo '</div>'; - - echo '<code' . ($card['must_study'] ? ' style="font-weight: bold"' : '') . '>(' . ($card['level'] == 0 ? 'skipped' : 'level '.$card['level']) .') #'.$card['number'].': '.$card['name'].'</code>'; - echo $card['text']; - echo '<div style="clear: both"></div></div>'; - } -} - -require ("lib_sidebar.php"); -require("tpl/general/bottom.php"); diff --git a/tpl/study/index.php b/tpl/study/index.php deleted file mode 100644 index 83899e7..0000000 --- a/tpl/study/index.php +++ /dev/null @@ -1,43 +0,0 @@ -<?php - -$title = "Studies"; -require("tpl/general/top.php"); - -?> - -<p>Welcome to the <em>studies</em> section. This is a simple study program, with two methods of studying available.</p> - -<h3>First method : cards</h3> -<p>The first method is based on -decks of cards, keeping track of your progress and everything.</p> - -<p>The cards you are studying are classified in the following <em>boxes</em> :</p> -<ul> -<li><strong>Skipped cards :</strong> cards you can't really say you know, but you don't want to study right now.</li> -<li><strong>Levels 1 to 3 :</strong> you are reviewing these cards frequently, in order to <em>learn</em> them.</li> -<li><strong>Level 4 to 6 :</strong> we consider you <em>know</em> that card, and you are just reviewing it from times to times, - making sure you didn't forget it.</li> -<li><strong>Level 7 :</strong> you totally know that card and will never be asked about it again.</li> -</ul> -<p>You can freely move cards into different boxes using the links that appear at the right of the card, the number in the parenthesis being - the level that card will have if you click it. -Cards you are supposed to study or review today appear with a bold title : that means that <em>today</em>, - you should decide to put it either in the next box, or somewhere else.</p> -<p>The <em>load</em> is calculated as a function of the number of cards with levels from 1 to 3 : it represents the quantity of - stuff you are <em>learning</em> right now. When the load is smaller than the study rate you ask for, new cards will be suggested for - you to learn (if any are available in the deck).</p> - -<p>Please take a look at the <a href="deck">list of decks</a> and start learning whatever you want to learn. -You can also create your own decks, the editor is pretty intuitive.</p> - -<h3>Second method : study lists</h3> -<p>In this method, we have lists of stuff to learn (like vocabulary), divided into batches (the batches are sorted -for a given list). You will study one batch at a time, and take a test for one batch at a time. All your test results - are kept in storage and are used to display your progress.</p> - -<p>Please take a look at the <a href="list">list of lists</a> and start learning whatever you want to learn.</p> - -<?php - -require ("lib_sidebar.php"); -require("tpl/general/bottom.php"); diff --git a/tpl/study/lib_sidebar.php b/tpl/study/lib_sidebar.php deleted file mode 100644 index c82d0a4..0000000 --- a/tpl/study/lib_sidebar.php +++ /dev/null @@ -1,50 +0,0 @@ -<?php - -if ($user['id'] != 0) { - $studying_decks = array(); - $d = sql("SELECT deck_study.id AS id, decks.name AS name, account.login AS username FROM deck_study ". - "LEFT JOIN decks ON decks.id = deck_study.deck LEFT JOIN account ON account.id = decks.owner ". - "WHERE deck_study.user = ".$user['id']); - while($dd = mysql_fetch_assoc($d)) $studying_decks[] = $dd; - - $my_decks = array(); - $d = sql("SELECT id, name FROM decks WHERE owner = " . $user['id']); - while ($dd = mysql_fetch_assoc($d)) $my_decks[] = $dd; - - $studying_lists = array(); - $d = sql("SELECT list_study.id AS id, lists.name AS name, account.login AS username FROM list_study ". - "LEFT JOIN lists ON lists.id = list_study.list LEFT JOIN account ON account.id = lists.owner ". - "WHERE list_study.user = " . $user['id']); - while($dd = mysql_fetch_assoc($d)) $studying_lists[] = $dd; - - $my_lists = array(); - $d = sql("SELECT id, name FROM lists WHERE owner = " . $user['id']); - while ($dd = mysql_fetch_assoc($d)) $my_lists[] = $dd; - - echo '</div><div class="contents-left">'; - echo '<h1>Studying decks</h1><ul>'; - foreach($studying_decks as $deck) { - echo '<li><code>'.$deck['username'].':<a href="deck-study-' . $deck['id'] . '">' . $deck['name'] . '</a></code></li>'; - } - echo '<li><a class="tool_link" href="deck">[+] Show all decks</a></li></ul>'; - - echo '<h1>My decks</h1><ul>'; - foreach($my_decks as $deck) { - echo '<li><code><a href="view-deck-' . $deck['id'] . '">' . $deck['name'] . '</a></code></li>'; - } - echo '<li><a class="tool_link" href="new-deck">[+] Create deck</a></li></ul>'; - - - echo '<h1>Studying lists</h1><ul>'; - foreach($studying_lists as $list) { - echo '<li><code>'.$list['username'].':<a href="list-study-' . $list['id'] . '">' . $list['name'] . '</a></code></li>'; - } - echo '<li><a class="tool_link" href="list">[+] Show all lists</a></li></ul>'; - - echo '<h1>My lists</h1><ul>'; - foreach($my_lists as $list) { - echo '<li><code><a href="view-list-' . $list['id'] . '">' . $list['name'] . '</a></code></li>'; - } - echo '<li><a class="tool_link" href="new-list">[+] Create list</a></li></ul>'; - -} diff --git a/tpl/study/list.php b/tpl/study/list.php deleted file mode 100644 index 265d8a7..0000000 --- a/tpl/study/list.php +++ /dev/null @@ -1,55 +0,0 @@ -<?php - -$title = "Studying " . $study['listowner'] . ':' . $study['listname']; -require("tpl/general/top.php"); - - -echo '<div class="small_right"><a href="listrm-study-' . $studyid . '">stop studying</a></div>'; - -echo '<div class="ordering_links">' . filters_html_full() . '</div>'; - -echo '<table><tr><th>Batch name</th><th>actions</th><th>tests</th><th>last test</th><th>score</th></tr>'; -foreach ($batches as $batch) { - $color = ""; - if ($batch['lr_date']) { - if ($batch['lr_score'] == 100) - $color = "#00AA00"; - else if ($batch['lr_score'] >= 90) - $color = "#22EE22"; - else if ($batch['lr_score'] >= 80) - $color = "#55FF55"; - else if ($batch['lr_score'] >= 60) - $color = "#EEEE00"; - else if ($batch['lr_score'] >= 40) - $color = "#FFAA22"; - else - $color = "#FF7777"; - - } - if ($color != "") $color = ' style="background-color: ' . $color . '"'; - - $days_color = ($batch['lr_days'] >= 30 ? "#BFBFBF" : - ($batch['lr_days'] >= 20 ? "#C7C7C7" : - ($batch['lr_days'] >= 14 ? "#CFCFCF" : - ($batch['lr_days'] >= 10 ? "#D7D7D7" : - ($batch['lr_days'] >= 7 ? "#DFDFDF" : - ($batch['lr_days'] >= 5 ? "#E7E7E7" : - ($batch['lr_days'] >= 3 ? "#EFEFEF" : - ($batch['lr_days'] >= 1 ? "#F7F7F7" : "#FFFFFF")))))))); - $dc = ($batch['lr_date'] ? ' style="background-color: ' . $days_color .'"' : ''); - - echo '<tr>'; - echo '<td><a id="batch_' . $batch['id'] . '"></a><code>' . $batch['name'] . '</code></td>'; - echo '<td><a href="batch-study-' . $batch['id'] . '">view</a> | <a href="batchreview-study-' . $batch['id'] . '">test</a></td>'; - echo '<td>' . $batch['num_reviews'] . '</td>'; - echo '<td'.$dc.'>' . ($batch['lr_date'] ? $batch['lr_date'] : "never") . '</td>'; - echo '<td'.$color.'>' . ($batch['lr_date'] ? $batch['lr_score'] . '/100' : 'N/A') . - ($batch['blr_date'] ? ($batch['lr_score'] > $batch['blr_score'] ? '<span style="color: green"> ➚</span>' : - ($batch['lr_score'] < $batch['blr_score'] ? '<span style="color: orange;"> ➘</span>' : - '<span style="color: grey"> ➙</span>')) : '') . '</td>'; - echo '</tr>'; -} -echo '</table>'; - -require("lib_sidebar.php"); -require("tpl/general/bottom.php"); diff --git a/tpl/study/setrate.php b/tpl/study/setrate.php deleted file mode 100644 index f632b33..0000000 --- a/tpl/study/setrate.php +++ /dev/null @@ -1,18 +0,0 @@ -<?php - -$title = "Change learn rate for " . $study['deckowner'] . ':' . $study['deckname']; -require("tpl/general/top.php"); - -echo '<p><strong>Current learn rate :</strong> ' . $study['learn_rate'] . ' - <a href="deck-study-' . $studyid . '">keep this rate</a></p>'; - -echo '<p>Please choose how much you intend on studying :</p><ul>'; -echo '<li><a href="setrate-study-' . $studyid . '-5">Just a tiny bit (5)</a></li>'; -echo '<li><a href="setrate-study-' . $studyid . '-10">A little (10)</a></li>'; -echo '<li><a href="setrate-study-' . $studyid . '-15">Some (15)</a></li>'; -echo '<li><a href="setrate-study-' . $studyid . '-20">A lot (20)</a></li>'; -echo '<li><a href="setrate-study-' . $studyid . '-30">A real lot (30)</a></li>'; -echo '<li><a href="#" onclick="if (rate = prompt(\'Desired learn rate :\', 10)) { window.location = \'setrate-study-' . $studyid . '-\' + rate; }">Custom</a></li>'; -echo '</ul>'; - -require ("lib_sidebar.php"); -require("tpl/general/bottom.php"); |