From 86d7f34409d9e9e2e5b362f9d0021e6603def3a3 Mon Sep 17 00:00:00 2001 From: carlos alvarado Date: Tue, 21 Jul 2020 16:40:00 -0500 Subject: [PATCH 01/13] Tests/Report by question broken for many types of tests #3177 Get all question of exercise and display in stats.php instead of showing the amount selected for the test --- main/exercise/stats.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main/exercise/stats.php b/main/exercise/stats.php index 18e214ee4f..2a407f55cc 100755 --- a/main/exercise/stats.php +++ b/main/exercise/stats.php @@ -44,7 +44,9 @@ if (empty($sessionId)) { ); } $count_students = count($students); -$question_list = $objExercise->get_validated_question_list(); +//$question_list = $objExercise->get_validated_question_list(); +$totalQuestions = $objExercise->getQuestionCount(); //Get total of questions +$question_list = $objExercise->getQuestionForTeacher(0,$totalQuestions); // get questions from 0 to total $data = []; // Question title # of students who tool it Lowest score Average Highest score Maximum score From 4b10960a085a8501c683e476b64588b0a89957c1 Mon Sep 17 00:00:00 2001 From: carlos alvarado Date: Tue, 21 Jul 2020 16:51:04 -0500 Subject: [PATCH 02/13] Minor - Tests/Report by question broken for many types of tests #3177 Apply flint diff --- main/exercise/stats.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main/exercise/stats.php b/main/exercise/stats.php index 2a407f55cc..077002e2ec 100755 --- a/main/exercise/stats.php +++ b/main/exercise/stats.php @@ -46,7 +46,7 @@ if (empty($sessionId)) { $count_students = count($students); //$question_list = $objExercise->get_validated_question_list(); $totalQuestions = $objExercise->getQuestionCount(); //Get total of questions -$question_list = $objExercise->getQuestionForTeacher(0,$totalQuestions); // get questions from 0 to total +$question_list = $objExercise->getQuestionForTeacher(0, $totalQuestions); // get questions from 0 to total $data = []; // Question title # of students who tool it Lowest score Average Highest score Maximum score From c11b0256b32d01bcefa4bd7bf3c63c36bc300d56 Mon Sep 17 00:00:00 2001 From: carlos alvarado Date: Wed, 22 Jul 2020 14:07:41 -0500 Subject: [PATCH 03/13] Agenda: Repeated "All day" events show on full day span after first occurence #3394 From the second round, allDay changes from true to 1, as compared to the string true, it will not validate the date for its continuation. Validation against 1 is added directly to compare against numeric value 1 that can be assumed to be true. The database all_day field in table c_calendar_event is set to 1 correctly. --- main/inc/lib/agenda.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main/inc/lib/agenda.lib.php b/main/inc/lib/agenda.lib.php index a9d9713eae..ee688b9e34 100644 --- a/main/inc/lib/agenda.lib.php +++ b/main/inc/lib/agenda.lib.php @@ -246,7 +246,7 @@ class Agenda ) { $start = api_get_utc_datetime($start); $end = api_get_utc_datetime($end); - $allDay = isset($allDay) && $allDay === 'true' ? 1 : 0; + $allDay = isset($allDay) && ($allDay === 'true' or $allDay == 1) ? 1 : 0; $id = null; switch ($this->type) { From 7aba80b1bb865f67d1a6e6c779f6e97f6588b0e2 Mon Sep 17 00:00:00 2001 From: carlos alvarado Date: Thu, 23 Jul 2020 08:24:44 -0500 Subject: [PATCH 04/13] Agenda: Repeated "All day" events show on full day span after first occurence #3394 Changed or by || --- main/inc/lib/agenda.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main/inc/lib/agenda.lib.php b/main/inc/lib/agenda.lib.php index ee688b9e34..6da2436ee1 100644 --- a/main/inc/lib/agenda.lib.php +++ b/main/inc/lib/agenda.lib.php @@ -246,7 +246,7 @@ class Agenda ) { $start = api_get_utc_datetime($start); $end = api_get_utc_datetime($end); - $allDay = isset($allDay) && ($allDay === 'true' or $allDay == 1) ? 1 : 0; + $allDay = isset($allDay) && ($allDay === 'true' || $allDay == 1) ? 1 : 0; $id = null; switch ($this->type) { From 65366183969a4f2d674583f6ec21a73ece0a0569 Mon Sep 17 00:00:00 2001 From: carlos alvarado Date: Thu, 23 Jul 2020 11:12:28 -0500 Subject: [PATCH 05/13] Import an exercise via Excel: error calculating the maximum score #3145 Fixed problem in javascript to show custom scores. Only the items marked as correct in the unique response are added to the total. --- main/exercise/upload_exercise.php | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/main/exercise/upload_exercise.php b/main/exercise/upload_exercise.php index 8498763622..df8eb6121e 100755 --- a/main/exercise/upload_exercise.php +++ b/main/exercise/upload_exercise.php @@ -23,9 +23,13 @@ if (!$is_allowed_to_edit) { $this_section = SECTION_COURSES; $htmlHeadXtra[] = ""; @@ -110,7 +114,7 @@ function lp_upload_quiz_main() get_lang('UseCustomScoreForAllQuestions'), ['id' => 'user_custom_score'] ); - $form->addElement('html', '