Skip to content

Commit

Permalink
fix code checker issues
Browse files Browse the repository at this point in the history
  • Loading branch information
ferishili committed Aug 21, 2024
1 parent c3d3af2 commit f6fc182
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion classes/external.php
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ public static function unarchive_uploadjob(int $contextid, int $ocinstanceid, in
'id' => $params['uploadjobid'],
'ocinstanceid' => $params['ocinstanceid'],
'courseid' => $course->id,
'status' => upload_helper::STATUS_ARCHIVED_FAILED_UPLOAD
'status' => upload_helper::STATUS_ARCHIVED_FAILED_UPLOAD,
];
$uploadjob = $DB->get_record('block_opencast_uploadjob', $params);

Expand Down
7 changes: 4 additions & 3 deletions classes/local/upload_helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ protected function upload_failed($job, $errormessage) {
'errormessage' => $errormessage,
'countfailed' => $job->countfailed,
'ocinstanceid' => $job->ocinstanceid,
'archived' => $isarchived
'archived' => $isarchived,
],
]
);
Expand Down Expand Up @@ -715,7 +715,8 @@ public function cron() {
$ocinstances = settings_api::get_ocinstances();
foreach ($ocinstances as $ocinstance) {
// Get all waiting jobs.
$sql = "SELECT * FROM {block_opencast_uploadjob} WHERE status < ? AND status <> ? AND ocinstanceid = ? ORDER BY timemodified ASC ";
$sql = "SELECT * FROM {block_opencast_uploadjob}" .
" WHERE status < ? AND status <> ? AND ocinstanceid = ? ORDER BY timemodified ASC ";

$limituploadjobs = get_config('block_opencast', 'limituploadjobs_' . $ocinstance->id);

Expand All @@ -726,7 +727,7 @@ public function cron() {
$params = [
self::STATUS_TRANSFERRED,
self::STATUS_ARCHIVED_FAILED_UPLOAD,
$ocinstance->id
$ocinstance->id,
];

$jobs = $DB->get_records_sql($sql, $params, 0, $limituploadjobs);
Expand Down
2 changes: 1 addition & 1 deletion lang/en/block_opencast.php
Original file line number Diff line number Diff line change
Expand Up @@ -581,8 +581,8 @@
$string['notificationeventstatusteachers'] = 'Notify all course teachers about the event process status';
$string['notificationeventstatusteachers_desc'] = 'With this option, apart from the uploader of the video, all the teachers of the course where the video is uploaded from get notified about the Opencast processing status.';
$string['notifications_settings_header'] = 'Notifications';
$string['notificationuploadarchived_subj'] = 'Opencast Archived Event Upload Notification';
$string['notificationuploadarchived_body'] = 'The upload job for the video titled "{$a->title}" in the course "{$a->coursefullname}" (ID: {$a->courseid}) has been archived due to reaching the limit of failed attempts. Your action is now required to either delete the job or manually put the job back into the queue. Please contact your system administrator to ensure the upload problem is resolved.';
$string['notificationuploadarchived_subj'] = 'Opencast Archived Event Upload Notification';
$string['notificationuploaduqeuestatus_body'] = 'Processing of this video: {$a->videotitle} in the course: {$a->coursefullname} (ID: {$a->courseid}) is queued, but has not yet started. The video is currently waiting behind {$a->waitingnum} other video(s) in the processing queue.';
$string['notificationuploaduqeuestatus_subj'] = 'Opencast Event Upload Notification';
$string['notpublished'] = 'Not published';
Expand Down

0 comments on commit f6fc182

Please sign in to comment.