From 9193d8666e774d5b59c7818ee86f0c772dbba2f2 Mon Sep 17 00:00:00 2001 From: YUE YU Date: Wed, 11 Sep 2024 05:01:49 +0800 Subject: [PATCH] bug fix for assign a number of papers --- .../tests/data_extraction_ut_helper.php | 8 ++--- .../tests/quality_assessment_ut_helper.php | 8 ++--- .../helpers/tests/screening_ut_helper.php | 30 ++++++++++++------- .../data_extraction/assign_papers_class.php | 3 +- .../quality_assessment/assign_papers_qa.php | 3 +- .../screening/assign_papers_screen_auto.php | 3 +- 6 files changed, 34 insertions(+), 21 deletions(-) diff --git a/relis_app/helpers/tests/data_extraction_ut_helper.php b/relis_app/helpers/tests/data_extraction_ut_helper.php index 0bb63cd..23516a1 100755 --- a/relis_app/helpers/tests/data_extraction_ut_helper.php +++ b/relis_app/helpers/tests/data_extraction_ut_helper.php @@ -275,7 +275,7 @@ private function saveAssignment_5papers_1reviewer() $actual_assignement = "Not assigned"; $userId = getAdminUserId(); //reviewer user ID - $postData = ["number_of_users" => 1, "percentage" => 100, "user_1" => $userId]; + $postData = ["number_of_users" => 1, "percentage" => 100, "user_1" => $userId, "assign_all_paper_checkbox" => "on"]; $response = $this->http_client->response($this->controller, $action, $postData, "POST"); if ($response['status_code'] >= 400) { @@ -318,7 +318,7 @@ private function saveAssignment_6papers_3reviewers() //perform screening assignPapers_and_performScreening([getAdminUserId()], 'Title'); - $postData = ["number_of_users" => 3, "percentage" => 100, "user_1" => getAdminUserId(), "user_2" => getTestUserId(), "user_3" => getDemoUserId()]; + $postData = ["number_of_users" => 3, "percentage" => 100, "user_1" => getAdminUserId(), "user_2" => getTestUserId(), "user_3" => getDemoUserId(), "assign_all_paper_checkbox" => "on"]; $response = $this->http_client->response($this->controller, $action, $postData, "POST"); if ($response['status_code'] >= 400) { @@ -365,7 +365,7 @@ private function saveAssignment_5papers_3reviewers() //perform screening assignPapers_and_performScreening([getAdminUserId()], 'Title'); - $postData = ["number_of_users" => 3, "percentage" => 100, "user_1" => getAdminUserId(), "user_2" => getTestUserId(), "user_3" => getDemoUserId()]; + $postData = ["number_of_users" => 3, "percentage" => 100, "user_1" => getAdminUserId(), "user_2" => getTestUserId(), "user_3" => getDemoUserId(), "assign_all_paper_checkbox" => "on"]; $response = $this->http_client->response($this->controller, $action, $postData, "POST"); if ($response['status_code'] >= 400) { @@ -417,7 +417,7 @@ private function saveAssignment_5papers_2reviewers() //perform screening assignPapers_and_performScreening([getAdminUserId()], 'Title'); - $postData = ["number_of_users" => 2, "percentage" => 100, "user_1" => getAdminUserId(), "user_2" => getTestUserId()]; + $postData = ["number_of_users" => 2, "percentage" => 100, "user_1" => getAdminUserId(), "user_2" => getTestUserId(), "assign_all_paper_checkbox" => "on"]; $response = $this->http_client->response($this->controller, $action, $postData, "POST"); if ($response['status_code'] >= 400) { diff --git a/relis_app/helpers/tests/quality_assessment_ut_helper.php b/relis_app/helpers/tests/quality_assessment_ut_helper.php index 34e1311..80b5f7b 100755 --- a/relis_app/helpers/tests/quality_assessment_ut_helper.php +++ b/relis_app/helpers/tests/quality_assessment_ut_helper.php @@ -301,7 +301,7 @@ private function saveAssignmentQA_4papers_1reviewer() $actual_assignement = "Not assigned"; $userId = getAdminUserId(); //reviewer user ID - $postData = ["number_of_users" => 1, "percentage" => 100, "user_1" => $userId]; + $postData = ["number_of_users" => 1, "percentage" => 100, "user_1" => $userId, "assign_all_paper_checkbox" => "on"]; $response = $this->http_client->response($this->controller, $action, $postData, "POST"); if ($response['status_code'] >= 400) { @@ -344,7 +344,7 @@ private function saveAssignmentQA_6papers_3reviewers() //perform screening assignPapers_and_performScreening([getAdminUserId()], 'Title'); - $postData = ["number_of_users" => 3, "percentage" => 100, "user_1" => getAdminUserId(), "user_2" => getTestUserId(), "user_3" => getDemoUserId()]; + $postData = ["number_of_users" => 3, "percentage" => 100, "user_1" => getAdminUserId(), "user_2" => getTestUserId(), "user_3" => getDemoUserId(), "assign_all_paper_checkbox" => "on"]; $response = $this->http_client->response($this->controller, $action, $postData, "POST"); if ($response['status_code'] >= 400) { @@ -393,7 +393,7 @@ private function saveAssignmentQA_5papers_3reviewers() //perform screening assignPapers_and_performScreening([getAdminUserId()], 'Title'); - $postData = ["number_of_users" => 3, "percentage" => 100, "user_1" => getAdminUserId(), "user_2" => getTestUserId(), "user_3" => getDemoUserId()]; + $postData = ["number_of_users" => 3, "percentage" => 100, "user_1" => getAdminUserId(), "user_2" => getTestUserId(), "user_3" => getDemoUserId(), "assign_all_paper_checkbox" => "on"]; $response = $this->http_client->response($this->controller, $action, $postData, "POST"); if ($response['status_code'] >= 400) { @@ -445,7 +445,7 @@ private function saveAssignmentQA_5papers_2reviewers() //perform screening assignPapers_and_performScreening([getAdminUserId()], 'Title'); - $postData = ["number_of_users" => 2, "percentage" => 100, "user_1" => getAdminUserId(), "user_2" => getTestUserId()]; + $postData = ["number_of_users" => 2, "percentage" => 100, "user_1" => getAdminUserId(), "user_2" => getTestUserId(), "assign_all_paper_checkbox" => "on"]; $response = $this->http_client->response($this->controller, $action, $postData, "POST"); if ($response['status_code'] >= 400) { diff --git a/relis_app/helpers/tests/screening_ut_helper.php b/relis_app/helpers/tests/screening_ut_helper.php index cda84f1..8911e2e 100755 --- a/relis_app/helpers/tests/screening_ut_helper.php +++ b/relis_app/helpers/tests/screening_ut_helper.php @@ -362,7 +362,8 @@ private function saveAssignmentScreen_withoutNumberOfUsers() "paper_source_status" => "all", "user_1" => $user_1, "user_2" => $user_2, - "reviews_per_paper" => 1 + "reviews_per_paper" => 1, + "assign_all_paper_checkbox" => "on" ]; $response = $this->http_client->response($this->controller, $action, $postData, "POST"); @@ -410,7 +411,8 @@ private function saveAssignmentScreen_withoutReviewsPerPaper() "paper_source_status" => "all", "user_1" => $user_1, "user_2" => $user_2, - "reviews_per_paper" => "" + "reviews_per_paper" => "", + "assign_all_paper_checkbox" => "on" ]; $response = $this->http_client->response($this->controller, $action, $postData, "POST"); @@ -458,7 +460,8 @@ private function saveAssignmentScreen_ReviewPerPaper_moreThan_NbrOfUsers() "paper_source_status" => "all", "user_1" => $user_1, "user_2" => $user_2, - "reviews_per_paper" => 3 + "reviews_per_paper" => 3, + "assign_all_paper_checkbox" => "on" ]; $response = $this->http_client->response($this->controller, $action, $postData, "POST"); @@ -502,7 +505,8 @@ private function saveAssignmentScreen_emptyUsers() "screening_phase" => getScreeningPhaseId("Title"), "papers_sources" => "all", "paper_source_status" => "all", - "reviews_per_paper" => 1 + "reviews_per_paper" => 1, + "assign_all_paper_checkbox" => "on" ]; $response = $this->http_client->response($this->controller, $action, $postData, "POST"); @@ -596,7 +600,8 @@ private function saveAssignment_5papers_1reviewer() "papers_sources" => "all", "paper_source_status" => "all", "user_1" => $userId, - "reviews_per_paper" => 1 + "reviews_per_paper" => 1, + "assign_all_paper_checkbox" => "on" ]; $response = $this->http_client->response($this->controller, $action, $postData, "POST"); @@ -649,7 +654,8 @@ private function saveAssignment_6papers_3reviewers() "user_1" => getAdminUserId(), "user_2" => getTestUserId(), "user_3" => getDemoUserId(), - "reviews_per_paper" => 1 + "reviews_per_paper" => 1, + "assign_all_paper_checkbox" => "on" ]; //Select screening phase $this->http_client->response($this->controller, "select_screen_phase" . "/" . getScreeningPhaseId("Title")); @@ -710,7 +716,8 @@ private function saveAssignment_5papers_3reviewers() "user_1" => getAdminUserId(), "user_2" => getTestUserId(), "user_3" => getDemoUserId(), - "reviews_per_paper" => 1 + "reviews_per_paper" => 1, + "assign_all_paper_checkbox" => "on" ]; //Select screening phase $this->http_client->response($this->controller, "select_screen_phase" . "/" . getScreeningPhaseId("Title")); @@ -773,7 +780,8 @@ private function saveAssignment_5papers_2reviewers() "paper_source_status" => "all", "user_1" => getAdminUserId(), "user_2" => getTestUserId(), - "reviews_per_paper" => 1 + "reviews_per_paper" => 1, + "assign_all_paper_checkbox" => "on" ]; //Select screening phase $this->http_client->response($this->controller, "select_screen_phase" . "/" . getScreeningPhaseId("Title")); @@ -855,7 +863,8 @@ private function saveAssignment_5papers_2reviewers_2reviewsPerPaper() "paper_source_status" => "all", "user_1" => getAdminUserId(), "user_2" => getTestUserId(), - "reviews_per_paper" => 2 + "reviews_per_paper" => 2, + "assign_all_paper_checkbox" => "on" ]; //Select screening phase $this->http_client->response($this->controller, "select_screen_phase" . "/" . getScreeningPhaseId("Title")); @@ -1827,7 +1836,8 @@ private function saveAssignmentValidation_assignToNotScreenedUser() "papers_sources" => "all", "paper_source_status" => "all", "user_1" => $AdminUserId, - "reviews_per_paper" => 1 + "reviews_per_paper" => 1, + "assign_all_paper_checkbox" => "on" ]; save_assignment_screen($data); for ($i = 1; $i <= 2; $i++) { diff --git a/relis_app/views/data_extraction/assign_papers_class.php b/relis_app/views/data_extraction/assign_papers_class.php index fb1cf16..5fe9015 100755 --- a/relis_app/views/data_extraction/assign_papers_class.php +++ b/relis_app/views/data_extraction/assign_papers_class.php @@ -73,7 +73,8 @@ echo '
'; echo form_label($label, $name, array('class' => 'control-label col-md-3 col-sm-3 col-xs-12')); echo '
'; - echo ''; + echo ''; + echo ''; echo '
'; echo '