Skip to content

Commit

Permalink
Bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
drachels committed Oct 25, 2023
1 parent 16c9d2e commit 4f79791
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
4 changes: 2 additions & 2 deletions classes/privacy/provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ public static function delete_data_for_user(approved_contextlist $contextlist) {
if ($itemids) {
list($isql, $params) = $DB->get_in_or_equal($itemids, SQL_PARAMS_NAMED);
$params['userid'] = $userid;
$DB->delete_records_select('hotquestion_votes', "id $isql AND userid = :userid", $params);
$DB->delete_records_select('hotquestion_votes', "id $isql AND voter = :userid", $params);
$params = ['instanceid' => $cm->instance, 'userid' => $userid];
$DB->delete_records_select('hotquestion_questions', 'hotquestion = :instanceid AND userid = :userid', $params);
}
Expand Down Expand Up @@ -405,7 +405,7 @@ public static function delete_data_for_users(approved_userlist $userlist) {
// Delete comments made by a teacher about a particular item for a student.
$DB->delete_records_select(
'hotquestion_votes',
"userid $insql AND itemid $itsql",
"voter $insql AND id $itsql",
array_merge($inparams, $itparams)
);
}
Expand Down
5 changes: 5 additions & 0 deletions upgrade.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ This files describes changes in the Hot Question code.
Some items (3) have been done. Still have others (3) to do.


=== 4.1.8+=== 2023101702 released 20231025
20231025 HotQuestion_1104 - Error when deleting data for user Issue #86 at github.
Changed provider.php lines 366 and 408 to use voter instead of userid. Also to
use id instead of itemid in line 408.


=== 4.1.8+=== 2023101701 released 20231021
20230601 HotQuestion_1051 - $hotquestion->viewaftertimeclose in view.php at line 167
Expand Down
4 changes: 2 additions & 2 deletions version.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@

defined('MOODLE_INTERNAL') || die();

$plugin->version = 2023101701; // The current module version (Date: YYYYMMDDXX).
$plugin->version = 2023101702; // The current module version (Date: YYYYMMDDXX).
$plugin->requires = 2021051700; // Requires Moodle 3.11 version.
$plugin->cron = 0; // Period for cron to check this module (secs).
$plugin->component = 'mod_hotquestion';
$plugin->maturity = MATURITY_STABLE;
$plugin->release = "4.1.8+ (Build: 2023101701)"; // User-friendly version number.
$plugin->release = "4.1.8+ (Build: 2023101702)"; // User-friendly version number.
$plugin->supported = [311, 403];

0 comments on commit 4f79791

Please sign in to comment.