1
0
mirror of https://github.com/PlagiarismCheck/moodle-plagiarism_pchkorg.git synced 2024-12-22 12:10:08 +00:00

Do not send empty filter values

This commit is contained in:
Jane Adelmann 2022-05-04 21:03:11 +03:00
parent 17bcf5747f
commit e8838f35ed
No known key found for this signature in database
GPG Key ID: 4CCF39DF30B8AF72

View File

@ -193,7 +193,9 @@ class plagiarism_pchkorg_api_provider {
$body .= $this->get_part('skip_percentage_words_validation', '1', $boundary);
$body .= $this->get_part('lms', 'moodle', $boundary);
foreach ($filters as $filtername => $filtervalue) {
$body .= $this->get_part($filtername, $filtervalue, $boundary);
if ($filtervalue !== null) {
$body .= $this->get_part($filtername, $filtervalue, $boundary);
}
}
$body .= $this->get_file_part('content', $content, $mime, $filename, $boundary);
$body .= '--' . $boundary . '--' . $eol;
@ -380,7 +382,9 @@ class plagiarism_pchkorg_api_provider {
$body .= $this->get_part('attachment_id', $attachmentid, $boundary);
$body .= $this->get_part('lms', 'moodle', $boundary);
foreach ($filters as $filtername => $filtervalue) {
$body .= $this->get_part($filtername, $filtervalue, $boundary);
if ($filtervalue !== null) {
$body .= $this->get_part($filtername, $filtervalue, $boundary);
}
}
$body .= $this->get_file_part('text', $content, $mime, $filename, $boundary);
$body .= '--' . $boundary . '--' . $eol;