INSERT INTO `ohrm_advanced_workflow_request` (`entity`, `status_id`, `options`) VALUES
    ('OnlineCourse', 15, NULL);
SET @ad_workflow_rqst_id_1 := LAST_INSERT_ID();

INSERT INTO `ohrm_advanced_workflow_request` (`entity`, `status_id`, `options`) VALUES
    ('OnlineCourse', 15, NULL);
SET @ad_workflow_rqst_id_2 := LAST_INSERT_ID();

INSERT INTO `ohrm_online_course` ( `name`, `validity_length_value`, `validity_length_type`, `duration_value`, `duration_type`, `video_id`, `is_deleted`, `is_expired`, `approval_required`, `assessment_required`, `resource_acknowledgement_required`, `workflow_request_id`, `created_time`, `added_by`) VALUES
( 'Leadership and Management Course', '1', 'y', '1.5', 'h', NULL, 0, 0, 0, 1, 0, @ad_workflow_rqst_id_1, '2024-11-19 08:11:21', 'Default Admin'),
('Mastering Effective Communication: Mindfulness, Clarity, and Conciseness', '1', 'y', '1', 'h', NULL, 0, 0, 0, 1, 0, @ad_workflow_rqst_id_2, '2024-11-19 08:11:21', 'Default Admin');

SET @leadership_course_id := (SELECT `id` FROM `ohrm_online_course` WHERE `name` LIKE 'Leadership and Management Course');
SET @communication_course_id := (SELECT `id` FROM `ohrm_online_course` WHERE `name` LIKE 'Mastering Effective Communication: Mindfulness, Clarity, and Conciseness');

INSERT INTO `ohrm_online_course_link` ( `name`, `type`, `link_id`, `description`, `resource_order`, `course_id`) VALUES
('Great leadership starts with self-leadership', 1, 'https://www.youtube.com/watch?v=vlpKyLklDDY&t=22s', 'A video on Great leadership starts with self-leadership  By Lars Sudmann and TEDxUCLouvain', 1, @leadership_course_id),
('How to write less but say more', 1, 'https://www.ted.com/talks/jim_vandehei_how_to_write_less_but_say_more?subtitle=en', 'A video on how to write less while expressing more', 1, @communication_course_id);

INSERT INTO `ohrm_online_course_certificate` ( `course_id`, `name`) VALUES
(@leadership_course_id, 'Leadership and Management Course'),
(@communication_course_id, 'Mastering Effective Communication: Mindfulness, Clarity, and Conciseness');

INSERT INTO `ohrm_question_form` (`name`, `header`, `footer`, `css_file_name`) VALUES
( 'Leadership and Management Competency', '<span style=\"color: #5d5d5d; font-size: 13pt;\"><ul><li style=\"margin-top:1px;\">Please answer all questions in this assessment.</li><li style=\"margin-top:1px;\">Any questions left unanswered will be taken as a wrongly answered question.</li><li style=\"margin-top:1px;\">All questions are Multiple Choice Questions (MCQs) with one or many correct answers for each question.</li><li style=\"margin-top:1px;\">Once you have completed the examination please submit your answers by clicking \"Submit Test\" at the bottom of the screen.</li><li style=\"margin-top:1px;\">The Timer will show you how much time you have remaining in the examination.</li><li style=\"margin-top:1px;\">Note that if you are unable to submit the answers within the given time frame the system will automatically submit it once the timer runs out.</li></span>', '', NULL),
( 'Mastering Effective Communication: Mindfulness, Clarity, and Conciseness', '<span style=\"color: #5d5d5d; font-size: 13pt;\"><ul><li style=\"margin-top:1px;\">Please answer all questions in this assessment.</li><li style=\"margin-top:1px;\">Any questions left unanswered will be taken as a wrongly answered question.</li><li style=\"margin-top:1px;\">All questions are Multiple Choice Questions (MCQs) with one or many correct answers for each question.</li><li style=\"margin-top:1px;\">Once you have completed the examination please submit your answers by clicking \"Submit Test\" at the bottom of the screen.</li><li style=\"margin-top:1px;\">The Timer will show you how much time you have remaining in the examination.</li><li style=\"margin-top:1px;\">Note that if you are unable to submit the answers within the given time frame the system will automatically submit it once the timer runs out.</li></span>', '', NULL);

SET @leadership_course_question_form_id := (SELECT `id` FROM `ohrm_question_form` WHERE `name` LIKE 'Leadership and Management Competency');
SET @communication_course_question_form_id := (SELECT `id` FROM `ohrm_question_form` WHERE `name` LIKE 'Mastering Effective Communication: Mindfulness, Clarity, and Conciseness');

INSERT INTO `ohrm_online_assessment` (`name`, `pass_grade`, `time_limit_value`, `time_limit_type`, `attempts`, `question_form_id`, `added_by`, `is_random_question_enabled`, `random_question_limit`) VALUES
( 'Leadership and Management Competency', '80', '20', 'mi', 2, @leadership_course_question_form_id, 'Default Admin', 1, 10),
( 'Effective Communication Proficiency Assessment', '80', '20', 'mi', 2, @communication_course_question_form_id, 'Default Admin', 1, 10);

SET @leadership_course_assessment_id := (SELECT `id`  FROM `ohrm_online_assessment` WHERE `name` LIKE 'Leadership and Management Competency');
SET @communication_course_assessment_id := (SELECT `id`  FROM `ohrm_online_assessment` WHERE `name` LIKE 'Effective Communication Proficiency Assessment');

INSERT INTO `ohrm_online_course_assessment` (`course_id`, `assessment_id`) VALUES
(@leadership_course_id, @leadership_course_assessment_id),
(@communication_course_id, @communication_course_assessment_id);

SET @otm_questionnaire_id := (SELECT `id` FROM `ohrm_questionnaire` WHERE `questionnaire_name` LIKE 'online_training');
SET @checkbox_ans_type_id := (SELECT `id` FROM `ohrm_answer_type` WHERE `type_name` LIKE 'Checkboxes');

SET @question_form_section_type_id := (SELECT `id` FROM `ohrm_question_form_section_type` WHERE `name` LIKE 'Question');

INSERT INTO `ohrm_question_form_section` (`section_name`, `question_form_id`, `order_number`, `weight`, `parent_id`, `question_group_id`, `options`, `comment`, `score`, `readonly`, `deletable`, `is_general`, `section_type_id`) VALUES
( 'General', @leadership_course_question_form_id, 1, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, @question_form_section_type_id),
( 'General', @communication_course_question_form_id, 1, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, @question_form_section_type_id);

SET @leadership_course_question_form_section_id := (SELECT `id`  FROM `ohrm_question_form_section` WHERE `section_name` LIKE 'General' AND `question_form_id` = @leadership_course_question_form_id);
SET @communication_course_question_form_section_id := (SELECT `id` FROM `ohrm_question_form_section` WHERE `section_name` LIKE 'General' AND `question_form_id` = @communication_course_question_form_id);


INSERT INTO `ohrm_question` ( `type_id`, `questionnaire_id`, `question_name`, `question_description`, `options`, `is_default`, `is_deleted`, `form_specific`, `group_id`, `difficulty`, `default_answer`, `mandatory`) VALUES
( @checkbox_ans_type_id, @otm_questionnaire_id, 'demo_1', '<div>What is a critical component of effective leadership, according to Lars Sudmann?</div>', '{\"values\":[\"Strategic planning\",\"Self-leadership\",\"Financial acumen\",\"Risk management\"]}', NULL, 0, 0, NULL, NULL, 'Self-leadership', NULL),
( @checkbox_ans_type_id, @otm_questionnaire_id, 'demo_2', '<div>In the context of great leadership, what does Sudmann refer to as the &quot;leadership formula of doom&quot;?</div>', '{\"values\":[\"Over-reliance on authority\",\"Ineffective communication\",\"A lack of self-awareness and personal development\",\"Strict adherence to rules\"]}', NULL, 0, 0, NULL, NULL, 'A lack of self-awareness and personal development\n', NULL),
( @checkbox_ans_type_id, @otm_questionnaire_id,  'demo_3', '<div>What does Sudmann suggest is necessary for leaders to evolve into &quot;Utopia leaders&quot;?</div>', '{\"values\":[\"Compliance with corporate policies\",\"Emphasis on teamwork\",\"Continuous personal and professional growth\",\"Financial performance metrics\"]}', NULL, 0, 0, NULL, NULL, 'Continuous personal and professional growth', NULL),
( @checkbox_ans_type_id, @otm_questionnaire_id,  'demo_4', '<div>How does Sudmann describe the leadership challenges in a future ultra-networked world?</div>', '{\"values\":[\"Increasing isolation among leaders\",\"The necessity for adaptability and collaboration\",\"Simplification of leadership roles\",\"Reduced accountability\"]}', NULL, 0, 0, NULL, NULL, 'The necessity for adaptability and collaboration', NULL),
( @checkbox_ans_type_id, @otm_questionnaire_id,  'demo_5', '<div>What is one way Sudmann believes leaders can foster better communication within their teams?</div>', '{\"values\":[\"Limiting feedback\",\"Encouraging open dialogue and transparency\",\"Maintaining hierarchical structures\",\"Using complex jargon\"]}', NULL, 0, 0, NULL, NULL, 'Encouraging open dialogue and transparency\n', NULL),
( @checkbox_ans_type_id, @otm_questionnaire_id,  'demo_6', '<div>According to Sudmann, what is one common misconception about leadership?</div>', '{\"values\":[\"It is only about making decisions\",\"It can be learned and developed over time\",\"Leaders are born not made\",\"It requires a formal education\"]}', NULL, 0, 0, NULL, NULL, 'Leaders are born not made\n\n', NULL),
( @checkbox_ans_type_id, @otm_questionnaire_id,  'demo_7', '<div>Which quality does Sudmann highlight as essential for modern leaders?</div>', '{\"values\":[\"Charisma\",\"Technical expertise\",\"Emotional intelligence\",\"Authoritarian control\"]}', NULL, 0, 0, NULL, NULL, 'Emotional intelligence\n', NULL),
( @checkbox_ans_type_id, @otm_questionnaire_id,  'demo_8', '<div>What role does feedback play in effective leadership, according to the talk?</div>', '{\"values\":[\"It should be avoided to maintain authority\",\"It is crucial for personal development and team dynamics\",\"It complicates decision-making processes\",\"It is only necessary during performance reviews\"]}', NULL, 0, 0, NULL, NULL, 'It is crucial for personal development and team dynamics\n', NULL),
( @checkbox_ans_type_id, @otm_questionnaire_id,  'demo_9', '<div>What is a potential barrier to achieving effective leadership in organizations?</div>', '{\"values\":[\"Over-communication\",\"Resistance to change and innovation\",\"Emphasis on team collaboration\",\"Increased employee engagement\"]}', NULL, 0, 0, NULL, NULL, 'Resistance to change and innovation\n', NULL),
( @checkbox_ans_type_id, @otm_questionnaire_id,  'demo_10', '<div>What overarching theme does Sudmann emphasize regarding the future of leadership?</div>', '{\"values\":[\"A return to traditional management styles\",\"The importance of adaptability and self-leadership in navigating complexities\",\"Focus on profitability above all\",\"Reliance on technology to lead teams\"]}', NULL, 0, 0, NULL, NULL, 'The importance of adaptability and self-leadership in navigating complexities\n', NULL),
( @checkbox_ans_type_id, @otm_questionnaire_id,  'demo_11', '<div>What is one key benefit of clarity in a leader’s communication?</div>', '{\"values\":[\"It shows authority\",\"It reduces the need for follow-up discussions\",\"It encourages more feedback\",\"It allows for longer messages\"]}', NULL, 0, 0, NULL, NULL, 'It reduces the need for follow-up discussions\n\n', NULL),
( @checkbox_ans_type_id, @otm_questionnaire_id,  'demo_12', '<div>How does concise communication improve team productivity?</div>', '{\"values\":[\"By ensuring the team stays focused and saves time\",\"By allowing for more frequent meetings\",\"By promoting the use of complex vocabulary\",\"By minimizing feedback loops\"]}', NULL, 0, 0, NULL, NULL, 'By ensuring the team stays focused and saves time', NULL),
( @checkbox_ans_type_id, @otm_questionnaire_id,  'demo_13', '<div>In what way does active listening contribute to effective leadership?</div>', '{\"values\":[\"It enhances a leader\\u2019s decision-making by gathering diverse perspectives\",\"It helps a leader avoid conflict\",\"It reduces the need for written communication\",\"It prevents team feedback\"]}', NULL, 0, 0, NULL, NULL, 'It enhances a leader’s decision-making by gathering diverse perspectives', NULL),
( @checkbox_ans_type_id, @otm_questionnaire_id,  'demo_14', '<div>Why is it critical for leaders to use concise language in digital communication?</div>', '{\"values\":[\"To prevent information overload and respect the team\\u2019s time\",\"To demonstrate their expertise\",\"To increase the length of reports\",\"To keep the focus on themselves\"]}', NULL, 0, 0, NULL, NULL, 'To prevent information overload and respect the team’s time\n', NULL),
( @checkbox_ans_type_id, @otm_questionnaire_id,  'demo_15', '<div>What is the main purpose of mindful communication in leadership?</div>', '{\"values\":[\"To appear more authoritative\",\"To engage and connect with team members on a deeper level\",\"To increase the formality of conversations\",\"To make communication more complex\"]}', NULL, 0, 0, NULL, NULL, 'To engage and connect with team members on a deeper level\n\n', NULL),
( @checkbox_ans_type_id, @otm_questionnaire_id,  'demo_16', '<div>Which of the following best defines clarity in communication?</div>', '{\"values\":[\"Using the shortest words possible\",\"Removing any ambiguity to ensure the message is easily understood\",\"Using professional jargon to sound authoritative\",\"Including as much information as possible\"]}', NULL, 0, 0, NULL, NULL, 'Removing any ambiguity to ensure the message is easily understood\n', NULL),
( @checkbox_ans_type_id, @otm_questionnaire_id,  'demo_17', '<div>What is one result of a leader’s failure to communicate concisely?</div>', '{\"values\":[\"Improved team morale\",\"Decreased productivity and increased misunderstandings\",\"More effective delegation\",\"Enhanced focus on goals\"]}', NULL, 0, 0, NULL, NULL, 'Decreased productivity and increased misunderstandings\n', NULL),
( @checkbox_ans_type_id, @otm_questionnaire_id,  'demo_18', '<div>How does concise communication reflect a leader’s respect for their team?</div>', '{\"values\":[\"It implies that the leader values efficiency and the team\\u2019s time\",\"It increases the length of meetings\",\"It allows leaders to speak more frequently\",\"It encourages formal language\"]}', NULL, 0, 0, NULL, NULL, 'It implies that the leader values efficiency and the team’s time\n', NULL),
( @checkbox_ans_type_id, @otm_questionnaire_id,  'demo_19', '<div>What is a practical way for leaders to improve clarity in their messages?</div>', '{\"values\":[\"Using bullet points and avoiding jargon\",\"Making the message as short as possible; regardless of meaning\",\"Adding complex vocabulary\",\"Extending the length of the message\"]}', NULL, 0, 0, NULL, NULL, 'Using bullet points and avoiding jargon\n', NULL),
( @checkbox_ans_type_id, @otm_questionnaire_id,  'demo_20', '<div>Why is mindfulness important in leadership communication?<div>', '{\"values\":[\"It helps leaders multitask effectively\",\"It allows leaders to stay present; listen actively and respond thoughtfully\",\"It improves public speaking skills\",\"It increases a leader’s authority\"]}', NULL, 0, 0, NULL, NULL, 'It allows leaders to stay present; listen actively and respond thoughtfully', NULL);

SET @demo_question_id_1 := (SELECT `id` FROM `ohrm_question` WHERE `question_name` LIKE 'demo_1');
SET @demo_question_id_2 := (SELECT `id` FROM `ohrm_question` WHERE `question_name` LIKE 'demo_2');
SET @demo_question_id_3 := (SELECT `id` FROM `ohrm_question` WHERE `question_name` LIKE 'demo_3');
SET @demo_question_id_4 := (SELECT `id` FROM `ohrm_question` WHERE `question_name` LIKE 'demo_4');
SET @demo_question_id_5 := (SELECT `id` FROM `ohrm_question` WHERE `question_name` LIKE 'demo_5');
SET @demo_question_id_6 := (SELECT `id` FROM `ohrm_question` WHERE `question_name` LIKE 'demo_6');
SET @demo_question_id_7 := (SELECT `id` FROM `ohrm_question` WHERE `question_name` LIKE 'demo_7');
SET @demo_question_id_8 := (SELECT `id` FROM `ohrm_question` WHERE `question_name` LIKE 'demo_8');
SET @demo_question_id_9 := (SELECT `id` FROM `ohrm_question` WHERE `question_name` LIKE 'demo_9');
SET @demo_question_id_10 := (SELECT `id` FROM `ohrm_question` WHERE `question_name` LIKE 'demo_10');
SET @demo_question_id_11 := (SELECT `id` FROM `ohrm_question` WHERE `question_name` LIKE 'demo_11');
SET @demo_question_id_12 := (SELECT `id` FROM `ohrm_question` WHERE `question_name` LIKE 'demo_12');
SET @demo_question_id_13 := (SELECT `id` FROM `ohrm_question` WHERE `question_name` LIKE 'demo_13');
SET @demo_question_id_14 := (SELECT `id` FROM `ohrm_question` WHERE `question_name` LIKE 'demo_14');
SET @demo_question_id_15 := (SELECT `id` FROM `ohrm_question` WHERE `question_name` LIKE 'demo_15');
SET @demo_question_id_16 := (SELECT `id` FROM `ohrm_question` WHERE `question_name` LIKE 'demo_16');
SET @demo_question_id_17 := (SELECT `id` FROM `ohrm_question` WHERE `question_name` LIKE 'demo_17');
SET @demo_question_id_18 := (SELECT `id` FROM `ohrm_question` WHERE `question_name` LIKE 'demo_18');
SET @demo_question_id_19 := (SELECT `id` FROM `ohrm_question` WHERE `question_name` LIKE 'demo_19');
SET @demo_question_id_20 := (SELECT `id` FROM `ohrm_question` WHERE `question_name` LIKE 'demo_20');

INSERT INTO `ohrm_question_form_question` (`question_id`, `question_form_section_id`, `question_name`, `question_description`, `options`, `parent_id`, `parent_answer`, `order_number`, `mandatory`) VALUES
( @demo_question_id_1, @leadership_course_question_form_section_id, 'demo_1', '<div>What is a critical component of effective leadership, according to Lars Sudmann?</div>', NULL, NULL, NULL, NULL, NULL),
( @demo_question_id_2, @leadership_course_question_form_section_id, 'demo_2', '<div>In the context of great leadership, what does Sudmann refer to as the &quot;leadership formula of doom&quot;?</div>', NULL, NULL, NULL, 2, NULL),
( @demo_question_id_3, @leadership_course_question_form_section_id, 'demo_3', '<div>What does Sudmann suggest is necessary for leaders to evolve into &quot;Utopia leaders&quot;?</div>', NULL, NULL, NULL, 3, NULL),
( @demo_question_id_4, @leadership_course_question_form_section_id, 'demo_4', '<div>How does Sudmann describe the leadership challenges in a future ultra-networked world?</div>', NULL, NULL, NULL, 4, NULL),
( @demo_question_id_5, @leadership_course_question_form_section_id, 'demo_5', '<div>What is one way Sudmann believes leaders can foster better communication within their teams?</div>', NULL, NULL, NULL, 5, NULL),
( @demo_question_id_6,@leadership_course_question_form_section_id, 'demo_6', '<div>According to Sudmann, what is one common misconception about leadership?</div>', NULL, NULL, NULL, 6, NULL),
(@demo_question_id_7, @leadership_course_question_form_section_id, 'demo_7', '<div>Which quality does Sudmann highlight as essential for modern leaders?</div>', NULL, NULL, NULL, 7, NULL),
(@demo_question_id_8, @leadership_course_question_form_section_id, 'demo_8', '<div>What role does feedback play in effective leadership, according to the talk?</div>', NULL, NULL, NULL, 8, NULL),
(@demo_question_id_9, @leadership_course_question_form_section_id, 'demo_9', '<div>What is a potential barrier to achieving effective leadership in organizations?</div>', NULL, NULL, NULL, 9, NULL),
( @demo_question_id_10, @leadership_course_question_form_section_id, 'demo_10', '<div>What overarching theme does Sudmann emphasize regarding the future of leadership?</div>', NULL, NULL, NULL, 10, NULL),
(@demo_question_id_11, @communication_course_question_form_section_id, 'demo_11', '<div>What is one key benefit of clarity in a leader’s communication?</div>', NULL, NULL, NULL, 2, NULL),
(@demo_question_id_12, @communication_course_question_form_section_id, 'demo_12', '<div>How does concise communication improve team productivity?</div>', NULL, NULL, NULL, 3, NULL),
( @demo_question_id_13, @communication_course_question_form_section_id, 'demo_13', '<div>In what way does active listening contribute to effective leadership?</div>', NULL, NULL, NULL, 4, NULL),
(@demo_question_id_14, @communication_course_question_form_section_id, 'demo_14', '<div>Why is it critical for leaders to use concise language in digital communication?</div>', NULL, NULL, NULL, 5, NULL),
(@demo_question_id_15, @communication_course_question_form_section_id, 'demo_15', '<div>What is the main purpose of mindful communication in leadership?</div>', NULL, NULL, NULL, 6, NULL),
(@demo_question_id_16, @communication_course_question_form_section_id, 'demo_16', '<div>Which of the following best defines clarity in communication?</div>', NULL, NULL, NULL, 7, NULL),
( @demo_question_id_17, @communication_course_question_form_section_id, 'demo_17', '<div>What is one result of a leader’s failure to communicate concisely?</div>', NULL, NULL, NULL, 8, NULL),
(@demo_question_id_18, @communication_course_question_form_section_id, 'demo_18', '<div>How does concise communication reflect a leader’s respect for their team?</div>', NULL, NULL, NULL, 9, NULL),
( @demo_question_id_19, @communication_course_question_form_section_id, 'demo_19', '<div>What is a practical way for leaders to improve clarity in their messages?</div>', NULL, NULL, NULL, 10, NULL),
( @demo_question_id_20, @communication_course_question_form_section_id, 'demo_20', '<div>Why is mindfulness important in leadership communication?<div>', NULL, NULL, NULL, 1, NULL);