Skip to content

Commit

Permalink
Merge pull request #223 from reskit/MOODLE_36_STABLE
Browse files Browse the repository at this point in the history
Set current courseid when importing a custom SQL report.
  • Loading branch information
jleyva authored Oct 3, 2024
2 parents 8a41734 + a0b3fa2 commit 9c6ecbc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions locallib.php
Original file line number Diff line number Diff line change
Expand Up @@ -593,6 +593,8 @@ function cr_import_xml(string $xml, object $course) {

if (array_key_exists('customsql', $tempcomponents)) {

// Set current courseid.
$tempcomponents['customsql']['config']->courseid = $course->id;
$querysql = str_replace(["\'", '\"'], ["'", '"'], $tempcomponents['customsql']['config']->querysql);
$tempcomponents['customsql']['config']->querysql = $querysql;
}
Expand Down

0 comments on commit 9c6ecbc

Please sign in to comment.