social_lms_quiz-8.x-1.x-dev/social_lms_quiz.install
social_lms_quiz.install
<?php /** * @file */ /** * Hook_install function. */ function social_lms_quiz_install() { // Call vocabulary_term() to create terms of class_field vocabulary. $categories_vocabulary = 'class_field'; $categories = ['1st', '2nd', '3rd', '4th', '5th']; vocabulary_term($categories_vocabulary, $categories); // Call vocabulary_term() to create terms of chapter_field vocabulary. $categories_vocabulary = 'chapter_field'; $categories = ['Chapter1', 'Chapter2', 'Chapter3']; vocabulary_term($categories_vocabulary, $categories); // Call vocabulary_term() to create terms of board_field vocabulary. $categories_vocabulary = 'board_field'; $categories = ['CBSE', 'Bihar Board', 'UP Board']; vocabulary_term($categories_vocabulary, $categories); // Call vocabulary_term() to create terms of cognitive_table_field vocabulary. $categories_vocabulary = 'cognitive_table_field'; $categories = ['Cognitive Table 1', 'Cognitive Table 2', 'Cognitive Table 3']; vocabulary_term($categories_vocabulary, $categories); // Call vocabulary_term() to create terms of concept_field vocabulary. $categories_vocabulary = 'concept_field'; $categories = ['Concept1', 'Concept2', 'Concept3']; vocabulary_term($categories_vocabulary, $categories); // Call vocabulary_term() to create terms of learning_objective vocabulary. $categories_vocabulary = 'learning_objective'; $categories = ['Learning Objective 1', 'Learning Objective 2', 'Learning Objective 3']; vocabulary_term($categories_vocabulary, $categories); // Call vocabulary_term() to create terms of quiz_type vocabulary. $categories_vocabulary = 'quiz_type'; $categories = ['Ascertain', 'Insight', 'Excel']; vocabulary_term($categories_vocabulary, $categories); // Call vocabulary_term() to create terms of subject vocabulary. $categories_vocabulary = 'subject'; $categories = ['Physics', 'Maths', 'Chemistry']; vocabulary_term($categories_vocabulary, $categories); // Call vocabulary_term() to create terms of text_book vocabulary. $categories_vocabulary = 'text_book'; $categories = ['Book1', 'Book2', 'Book3']; vocabulary_term($categories_vocabulary, $categories); // Call vocabulary_term() to create terms of section vocabulary. $categories_vocabulary = 'section'; $categories = ['Section1', 'Section2', 'Section3']; vocabulary_term($categories_vocabulary, $categories); // Call vocabulary_term() to create terms of school vocabulary. $categories_vocabulary = ['school']; $categories = ['School1', 'School2', 'School3']; vocabulary_term($categories_vocabulary, $categories); // Question 1:-. $field_option_value = ['117', '144', '135', '134']; $quiz_title = 'Maths'; $term_name = ['Bihar Board', 'Chapter1', '1st', 'Maths']; $pos = 3; $question = ['Addition', '101+33']; create_question($field_option_value, $pos, $quiz_title, $term_name, $question); // Question 2:-. $field_option_value = ['A', 'B', 'Evaporation', 'D']; $quiz_title = 'Chemistry'; $term_name = ['CBSE', 'Chapter3', '5th', 'Chemistry']; $pos = 2; $question = ['Change_Reaction', 'Liquid to Gas state process']; create_question($field_option_value, $pos, $quiz_title, $term_name, $question); }