Work: Fix export excel , filter and error notice - refs BT#19164

pull/3977/head
Christian 5 years ago
parent 84774f096a
commit 837baa0cf1
  1. 6
      main/work/pending.php
  2. 4
      main/work/work.lib.php

@ -288,10 +288,10 @@ $(function() {
{ width:500 } // search options
);
$("select[name=\'course\']").on('change', function () {
$("select[name=\'course\']").bind('change', function () {
$("#search-works").val(0);
$("#pending_submit").trigger("click");
$("#pending_submit").attr("disabled", true);
$("#pending_pendingSubmit").trigger("click");
$("#pending_pendingSubmit").attr("disabled", true);
});
});
</script>

@ -2938,7 +2938,7 @@ function getAllWork(
} else {
$parent = get_work_data_by_id($work['parent_id'], $courseId);
}
$work['work_name'] = $parent['title'];
$work['work_name'] = isset($parent['title']) ? $parent['title'] : '';
// Actions.
$action = '';
@ -6540,7 +6540,7 @@ function exportPendingWorksToExcel($values) {
$status = $values['status'] ?? 0;
$whereCondition = '';
if (!empty($values['work_parent_ids'])) {
$whereCondition = ' parent_id IN('.Security::remove_XSS($_REQUEST['work_parent_ids']).')';
$whereCondition = ' parent_id IN('.implode(',', $values['work_parent_ids']).')';
}
$allWork = getAllWork(
null,

Loading…
Cancel
Save