diff --git a/editview.php b/editview.php index d7d256d..d17a803 100644 --- a/editview.php +++ b/editview.php @@ -59,7 +59,7 @@ $akeys = preg_grep('/^a/', $keys); // Filter out only the assigned updating. $params = array('flashcardid' => $flashcard->id); - $deckusers = $DB->get_records('flashcard_card', $params, 'id', 'DISTINCT userid, userid'); + $deckusers = $DB->get_records('flashcard_card', $params, '', 'DISTINCT userid, userid'); foreach ($qkeys as $qkey) { diff --git a/locallib.php b/locallib.php index 70127aa..c76e265 100644 --- a/locallib.php +++ b/locallib.php @@ -233,7 +233,7 @@ function flashcard_get_card_status(&$flashcard) { WHERE c.flashcardid = ? GROUP BY - c.deck + c.deck, dd.questiontext "; $recs = $DB->get_records_sql($sql, array($flashcard->id)); @@ -251,7 +251,7 @@ function flashcard_get_card_status(&$flashcard) { WHERE c.flashcardid = ? GROUP BY - c.entryid + c.entryid, dd.questiontext "; $accesses = $DB->get_records_sql($sql, array($flashcard->id)); diff --git a/playview.php b/playview.php index 38a0918..ba35491 100644 --- a/playview.php +++ b/playview.php @@ -61,7 +61,7 @@ deck = {$deck} AND id $usql "; - +if (empty($params[0])) $params = array(0=>0); //Avoid error PostgreSQL if ($cards = $DB->get_records_select('flashcard_card', $select, $params)) { foreach ($cards as $card) { $obj = new stdClass(); diff --git a/renderer.php b/renderer.php index 42c9559..ac059a7 100644 --- a/renderer.php +++ b/renderer.php @@ -152,7 +152,7 @@ public function print_deck(&$flashcard, &$cm, $deck) { * @param object $status a status object to be filled by the function */ public function print_deck_status(&$flashcard, $userid, &$status) { - + global $OUTPUT; $str = ''; $str = '';