Skip to content

Commit 9356f4a

Browse files
committed
Fix codechecker issues
1 parent 06ba45a commit 9356f4a

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

classes/question/file.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,8 @@ public function response_complete($responsedata) {
124124
) {
125125
$answer = reset($responsedata->answers[$this->id]);
126126
$answered = ((int)$answer->value > 0);
127-
// If $responsedata is webform data, check that it is not empty.
128127
} else if (isset($responsedata->{'q'.$this->id})) {
128+
// If $responsedata is webform data, check that it is not empty.
129129
$draftitemid = (int)$responsedata->{'q' . $this->id};
130130
if ($draftitemid > 0) {
131131
$info = file_get_draft_area_info($draftitemid);

classes/responsetype/file.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -119,17 +119,17 @@ public static function response_answers_by_question($rid) {
119119
/**
120120
* Delete old entries from the questionnaire_response_file table and also the corresponding entries
121121
* in the files table.
122-
* @param int $question_id
123-
* @param int $response_id
122+
* @param int $questionid
123+
* @param int $responseid
124124
* @return void
125125
* @throws \dml_exception
126126
*/
127-
public static function delete_old_response(int $question_id, int $response_id) {
127+
public static function delete_old_response(int $questionid, int $responseid) {
128128
global $DB;
129129
// Check, if we have an old response file from a former attempt.
130130
$record = $DB->get_record(static::response_table(), [
131-
'response_id' => $response_id,
132-
'question_id' => $question_id,
131+
'response_id' => $responseid,
132+
'question_id' => $questionid,
133133
]);
134134
if ($record) {
135135
// Old record found, then delete all referenced entries in the files table and then delete this entry.

0 commit comments

Comments
 (0)