summaryrefslogtreecommitdiff
path: root/lib/study/batchreview.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/study/batchreview.php')
-rw-r--r--lib/study/batchreview.php25
1 files changed, 0 insertions, 25 deletions
diff --git a/lib/study/batchreview.php b/lib/study/batchreview.php
deleted file mode 100644
index 58fc852..0000000
--- a/lib/study/batchreview.php
+++ /dev/null
@@ -1,25 +0,0 @@
-<?php
-
-assert_redir(count($args) == 3, 'study');
-$batchid = intval($args[2]);
-
-$info = mysql_fetch_assoc(sql(
- "SELECT list_study.id AS studyid, batches.name AS bname, ".
- "lists.name AS lname, account.login AS uname, ".
- "batch_study.id AS bsid, batch_study.notes_json AS notes, ".
- "batches.id AS batchid, batches.json_data AS json_data ".
- "FROM batches LEFT JOIN list_study ON list_study.list = batches.list AND list_study.user = " . $user['id'] . " " .
- "LEFT JOIN batch_study ON batch_study.batch = $batchid AND batch_study.user = " . $user['id'] . " " .
- "LEFT JOIN lists ON batches.list = lists.id ".
- "LEFT JOIN account ON account.id = lists.owner ".
- "WHERE batches.id = $batchid"));
-assert_error($info, "This batch does not exist.");
-assert_error($info['studyid'] != 0, "You are not studying this list.");
-
-if ($info["bsid"] == 0) {
- sql("INSERT INTO batch_study(user, batch, last_review, notes_json) VALUES(" . $user['id'] . ", $batchid, 0, '{}')");
- $info['bsid'] = mysql_insert_id();
- $info['notes'] = '{}';
-}
-
-require("tpl/study/batch_review.php");