Skip to content

Commit

Permalink
Fixed multiple record of course logs.
Browse files Browse the repository at this point in the history
  • Loading branch information
prasanna-lmsace committed Apr 18, 2024
1 parent faa009b commit 90e1ffb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions classes/user.php
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,9 @@ public function get_user_points(bool $withdata=true) {
public function get_user_award_by_method(string $method, int $methodid) {
global $DB;

if ($result = $DB->get_record('tool_skills_awardlogs',
['userid' => $this->userid, 'method' => $method, 'methodid' => $methodid])) {
$condition = ['userid' => $this->userid, 'method' => $method, 'methodid' => $methodid];

if ($result = $DB->get_record('tool_skills_awardlogs', $condition, "*", IGNORE_MULTIPLE)) {
return $result->points;
}

Expand Down
2 changes: 1 addition & 1 deletion version.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

defined('MOODLE_INTERNAL') || die;

$plugin->version = 2024020805;
$plugin->version = 2024020806;
$plugin->requires = 2021051700; // Requires this Moodle version.
$plugin->component = 'tool_skills'; // Full name of the plugin (used for diagnostics).
$plugin->maturity = MATURITY_STABLE;
Expand Down

0 comments on commit 90e1ffb

Please sign in to comment.