Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small bug fix for Feature 98 #178

Merged
merged 1 commit into from
Sep 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions relis_app/helpers/tests/data_extraction_ut_helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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) {
Expand Down
8 changes: 4 additions & 4 deletions relis_app/helpers/tests/quality_assessment_ut_helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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) {
Expand Down
30 changes: 20 additions & 10 deletions relis_app/helpers/tests/screening_ut_helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -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");

Expand Down Expand Up @@ -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");

Expand Down Expand Up @@ -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");

Expand Down Expand Up @@ -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");

Expand Down Expand Up @@ -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");
Expand Down Expand Up @@ -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"));
Expand Down Expand Up @@ -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"));
Expand Down Expand Up @@ -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"));
Expand Down Expand Up @@ -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"));
Expand Down Expand Up @@ -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++) {
Expand Down
3 changes: 2 additions & 1 deletion relis_app/views/data_extraction/assign_papers_class.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@
echo '<div class="form-group">';
echo form_label($label, $name, array('class' => 'control-label col-md-3 col-sm-3 col-xs-12'));
echo '<div class="col-md-6 col-sm-6 col-xs-12">';
echo '<input type="checkbox" id="' . $id . '" name="' . $name . '" class="js-switch" onchange="toggleNumberPapersField()" checked />';
echo '<input type="hidden" name="' . $name . '" value="off">';
echo '<input type="checkbox" id="' . $id . '" name="' . $name . '" class="js-switch" onchange="toggleNumberPapersField()" value="on" checked />';
echo '</div></div>';

echo '<div id="number_of_papers_field" style="display: none;">';
Expand Down
3 changes: 2 additions & 1 deletion relis_app/views/quality_assessment/assign_papers_qa.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@
echo '<div class="form-group">';
echo form_label($label, $name, array('class' => 'control-label col-md-3 col-sm-3 col-xs-12'));
echo '<div class="col-md-6 col-sm-6 col-xs-12">';
echo '<input type="checkbox" id="' . $id . '" name="' . $name . '" class="js-switch" onchange="toggleNumberPapersField()" checked />';
echo '<input type="hidden" name="' . $name . '" value="off">';
echo '<input type="checkbox" id="' . $id . '" name="' . $name . '" class="js-switch" onchange="toggleNumberPapersField()" value="on" checked />';
echo '</div></div>';

echo '<div id="number_of_papers_field" style="display: none;">';
Expand Down
3 changes: 2 additions & 1 deletion relis_app/views/screening/assign_papers_screen_auto.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@
echo '<div class="form-group">';
echo form_label($label, $name, array('class' => 'control-label col-md-3 col-sm-3 col-xs-12'));
echo '<div class="col-md-6 col-sm-6 col-xs-12">';
echo '<input type="checkbox" id="' . $id . '" name="' . $name . '" class="js-switch" onchange="toggleNumberPapersField()" checked />';
echo '<input type="hidden" name="' . $name . '" value="off">';
echo '<input type="checkbox" id="' . $id . '" name="' . $name . '" class="js-switch" onchange="toggleNumberPapersField()" value="on" checked />';
echo '</div></div>';

echo '<div id="number_of_papers_field" style="display: none;">';
Expand Down
Loading