Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moodle 35 working... with PostgreSQL #15

Open
wants to merge 1 commit into
base: MOODLE_35_WORKING
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion editview.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {

Expand Down
4 changes: 2 additions & 2 deletions locallib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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));

Expand All @@ -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));

Expand Down
2 changes: 1 addition & 1 deletion playview.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 = '<table width="100%">';
Expand Down