Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/ijmeisner/einerlei/llms.txt

Use this file to discover all available pages before exploring further.

The MPADQ questionnaire is divided into two question types: a set of demographic questions that collect background information about the respondent, and a bank of Likert scale questions that measure attitudes and experiences related to music performance anxiety. Both sets of question text are stored in the database and can be updated at any time from the admin dashboard at /admin/dashboard/question-edit/. From the admin dashboard, click the Edit Questions link. The page presents two independent selection forms — one for demographic questions and one for Likert scale questions — each populated from the database at page load.

Demographic Questions

Fourteen background questions covering gender, age, instrument, performance history, health, and career goals. Stored in the DemographicQuestion table.

Likert Scale Questions

158 attitudinal statements answered on a scale. Stored in the LikertQuestion table, each linked to a broad category and one or two sub-categories.

Editing a Demographic Question

Demographic question text is stored in the DemographicQuestion table with the following schema:
CREATE TABLE DemographicQuestion (
  id       INT UNSIGNED NOT NULL AUTO_INCREMENT, PRIMARY KEY(id),
  question VARCHAR(255) UNIQUE
) ENGINE = INNODB;
The dropdown on the selection page is populated by the query:
SELECT id, question FROM DemographicQuestion;
1

Select a question

On the Edit Demographic and Likert Questions page (/admin/dashboard/question-edit/), locate the Select Demographic Question dropdown. All current question texts are listed. Choose the question you want to update and click Edit.
2

Review and edit the question text

You are redirected to /admin/dashboard/question-edit/dem-edit/. The page receives the selected question id via POST, queries the current text from DemographicQuestion, and pre-fills a <textarea> with the existing wording. Modify the text as needed.
3

Submit your changes

Click Submit. The form POSTs questionText, id, and a hidden tableName field set to Demographic to /admin/dashboard/question-edit/confirm/. The confirm page sanitizes the input before writing to the database:
  • real_escape_string() — escapes special characters for the SQL query
  • stripslashes() — removes any auto-added escape slashes
  • htmlentities() — converts special characters to HTML entities
  • strip_tags() — removes any HTML or PHP tags from the input
The resulting UPDATE statement is:
UPDATE DemographicQuestion SET question = "<new text>" WHERE id = <selected id>;
4

Confirm the save

The confirm page (/admin/dashboard/question-edit/confirm/) displays a Changes Saved heading and echoes the updated question text. It also regenerates demographics/demographicQuestions.json by querying all questions ordered by question_order and rewriting the file — so the live quiz reflects the new wording immediately without a separate export step.

Editing a Likert Scale Question

Likert question text is stored in the LikertQuestion table:
CREATE TABLE LikertQuestion (
  question          VARCHAR(255) UNIQUE,
  id                INT UNSIGNED NOT NULL AUTO_INCREMENT, PRIMARY KEY(id),
  broad_category_id INT UNSIGNED NOT NULL,
  sub_category_id1  INT UNSIGNED NOT NULL,
  sub_category_id2  INT UNSIGNED DEFAULT NULL,
  score_inversely   BOOL NOT NULL
) ENGINE = INNODB;
The dropdown on the selection page is populated by the query:
SELECT id, question FROM LikertQuestion;
1

Select a question

On the same Edit Demographic and Likert Questions page, scroll to the Select Likert Question dropdown. Choose the statement you want to update and click Edit.
2

Review and edit the question text

You are redirected to /admin/dashboard/question-edit/likert-edit/. The page receives the selected id via POST, queries the current text from LikertQuestion, and pre-fills the <textarea>. Edit the statement wording as needed.
3

Submit your changes

Click Submit. The form POSTs to the shared confirm page at /admin/dashboard/question-edit/confirm/ with a hidden field tableName set to Likert. The same four-step sanitization pipeline runs, then the update is applied:
UPDATE LikertQuestion SET question = "<new text>" WHERE id = <selected id>;
4

Confirm the save

The confirm page displays Changes Saved and echoes the updated statement. Because the demographic and Likert flows share the same confirm page, demographics/demographicQuestions.json is also regenerated on every save — including Likert edits. Use the Select Another Question link to make additional edits, or return to the Dashboard.
Changing question text affects all historical response records. The DemographicAnswer table stores responses linked by demographic_question_id (a foreign key to DemographicQuestion.id), and the LikertAnswer table stores responses linked by question_id (a foreign key to LikertQuestion.id). Existing answer rows remain numerically linked to the question even after a text change. Any reports or exports that display question text alongside responses will show the new wording against old answers. Edits should be limited to minor phrasing corrections, typo fixes, or clarifications that do not alter the intended meaning of the question.

Bulk Configuration via Text Files

In addition to the dashboard editor, question text can be referenced in bulk through plain-text configuration files in the config/ directory of the application.

config/demographicQuestions.txt

Lists all 14 demographic questions by number. Each entry is a sequential integer on one line followed by the quoted question string on the next.

config/likertScaleQuestions.txt

Lists all 158 Likert statements in the same numbered format. This is the canonical reference for the full question bank.
Two C++ utilities — createDemographicsJSONfile.cc and createLikertJSONfile.cc — located in admin/dashboard/question-edit/, read the corresponding plain-text question files and regenerate the JSON files used by the quiz front end. If you update questions directly in the text files rather than through the dashboard, compile and run the appropriate utility afterward to keep the JSON files in sync. The dashboard confirm page regenerates demographicQuestions.json automatically after every save, but changes made exclusively via the text files require a manual utility run.

Build docs developers (and LLMs) love