Code style tweaks

This commit is contained in:
PMKuipers 2023-08-26 16:51:35 +02:00
parent 974b3923bd
commit ecd47829e1
4 changed files with 8 additions and 9 deletions

View File

@ -414,7 +414,7 @@ class associationservice extends \external_api {
WHERE tc.studyplan_id = :studyplanid WHERE tc.studyplan_id = :studyplanid
OR tu.studyplan_id = :studyplanidtoo OR tu.studyplan_id = :studyplanidtoo
ORDER BY u.lastname, u.firstname"; ORDER BY u.lastname, u.firstname";
$rs = $DB->get_recordset_sql($sql,["studyplanid" => $studyplan->id(), "studyplanidtoo" => $studyplan->id()]); $rs = $DB->get_recordset_sql($sql, ["studyplanid" => $studyplan->id(), "studyplanidtoo" => $studyplan->id()]);
foreach ($rs as $u) { foreach ($rs as $u) {
$users[] = self::make_user_model($u); $users[] = self::make_user_model($u);

View File

@ -37,7 +37,7 @@ class assign_scanner extends scanner_base {
AND a.grade <> 0 AND (ag.id IS NULL OR asgn_sub.timemodified >= ag.timemodified) AND a.grade <> 0 AND (ag.id IS NULL OR asgn_sub.timemodified >= ag.timemodified)
"; ";
return $DB->get_fieldset_sql($sql,['iteminstance' => $this->gi->iteminstance]); return $DB->get_fieldset_sql($sql, ['iteminstance' => $this->gi->iteminstance]);
} }
protected function get_graded_users() { protected function get_graded_users() {
@ -47,7 +47,7 @@ class assign_scanner extends scanner_base {
LEFT JOIN {grade_items} gi on g.itemid = gi.id LEFT JOIN {grade_items} gi on g.itemid = gi.id
WHERE gi.itemmodule = 'assign' AND gi.iteminstance = :iteminstance WHERE gi.itemmodule = 'assign' AND gi.iteminstance = :iteminstance
AND g.finalgrade IS NOT NULL"; // MAy turn out to be needed, dunno. AND g.finalgrade IS NOT NULL"; // MAy turn out to be needed, dunno.
return $DB->get_fieldset_sql($sql,['iteminstance' => $this->gi->iteminstance]); return $DB->get_fieldset_sql($sql, ['iteminstance' => $this->gi->iteminstance]);
} }
public function count_ungraded($courseuserids = []) { public function count_ungraded($courseuserids = []) {

View File

@ -39,7 +39,7 @@ class quiz_scanner extends scanner_base {
JOIN {quiz_attempts} qza ON qna.questionusageid = qza.uniqueid JOIN {quiz_attempts} qza ON qna.questionusageid = qza.uniqueid
WHERE qas.state = 'needsgrading' AND qza.quiz = :iteminstance"; WHERE qas.state = 'needsgrading' AND qza.quiz = :iteminstance";
$rs = $DB->get_recordset_sql($sql,['iteminstance' => $this->gi->iteminstance]); $rs = $DB->get_recordset_sql($sql, ['iteminstance' => $this->gi->iteminstance]);
$submissions = []; $submissions = [];
foreach ($rs as $r) { foreach ($rs as $r) {
// Now, check if . // Now, check if .
@ -72,7 +72,7 @@ class quiz_scanner extends scanner_base {
WHERE gi.itemmodule = 'quiz' AND gi.iteminstance = :iteminstance WHERE gi.itemmodule = 'quiz' AND gi.iteminstance = :iteminstance
AND g.finalgrade IS NOT NULL"; // MAy turn out to be needed, dunno. AND g.finalgrade IS NOT NULL"; // MAy turn out to be needed, dunno.
$graded = $DB->get_fieldset_sql($sql,['iteminstance' => $this->gi->iteminstance]); $graded = $DB->get_fieldset_sql($sql, ['iteminstance' => $this->gi->iteminstance]);
if (count($courseuserids) > 0) { if (count($courseuserids) > 0) {
$graded = array_intersect($graded, $courseuserids); $graded = array_intersect($graded, $courseuserids);

View File

@ -27,11 +27,10 @@ $plugin->requires = 2021051700; // YYYYMMDDHH (This is the release version for M
$plugin->release = "1.0.0"; $plugin->release = "1.0.0";
$plugin->maturity = MATURITY_RC; $plugin->maturity = MATURITY_RC;
// Supported from Moodle 3.11 to 4.1 (4.2 not yet tested)/
// Supported from Moodle 3.11 to 4.1 (4.2 not yet tested).
$plugin->supported = [ 311, 401 ]; $plugin->supported = [ 311, 401 ];
$plugin->dependencies = [ $plugin->dependencies = [
'theme_boost' => 2019052000, 'theme_boost' => 2019052000,
]; ];