Upgrade 1-11.38

This commit is contained in:
xesmyd
2026-03-30 14:10:30 +02:00
parent f2a7e6d1fc
commit ac648ef29d
24665 changed files with 69682 additions and 2205004 deletions
+1 -1
View File
@@ -697,7 +697,7 @@ if ($nbStudents > 0 || isset($parameters['user_active'])) {
$userIdList = Session::read('user_id_list');
if (isset($userIdList[0])) {
$lpList = new LearnpathList(
$studentId,
$userIdList[0],
$courseInfo,
$sessionId,
null,
+14 -14
View File
@@ -387,12 +387,12 @@ function export_complete_report_xls($filename, $array)
{
global $global, $filter_score;
$spreadsheet = new PHPExcel();
$spreadsheet = new \PhpOffice\PhpSpreadsheet\Spreadsheet();
$spreadsheet->setActiveSheetIndex(0);
$worksheet = $spreadsheet->getActiveSheet();
$line = 1;
$column = 0; //skip the first column (row titles)
$column = 1;
if ($global) {
$worksheet->setCellValueByColumnAndRow($column, $line, get_lang('Courses'));
@@ -412,7 +412,7 @@ function export_complete_report_xls($filename, $array)
$line++;
foreach ($array as $row) {
$column = 0;
$column = 1;
foreach ($row as $item) {
$worksheet->setCellValueByColumnAndRow($column, $line, html_entity_decode(strip_tags($item)));
$column++;
@@ -421,33 +421,33 @@ function export_complete_report_xls($filename, $array)
}
$line++;
} else {
$worksheet->setCellValueByColumnAndRow(0, $line, get_lang('Exercises'));
$worksheet->setCellValueByColumnAndRow(1, $line, get_lang('User'));
$worksheet->setCellValueByColumnAndRow(2, $line, get_lang('Username'));
$worksheet->setCellValueByColumnAndRow(3, $line, get_lang('Percentage'));
$worksheet->setCellValueByColumnAndRow(4, $line, get_lang('Status'));
$worksheet->setCellValueByColumnAndRow(5, $line, get_lang('Attempts'));
$worksheet->setCellValueByColumnAndRow(1, $line, get_lang('Exercises'));
$worksheet->setCellValueByColumnAndRow(2, $line, get_lang('User'));
$worksheet->setCellValueByColumnAndRow(3, $line, get_lang('Username'));
$worksheet->setCellValueByColumnAndRow(4, $line, get_lang('Percentage'));
$worksheet->setCellValueByColumnAndRow(5, $line, get_lang('Status'));
$worksheet->setCellValueByColumnAndRow(6, $line, get_lang('Attempts'));
$line++;
foreach ($array as $row) {
$worksheet->setCellValueByColumnAndRow(
0,
1,
$line,
html_entity_decode(strip_tags($row['exercise']))
);
foreach ($row['users'] as $key => $user) {
$worksheet->setCellValueByColumnAndRow(
1,
2,
$line,
html_entity_decode(strip_tags($user))
);
$worksheet->setCellValueByColumnAndRow(
2,
3,
$line,
$row['usernames'][$key]
);
$column = 3;
$column = 4;
foreach ($row['results'][$key] as $result_item) {
$worksheet->setCellValueByColumnAndRow(
@@ -464,7 +464,7 @@ function export_complete_report_xls($filename, $array)
}
$file = api_get_path(SYS_ARCHIVE_PATH).api_replace_dangerous_char($filename);
$writer = new PHPExcel_Writer_Excel2007($spreadsheet);
$writer = new \PhpOffice\PhpSpreadsheet\Writer\Xlsx($spreadsheet);
$writer->save($file);
DocumentManager::file_send_for_download($file, true, $filename);
exit;