From a565e649898c629874ef812a13806b1c384f68e4 Mon Sep 17 00:00:00 2001 From: Nicolas BERNSTEIN Date: Sun, 18 Sep 2011 12:07:29 +0200 Subject: Added study program. Yay! --- tpl/study/deck.php | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 tpl/study/deck.php (limited to 'tpl/study/deck.php') diff --git a/tpl/study/deck.php b/tpl/study/deck.php new file mode 100644 index 0000000..d231705 --- /dev/null +++ b/tpl/study/deck.php @@ -0,0 +1,68 @@ +stop studying'; + +echo '
'; +echo 'Load : ' . $load . '/' . $study['learn_rate'] . ' - change study rate
'; + +if (isset($next_card)) { + if ($next_card) { + echo '
'; + echo ''; + echo '(next card) #'.$next_card['number'].': '.$next_card['name'].''; + echo $next_card['text_html']; + echo '
'; + } else { + echo '

No more cards to study !

'; + } +} + +echo ''; + +if (count($study_cards) == 0) { + echo '

Nothing in this list at the moment.

'; +} else { + foreach($study_cards as $card) { + echo '
'; + + $l = array(); + if ($card['level'] > 0) { + $l[] = ''. ($card['level'] >= 4 ? 'put in skip list' : 'skip this card') . ''; + } + if ($card['must_study'] || $card['level'] == 0 || $card['level'] == 7) { + $l[] = ''. ($card['level'] == 0 ? 'learn this card' : 'I forgot all about this'). ' (1)'; + if ($card['level'] > 0 and $card['level'] < 3) { + $l[] = 'I\'m learning this ('.($card['level']+1).')'; + } + if ($card['level'] < 4) { + $l[] = 'I know this (4)'; + } + if ($card['level'] > 3 and $card['level'] < 6) { + $l[] = 'I know this ('.($card['level']+1).')'; + } + } + if ($card['level'] < 7) { + $l[] = 'I totally know this (7)'; + } + echo '
'; + echo implode("
\n", $l); + echo '
'; + + echo '(' . ($card['level'] == 0 ? 'skipped' : 'level '.$card['level']) .') #'.$card['number'].': '.$card['name'].''; + echo $card['text']; + echo '
'; + } +} + +require ("lib_sidebar.php"); +require("tpl/general/bottom.php"); -- cgit v1.2.3