From c0687c652b173695dd93e8a01ec640dd32506a6c Mon Sep 17 00:00:00 2001 From: Ruben Ramirez Date: Fri, 4 Apr 2025 08:15:06 -0500 Subject: [PATCH] feat: Align question types in Manage Questions template --- template-manage-questions.php | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/template-manage-questions.php b/template-manage-questions.php index 7d96728..d6a14b1 100644 --- a/template-manage-questions.php +++ b/template-manage-questions.php @@ -19,13 +19,15 @@ if ( ! is_user_logged_in() || ! current_user_can( $required_capability ) ) { // wp_die( esc_html__( 'You do not have sufficient permissions to access this page.', 'quiztech' ), 403 ); } -// Define available question types (should ideally come from a central config or helper) -$question_types = array( - 'multiple-choice' => __( 'Multiple Choice', 'quiztech' ), - 'true-false' => __( 'True/False', 'quiztech' ), - 'short-answer' => __( 'Short Answer', 'quiztech' ), - // Add other types as needed -); +// Define available question types (Ideally, fetch this dynamically from the plugin) +$question_types = [ + 'text' => \__( 'Text (Single Line)', 'quiztech' ), + 'textarea' => \__( 'Text Area (Multi-line)', 'quiztech' ), + 'multiple-choice' => \__( 'Multiple Choice (Single Answer)', 'quiztech' ), + 'checkbox' => \__( 'Checkboxes (Multiple Answers)', 'quiztech' ), + 'numeric' => \__( 'Numeric', 'quiztech' ), +]; +// TODO: Refactor this to use a plugin helper function or filter to avoid duplication. get_header(); ?> @@ -43,7 +45,7 @@ get_header(); ?>