From b0c23ea84327d48e3a4383fac3e795c2dc0a1215 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 31 Jan 2014 16:42:40 +0100 Subject: Remove all studying apps code. --- lib/study/setcard.php | 37 ------------------------------------- 1 file changed, 37 deletions(-) delete mode 100644 lib/study/setcard.php (limited to 'lib/study/setcard.php') diff --git a/lib/study/setcard.php b/lib/study/setcard.php deleted file mode 100644 index c71bbfe..0000000 --- a/lib/study/setcard.php +++ /dev/null @@ -1,37 +0,0 @@ - 0, "You are not studying this deck."); - -assert_error($info['need_check'] == 0, - 'This deck needs checking first. Please return here first, it should do it.'); - -assert_error($info['cardnumber'] <= $info['last_card'] + 1, "You must first add previous cards to your study list."); - -$level = intval($args[3]); -assert_error($level >= 0 && $level <= 7, "That level is invalid."); -$intervals = array(999999, 1, 2, 4, 8, 16, 32, 999999); - -if ($info['cardnumber'] == $info['last_card'] + 1) { - sql("INSERT INTO card_study(deck_study, card, level, next_review) ". - "VALUES($studyid, $cardid, $level, ADDDATE(CURDATE(), INTERVAL " . $intervals[$level] . " DAY))"); - sql("UPDATE deck_study SET last_card = last_card + 1 WHERE id = $studyid"); -} else { - assert_error($info['csid'] > 0, "Deck is inconsistent."); - sql("UPDATE card_study SET level = $level, next_review = ADDDATE(CURDATE(), INTERVAL " . $intervals[$level] . " DAY) WHERE id = " . $info['csid']); -} - -header("Location: deck-study-$studyid"); -die(); -- cgit v1.2.3