Skip to content

Commit

Permalink
user export: remove data_export and add forms_export
Browse files Browse the repository at this point in the history
switched somewhere between 10.5.1 and 12.5.2

ref #396
  • Loading branch information
wibeasley committed Jul 19, 2022
1 parent 1ed95ec commit 302614e
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 36 deletions.
5 changes: 3 additions & 2 deletions R/redcap-users-export.R
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ redcap_users_export <- function(
design = readr::col_logical(),
user_rights = readr::col_logical(),
data_access_groups = readr::col_logical(),
data_export = readr::col_character(),
# data_export = readr::col_character(), # dropped sometime between 10.5.1 and 12.5.2
reports = readr::col_logical(),
stats_and_charts = readr::col_logical(),
manage_survey_participants = readr::col_logical(),
Expand All @@ -85,7 +85,8 @@ redcap_users_export <- function(
lock_records_all_forms = readr::col_logical(),
lock_records = readr::col_logical(),
lock_records_customization = readr::col_logical(),
forms = readr::col_character()
forms = readr::col_character(),
forms_export = readr::col_character(), # Added sometime between 10.5.1 and 12.5.2
)

# This is the important line that communicates with the REDCap server.
Expand Down
26 changes: 13 additions & 13 deletions inst/test-data/specific-redcapr/users-export/with-dags--user.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ structure(list(username = c("unittestphifree", "wbeasleya"),
"Beasley_A"), expiration = structure(c(NA_real_, NA_real_
), class = "Date"), data_access_group = c("daga", NA), data_access_group_id = c("331",
NA), design = c(FALSE, TRUE), user_rights = c(FALSE, TRUE
), data_access_groups = c(FALSE, TRUE), data_export = c("1",
"1"), reports = c(FALSE, TRUE), stats_and_charts = c(FALSE,
TRUE), manage_survey_participants = c(TRUE, TRUE), calendar = c(FALSE,
TRUE), data_import_tool = c(FALSE, TRUE), data_comparison_tool = c(FALSE,
TRUE), logging = c(FALSE, TRUE), file_repository = c(FALSE,
TRUE), data_quality_create = c(FALSE, TRUE), data_quality_execute = c(FALSE,
TRUE), api_export = c(TRUE, TRUE), api_import = c(FALSE,
TRUE), mobile_app = c(FALSE, TRUE), mobile_app_download_data = c(FALSE,
TRUE), record_create = c(FALSE, TRUE), record_rename = c(FALSE,
FALSE), record_delete = c(FALSE, FALSE), lock_records_all_forms = c(FALSE,
FALSE), lock_records = c(FALSE, FALSE), lock_records_customization = c(FALSE,
FALSE)), row.names = c(NA, -2L), class = c("tbl_df", "tbl",
"data.frame"))
), data_access_groups = c(FALSE, TRUE), reports = c(FALSE,
TRUE), stats_and_charts = c(FALSE, TRUE), manage_survey_participants = c(TRUE,
TRUE), calendar = c(FALSE, TRUE), data_import_tool = c(FALSE,
TRUE), data_comparison_tool = c(FALSE, TRUE), logging = c(FALSE,
TRUE), file_repository = c(FALSE, TRUE), data_quality_create = c(FALSE,
TRUE), data_quality_execute = c(FALSE, TRUE), api_export = c(TRUE,
TRUE), api_import = c(FALSE, TRUE), mobile_app = c(FALSE,
TRUE), mobile_app_download_data = c(FALSE, TRUE), record_create = c(FALSE,
TRUE), record_rename = c(FALSE, FALSE), record_delete = c(FALSE,
FALSE), lock_records_all_forms = c(FALSE, FALSE), lock_records = c(FALSE,
FALSE), lock_records_customization = c(FALSE, FALSE), forms_export = c("demographics:1",
"demographics:1")), row.names = c(NA, -2L), class = c("tbl_df",
"tbl", "data.frame"))
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
structure(list(username = c("unittestphifree", "wbeasleya"),
form_name = c("demographics", "demographics"), permission_id = c(1L,
1L), permission = structure(c(3L, 3L), .Label = c("no_access",
form_name = c("demographics", NA), permission_id = c(1L,
NA), permission = structure(c(3L, 5L), levels = c("no_access",
"readonly", "edit_form", "edit_survey", "unknown"), class = "factor")), row.names = c(NA,
-2L), class = c("tbl_df", "tbl", "data.frame"))
26 changes: 13 additions & 13 deletions inst/test-data/specific-redcapr/users-export/without-dags--user.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ structure(list(username = c("unittestphifree", "wbeasleya"),
), class = "Date"), data_access_group = c(NA_character_,
NA_character_), data_access_group_id = c(NA_character_, NA_character_
), design = c(FALSE, TRUE), user_rights = c(FALSE, TRUE),
data_access_groups = c(FALSE, TRUE), data_export = c("1",
"1"), reports = c(TRUE, TRUE), stats_and_charts = c(TRUE,
TRUE), manage_survey_participants = c(TRUE, TRUE), calendar = c(TRUE,
TRUE), data_import_tool = c(FALSE, TRUE), data_comparison_tool = c(FALSE,
TRUE), logging = c(FALSE, TRUE), file_repository = c(TRUE,
TRUE), data_quality_create = c(FALSE, TRUE), data_quality_execute = c(FALSE,
TRUE), api_export = c(TRUE, FALSE), api_import = c(FALSE,
FALSE), mobile_app = c(FALSE, FALSE), mobile_app_download_data = c(FALSE,
FALSE), record_create = c(TRUE, TRUE), record_rename = c(FALSE,
FALSE), record_delete = c(FALSE, FALSE), lock_records_all_forms = c(FALSE,
FALSE), lock_records = c(FALSE, FALSE), lock_records_customization = c(FALSE,
FALSE)), row.names = c(NA, -2L), class = c("tbl_df", "tbl",
"data.frame"))
data_access_groups = c(FALSE, TRUE), reports = c(TRUE, TRUE
), stats_and_charts = c(TRUE, TRUE), manage_survey_participants = c(TRUE,
TRUE), calendar = c(TRUE, TRUE), data_import_tool = c(FALSE,
TRUE), data_comparison_tool = c(FALSE, TRUE), logging = c(FALSE,
TRUE), file_repository = c(TRUE, TRUE), data_quality_create = c(FALSE,
TRUE), data_quality_execute = c(FALSE, TRUE), api_export = c(TRUE,
FALSE), api_import = c(FALSE, FALSE), mobile_app = c(FALSE,
FALSE), mobile_app_download_data = c(FALSE, FALSE), record_create = c(TRUE,
TRUE), record_rename = c(FALSE, FALSE), record_delete = c(FALSE,
FALSE), lock_records_all_forms = c(FALSE, FALSE), lock_records = c(FALSE,
FALSE), lock_records_customization = c(FALSE, FALSE), forms_export = c("demographics:1,health:1,race_and_ethnicity:1",
"demographics:1,health:1,race_and_ethnicity:1")), row.names = c(NA,
-2L), class = c("tbl_df", "tbl", "data.frame"))
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ structure(list(username = c("unittestphifree", "unittestphifree",
"unittestphifree", "wbeasleya", "wbeasleya", "wbeasleya"), form_name = c("demographics",
"health", "race_and_ethnicity", "demographics", "health", "race_and_ethnicity"
), permission_id = c(1L, 1L, 1L, 1L, 1L, 1L), permission = structure(c(3L,
3L, 3L, 3L, 3L, 3L), .Label = c("no_access", "readonly", "edit_form",
3L, 3L, 3L, 3L, 3L), levels = c("no_access", "readonly", "edit_form",
"edit_survey", "unknown"), class = "factor")), row.names = c(NA,
-6L), class = c("tbl_df", "tbl", "data.frame"))
11 changes: 6 additions & 5 deletions inst/test-data/specific-redcapr/write-dag/before.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
structure(list(record_id = c("331-1", "331-2"), first_name = c("aa",
"bb"), last_name = c(NA, NA), address = c(NA, NA), telephone = c(NA,
NA), email = c(NA, NA), dob = c(NA, NA), age = c(NA, NA), ethnicity = c(NA,
NA), race = c(NA, NA), sex = c(NA, NA), height = c(NA, NA), weight = c(NA,
NA), bmi = c(NA, NA), comments = c(NA, NA), demographics_complete = c(0,
0)), row.names = c(NA, -2L), class = "data.frame")
"bb"), last_name = c("last name 1", "last name 2"), address = c(NA,
NA), telephone = c(NA, NA), email = c(NA, NA), dob = c(NA, NA
), age = c(NA, NA), ethnicity = c(NA, NA), race = c(NA, NA),
sex = c(NA, NA), height = c(NA, NA), weight = c(NA, NA),
bmi = c(NA, NA), comments = c(NA, NA), demographics_complete = c(0,
0)), row.names = c(NA, -2L), class = "data.frame")

0 comments on commit 302614e

Please sign in to comment.