Skip to content

Commit

Permalink
fixed sql query and minified js files
Browse files Browse the repository at this point in the history
  • Loading branch information
irinahpe committed Dec 20, 2023
1 parent 9b7de1a commit d201e2c
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion amd/build/initialize.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion amd/build/post_dialog.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion amd/build/standardtime.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions sync.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
if (optional_param('datedisabled', false, PARAM_BOOL)) {
// We already have an evaluation request for this course: fetch the start- and enddates
$sql = 'SELECT v.id, v.starttime, v.endtime, max(v.timemodified) as time FROM {' . \block_evasys_sync\dbtables::EVAL_VERANSTS . '} v INNER JOIN ' .
'{' . \block_evasys_sync\dbtables::EVAL_COURSES . '} c on v.evalid=c.evalid WHERE c.courseid = :courseid ORDER BY time DESC';
'{' . \block_evasys_sync\dbtables::EVAL_COURSES . '} c on v.evalid=c.evalid WHERE c.courseid = :courseid GROUP BY v.id, v.starttime ORDER BY time DESC';
$record = $DB->get_record_sql($sql, ['courseid' => $courseid]);
// $record = course_evaluation_allocation::get_record_by_course($courseid);
$startdate = new \DateTime('@' . $record->starttime, \core_date::get_server_timezone_object());
Expand All @@ -49,7 +49,7 @@
if (optional_param('only_end', false, PARAM_BOOL)) {
// Existing start date should not be changed; just the end date. Fetch start date from record.
$sql = 'SELECT v.id, v.starttime, max(v.timemodified) as time FROM {' . \block_evasys_sync\dbtables::EVAL_VERANSTS . '} v INNER JOIN ' .
'{' . \block_evasys_sync\dbtables::EVAL_COURSES . '} c on v.evalid=c.evalid WHERE c.courseid = :courseid ORDER BY time DESC';
'{' . \block_evasys_sync\dbtables::EVAL_COURSES . '} c on v.evalid=c.evalid WHERE c.courseid = :courseid GROUP BY v.id, v.starttime ORDER BY time DESC';
$record = $DB->get_record_sql($sql, ['courseid' => $courseid]);
$startdate = new \DateTime('@' . $record->starttime, \core_date::get_server_timezone_object());
} else {
Expand Down

0 comments on commit d201e2c

Please sign in to comment.