Apply_Carousel_5_Write_in_Questions_Array_Writer: Batch apply the carousel presentation style to a list of...

View source: R/Carousel_5_Write_in_Questions_Array_Writer.R

Apply_Carousel_5_Write_in_Questions_Array_WriterR Documentation

Batch apply the carousel presentation style to a list of questions belonging to various groups

Description

This takes two data.tables- a table of array subquestions that includes the qid, gid, parent_qid, and title, and a table that contains the empty questions (with "title", "gid", and "qid") that are within the arrays group which should receive the html injection- and applies the carousel javascript/html format to them. This version is different from the "unmodified" version in that it automatically clicks the Limesurvey "Next" button when the respondent has answered all of the questions.

Usage

Apply_Carousel_5_Write_in_Questions_Array_Writer(
  Huge_Free_Text_List,
  Text_Question_List,
  Freetext_Questions
)

Arguments

Huge_Free_Text_List

A data.table with the top questions and subquestions that should be transformed into the carousel format

Text_Question_List

A data.table with the "TEXT" questions that are in the group with the respective array question, and that should "receive" the html/javascript payload- it should also have a "left_prompt" and a "right_prompt" column to define the instructions under the buttons! "gid" "Text_Title" "Text_qid" "left_prompt" "right_prompt" "separator" "top_question" "language" "progress_bar_start" - what should the text be before first question answered? "submit_button_text" "progress_text" "set_mandatory" - should next button be disabled until all questions answered? "progress_bar" - should there be a progress bar?

Freetext_Questions

A data.table with the "freetext" questions that are not in the group with the respective array question, and that names the things to be evaluated- should be a top as well as the subquestions

Examples

## Not run: 
Apply_Carousel_5_Write_in_Questions_Array_Writer(Huge_Free_Text_List, Text_Question_List, Freetext_Questions)

## End(Not run)


bpresentati/surveyR documentation built on March 19, 2022, 3:40 a.m.