ekshiksha question bank report1

159
IITB Summer Internship 2014 PROJECT REPORT ON EKSHIKSHA QUESTION BANK PRINCIPAL INVESTIGATOR PROF. D.B. PHATAK PROJECT MANAGER MR. AVINASH AWATE PROJECT MENTORS SUBMITTED BY Mr.Rajnikanth Jangir EkShiksha Question Bank Team Mr.Mayank Paliwal July 03, 2014

Upload: paradox

Post on 27-Dec-2015

33 views

Category:

Documents


5 download

TRANSCRIPT

Page 1: EkShiksha Question Bank Report1

IITB Summer Internship 2014

PROJECT REPORT ON

EKSHIKSHA QUESTION BANK

PRINCIPAL INVESTIGATOR PROF. D.B. PHATAK

PROJECT MANAGER MR. AVINASH AWATE

PROJECT MENTORS SUBMITTED BY Mr.Rajnikanth Jangir EkShiksha Question Bank Team Mr.Mayank Paliwal

July 03, 2014

Page 2: EkShiksha Question Bank Report1

Summer Internship 2014 Project Approval Certificate

Department of Computer Science and Engineering Indian Institute of Technology Bombay

The project entitled “EkShiksha Question Bank” submitted by EkShiksha Question Bank team is approved for Summer Internship 2014 programme from 10 May 2014 to 06 July 2014, at Department of Computer Science and Engineering, IIT Bombay.

______________________ ___________________ Prof. Deepak B. Phatak Mr. Avinash Awate Dept.of CSE, IITB Dept. of CSE, IITB Principal Investigator Project In-charge

Place: IIT Bombay, Mumbai Date: July 03, 2014

Page 3: EkShiksha Question Bank Report1

DECLARATION

We declare that this written submission represents our working team’s ideas. We have adequately cited and referenced the original sources. We also declare that we have adhered to all principles of academic honesty and integrity and have not misrepresented or fabricated or falsified any idea/data/fact/source in our submission. We understand that any violation of the above will be cause for disciplinary action by the Institute and can also evoke penal action from the sources which have thus not been properly cited or from whom proper permission has not been taken when needed.

Page 4: EkShiksha Question Bank Report1

OUR TEAM

1. AASHANA KHANNAHarcourt Butler Technological Institute

2. AAYUSHI AGRAWALShri Govindram Seksaria Institute of Technology and Science

3. ASHWINA KUMAR Dehradun Institute of Technology

4. AYUSHI GAURBabu Banarsi Das Engineering College

5. BANANI MEDHINational Institute of Technology, Silchar

6. DEBALAYA PANDAVeer Surendra Sai University of Technology (VSSUT), Burla

7. GAURAV ARORA Shri Govindram Seksaria Institute of Technology and Science

8. JYOTSNA PRASAD Kalinga Institute of Industrial Technology, Bhubaneswar

9. K.M. SRINIVASIIIT Nuzividu

10. MANSI AWASTHIIndian Institute of Information Technology, Allahabad

11. MEENAKSHIShanmugha Arts, Science, Technology & Research Academy

12. MITIKA SHARMA Shri Mata Vaishno Devi University Katra

13. NAMAN TANEJAIndian School of Mines, Dhanbad

14. SONIA V. MATHEWNational Institute of Technology, Calicut

15. VISHAKHA GUPTA RGU - IIIT

Page 5: EkShiksha Question Bank Report1

ACKNOWLEDGEMENT

I take this opportunity to express my profound gratitude and deep regards to everyone who helped us to complete the project "EkShiksha Question Bank". We would like to express our gratitude to Prof. D.B. Phatak for giving us an opportunity to work on this valuable project and share his vision with us We are thankful to our guide Mr. Avinash Awate for his exemplary guidance, monitoring and constant encouragement throughout our internship. He always have an insightful approach to any problem. We are also very thankful to our mentors Mr. Rajnikant Jangir and Mr. Mayank

Paliwal for their cooperation and guidance. We are grateful to members of IITB for their kind cooperation during the period of our project. Our thanks and appreciations also to our parents for their support which keep us dedicated to our work.

Page 6: EkShiksha Question Bank Report1

ABSTRACT

India is a vast nation with a linguistic diversity that is rarely found in a country. Being the second largest in world population it is one of the most illiterate countries in the world. Although the government is investing in education one of the major reasons for illiteracy still remains. It is the lack of teachers. According to Marc F. Berstein, Fordham University Graduate School of Education, by the year 2020 there will be a serious teacher shortage, especially in the more demanding subject areas of mathematics and science. There is no way one can produce enough good teachers to meet the demands of the education sector. The purpose of the project is to store quality education content and to make it available in various languages to all the students in order to provide a sound learning background to each and every student of the country. Thus it requires various features to make an interactive website. The features include maintaining a database for storing question and answer and preparing interactive activities to make students take interest in the subject. Also, to make the website user friendly, features like search and like and comments are included. To make the activities ( that were made in actionscript ) to reach to larger audience through android devices, these must be converted to javascript. By making the project publically available, we can have everyone learning from the same source be it a student of private school or a government school truly satisfying our dream of “EkShiksha”.

Page 7: EkShiksha Question Bank Report1

TABLE OF CONTENTS

1.) Introduction…………………………………………………………………….1 1.1) Aim of the Project………………………………………………………...1 1.2) Scope……………………………………………………………………...1 1.3) Software and Resources…………………………………………………..2 1.4) Application Requirements………………………………………………...2

2.) EkShiksha Question Bank……………………………………………………...3 2.1) Database API……………………………………………………………....3

2.1.1) Introduction……………………………………………………….3 2.1.2) Entity Relationship Diagram……………………………………...4 2.1.3) Class Diagram………………………………………………….....6 2.1.4) class QuestionBankProcess…………………………………….....9 2.1.5) class KeywordManager………………………………………….16

2.2) Read and Extract Question……………………………………………….20 2.2.1) Introduction……………………………………………………...20 2.2.2) Data Flow Diagram……………………………………………...21 2.2.3) Fill Blank Reader………………………………………………..22 2.2.4) True False Reader……………………………………………….22 2.2.5) Match Column Reader…………………………………………..23 2.2.6) Multiple Choice Reader………………………………………....24 2.2.7) Class Diagram…………………………………………………...25 2.2.8) Statistical Report………………………………………………...28 2.2.9) Testing …………………………………………………………..28

2.3) Contribution Portal……………………………………………………… 30 2.3.1) Introduction……………………………………………………..30 2.3.2) Features…………………………………………………………30 2.3.3) Scope Statement ………………………………………………..31 2.3.4) Software Specifications………………………………………...32 2.3.5) Use case Diagram of Contribution Portal………………………32 2.3.6) Flow chart of Contribution Portal………………………………33

2.3.7) User Interface……………………………………………33

2.4) Front End for Question Display………………………………………….48 2.4.1) Multiple Choice Questions……………………………………....48 2.4.2) Match the Columns……………………………………………...52 2.4.3) Fill the Blanks…………………………………………………...54 2.4.4) True/False………………………………………………………..58 2.4.5) Crossword……………………………………………………….61

Page 8: EkShiksha Question Bank Report1

2.5) Math Activities…………………………………………………………...64 2.5.1) Introduction……………………………………………………...64 2.5.2) Number Beads Activity………………………………………….64 2.5.3) Abacus…………………………………………………………...72

2.6) Like and Comment Plugin……………………………………………….79 2.6.1) Like Plugin……………………………………………………....79 2.6.2) Steps to Include Like Button in Webpage……………………….79 2.6.3) Comment Plugin………………………………………………...80 2.6.4) Steps to Include Comment iFrame in Webpage…………………80

2.7) Search…………………………………………………………………….81 2.7.1) Introduction……………………………………………………...81 2.7.2) Overview of the Search Engine…………………………………82 2.7.3) Flow Chart………………………………………………………97

2.8) Implementation of PIE Framework in HTML5 ………………………....98 2.8.1) Introduction……………………………………………………...98 2.8.2) Design Overview………………………………………………..99 2.8.3) Class and Method Details……………………………………...100 2.8.4) Zebra…………………………………………………… ……. 1082.8.5) EaselJS………………………………………………………....109

3.) Challenges Faced…………………………………………………………….111

4.) Conclusion and Future Scope………………………………………………..112

5.) References …………………………………………………………………..113

6.) AppendixA…………………………………………………………………..114 A.1) Destructive testing report for read & extract...........................................114

A.1.1) Test Report for True False Problems..........................................114 A.1.2) Test Report for Fill Blank Problems…………………………...115 A.1.3) Test Report for Match Column Problems……………………...117 A.1.4) Test Report for Multiple Choice Problems……………………120

A.2) Test Report for Database API…………………………………………..121 A.2.1) Test Report for Class QuestionBankProcess…………………..121 A.2.2) Test Report for Class KeywordManager………………………136

Appendix B B.1) ekshikshaqb Tables……………………………………………………..141

Page 9: EkShiksha Question Bank Report1

LIST OF TABLES

Table 1: Application Requirements for EkShiksha Question Bank .............................. 2

Table 2: Statistical Data of read and extracted problems of Fill Blank, True/False, Match Column and Multiple Choice ........................................................................... 28

Table 3: Application Requirement for EkShiksha Search ........................................... 82

Table 4: Test Cases for True False Problems ............................................................ 115

Table 5:Test Cases for Fill Blanks problems ............................................................. 117

Table 6: Test Cases for Match Column problems ..................................................... 120

Table 7: Test Case for Multiple Choice problems ..................................................... 120

Table 8: Test Cases for insertFileBlank ..................................................................... 121

Table 9: Test Cases for insertFileMCQ ..................................................................... 121

Table 10: Test Cases for insertFileMatchColumn ..................................................... 121

Table 11: Test Cases for insertFileTrueFalse............................................................. 122

Table 12:Test Cases for isValid ................................................................................. 123

Table 13: Test Cases for isvalidOptions .................................................................... 124

Table 14: Test Cases for isDuplicate ......................................................................... 124

Table 15: Test Cases for nextQuestionId ................................................................... 124

Table 16: Test Cases for insertQuestion .................................................................... 125

Table 17: Test Cases for deleteFillBlanks ................................................................. 125

Table 18: Test Cases for deleteMCQ ......................................................................... 126

Table 19:Test Cases for deleteTrueFalse ................................................................... 126

Table 20: Test Cases for deleteMatchColumn ........................................................... 127

Table 21: Test Cases for updateFillBlank .................................................................. 127

Table 22: Test Cases for updateTrueFalse ................................................................. 128

Table 23: Test Cases for updateMCQ ........................................................................ 128

Table 24: Test Cases for updateMatchColumn .......................................................... 129

Table 25: Test Cases for extractFillblanks................................................................. 129

Table 26: Test Cases for extractTrueFalse ................................................................. 130

Table 27: Test Cases for extractMatchColumn ......................................................... 130

Table 28: Test Cases for extractMCQ ....................................................................... 131

Table 29: Test Cases for extractAllTrueFalse............................................................ 131

Table 30: Test Cases for extractAllMCQ .................................................................. 132

Table 31: Test Cases for extractAllFillBlanks ........................................................... 132

Table 32: Test Cases for extractAllMatchColumn .................................................... 132

Table 33: Test Cases for extractAllByTopicId .......................................................... 133

Table 34: Test Cases for extractByTopicId ............................................................... 134

Table 35: Test Cases for extractByAuthorId ............................................................. 134

Table 36: Test Cases for extractByReviewerId ......................................................... 134

Table 37: Test Cases for extractByStandard .............................................................. 135

Table 38: Test Cases for extractByComplexity ......................................................... 135

Table 39: Test Cases for extractByStatus .................................................................. 136

Table 40: Test Cases for insertKeyword .................................................................... 137

Page 10: EkShiksha Question Bank Report1

Table 41: Test Cases for deleteKeyword ................................................................... 137

Table 42: Test Cases for extractKeyword .................................................................. 137

Table 43: Test Cases for extractAllKeyword ............................................................ 138

Table 44: Test Cases for extractKeywordByStatus ................................................... 138

Table 45: Test Cases for extractKeywordById .......................................................... 138

Table 46: Test Cases for extractKeywordByTopic .................................................... 139

Table 47: Test Cases for updateKeyword .................................................................. 140

Table 48: questionbank table ..................................................................................... 141

Table 49: multiplechoiceoptions table ....................................................................... 141

Table 50: truefalseoptions table ................................................................................. 141

Table 51:fillblankoptions table .................................................................................. 142

Table 52: matchcolumnoptions table ......................................................................... 142

Table 53: published_content table ............................................................................. 142

Table 54: ekshiksha_users table ................................................................................ 143

Table 55: languages table .......................................................................................... 143

Table 56: topics table ................................................................................................. 144

Table 57:contents table .............................................................................................. 144

Page 11: EkShiksha Question Bank Report1

LIST OF FIGURES

Figure 1: ER Diagram for Database API tables ............................................................ 4

Figure 2: Class diagram for database API ..................................................................... 8

Figure 3: Activity diagram for insertion of question in question bank ....................... 10

Figure 4:Activity diagram for deletion of questions from database ........................... 11

Figure 5:Activity Diagram for updating questions in question bank .......................... 13

Figure 6:Activity Diagram for extracting questions from question bank ................... 15

Figure 7: Activity Diagram for keyword insertion ...................................................... 17

Figure 8: Activity Diagram for keyword extraction .................................................... 18

Figure 9: Activity Diagram for updating of keywords ................................................ 19

Figure 10: Activity Diagram for deletion of keywords ............................................... 20

Figure 11: DFD of read and extract questions ............................................................ 21

Figure 12: Class diagram for read and extract ............................................................ 27

Figure 13: Use Case Diagram of contribution portal .................................................. 32

Figure 14: Flow Chart of Contribution Portal ............................................................. 33

Figure 15: Contribution Portal Header ........................................................................ 34

Figure 16: Screenshot of ekShiksha contribution portal Home page.......................... 34

Figure 17: Screenshot of ekShiksha contribution portal Login page. ......................... 35

Figure 18: Screenshot of ekShiksha contribution portal Login page when an un authenticated user tries to log in. ................................................................................. 35

Figure 19: Screenshot of ekShiksha contribution portal Contribute page. ................. 36

Figure 20: Screenshot of the match the coloumns form ............................................. 37

Figure 21: screenshot of the match the columns form with javascript validations. .... 37

Figure 22: screenshot showing that the data has been entered successfully in the database by match the columns form. ......................................................................... 38

Figure 23: screenshot showing that the data which has been entered by the user, olready exists in the database. ..................................................................................... 38

Figure 24: screenshot of the definition form. .............................................................. 39

Figure 25: Screenshot showing that the data has been entered successfully in the database. ...................................................................................................................... 39

Figure 26: screenshot showing that the data which has been entered by the user, already exists in the database. ..................................................................................... 40

Figure 27: screenshot depicts that when a user selects a particular topic,he can also view the related keywords of that topic which exists in the database by clicking the given”click here ”link. ................................................................................................. 40

Figure 28: screenshot shows the keywords which are seen after clicking the link. ... 41

Figure 29: screenshot of the true/false form................................................................ 41

Figure 30: screenshot showing that the data has been entered successfully to the database. ...................................................................................................................... 42

Figure 31: screenshot showing that the data already exists in the database. .............. 42

Page 12: EkShiksha Question Bank Report1

Figure 32: screenshot of the multiple choice question form. ...................................... 43

Figure 33: screenshot of the option page to give first option of multiple options . .... 43

Figure 34: screenshot of the option page to give second option ,after which the question can be submitted.(minimum two options are compulsory) .......................... 44

Figure 35: screenshot of the review page which contains all the details of the question inserted by the user.(the user can do editing of the details here) ................................ 45

Figure 36: : Screenshot of ekShiksha contribution portal my contribution page. ...... 45

Figure 37: Screenshot of ekShiksha contribution portal Review page. ..................... 46

Figure 38: Screenshot of ekShiksha contribution portal Review page. ..................... 47

Figure 39: Screenshot of ekShiksha contribution portal FAQ page. .......................... 47

Figure 40: Initial Loading screen of all type of questions .......................................... 49

Figure 41: Display of Multiple Choice questions ....................................................... 50

Figure 42: Select the correct option(s) of the given question ..................................... 50

Figure 43: On clicking the done button, correct option displayed in green and wrong option display as red. Next question can be loaded using next button ....................... 51

Figure 44: Initial Screen of Match Column Exercise .................................................. 52

Figure 45: Select a term from left column .................................................................. 53

Figure 46: Drag the selected term over the terms in right column, if correct then its colour turns in green .................................................................................................... 53

Figure 47: Drag the selected term over the terms in right column, if wrong its colour turns into red ................................................................................................................ 54

Figure 48: Loading Screen of Fill Blanks ................................................................... 55

Figure 49: Fill Blanks Question Display ..................................................................... 56

Figure 50: Drag the correct option to the blank .......................................................... 56

Figure 51:If the Fill Blank answer is correct it will display as green otherwise red .. 57

Figure 52: Initial Loading Screen of True/False Questions ........................................ 58

Figure 53: True/False Question Display...................................................................... 59

Figure 54: True or False options can be selected ........................................................ 60

Figure 55: On clicking Next button correct statement will display as green and wrong will display in red ........................................................................................................ 60

Figure 56: Initial display screen of Crossword Puzzle ................................................ 61

Figure 57:Select the clue to answer the corresponding keyword. Hint will be displayed at the bottom of screen ........................................................................... 62

Figure 58: On clicking the CHECK button, correctly filled words displayed in green and incorrectly filled or empty cells display as red. Next crossword can be loaded using NEXT PUZZLE button ...................................................................................... 63

Figure 59: On clicking SHOW ANSWER button solved crossword will be displayed ..................................................................................................................................... 63

Figure 60: Demo of Number Beads Activity(Display) ............................................... 65

Figure 61:Demo of Number Beads Activity(Counting) .............................................. 65

Figure 62: Demo of Number Beads Activity(Counting) - 2 ....................................... 66

Figure 63:Demo of Number Beads Activity(Addition) .............................................. 66

Figure 64:Demo of Number Beads Activity(Addition ) – 2 ....................................... 67

Figure 65: Demo of Number Beads Activity(Addition) - 3 ........................................ 67

Figure 66:Demo of Number Beads Activity(Subtraction) .......................................... 68

Page 13: EkShiksha Question Bank Report1

Figure 67: Demo of Number Beads Activity(Subtraction) - 2 .................................... 68

Figure 68: Demo of Number Beads Activity(Counting in Multiples) ........................ 69

Figure 69: Number Beads Activity Display screen in Interactive mode..................... 69

Figure 70: Number Beads Activity answer display in Interactive mode .................... 70

Figure 71: Number Beads Activity Guide Mode Screen ........................................... 70

Figure 72: Number Beads Activity Guide Mode step by step solution ..................... 71

Figure 73: Number Beads Activity Test mode display screen ................................... 71

Figure 74: Number Beads Activity Test Mode answer display ................................... 72

Figure 75: Abacus Display screen in demo mode ....................................................... 73

Figure 76: Abacus display screen while playing in demo mode ................................. 73

Figure 77: Abacus display screen(2) ........................................................................... 74

Figure 78: Abacus display screen in interactive mode ................................................ 74

Figure 79: Screenshot of Abacus while playing .......................................................... 75

Figure 80: Abacus display screen in interactive mode (2) .......................................... 75

Figure 81: Abacus Display screen in guided mode ..................................................... 76

Figure 82: Screenshot of abacus while playing in guided mode ................................ 76

Figure 83: Screenshot of abacus in guided mode ........................................................ 77

Figure 84:Screenshot of abacus in guided mode(2) .................................................... 77

Figure 85:Screenshot of abacus in test mode .............................................................. 78

Figure 86: Screenshot of abacus while playing in test mode ...................................... 78

Figure 87: Screenshot of search engine in ekShiksha website .................................... 83

Figure 88: On giving blank search query, "Please enter a valid search query" message will display .................................................................................................................. 84

Figure 89: Searching for the query "electrisiti" .......................................................... 85

Figure 90: Showing search results for "electricity" instead ........................................ 85

Figure 91: Searching for query "watch Electric bulb" ................................................ 86

Figure 92: Search results for "electric bulb" instead where links are videos .............. 86

Figure 93: Searching for query "watch Chemistry class 9" ........................................ 87

Figure 94: Showing Search results for "chemistry" having videos of class 9 chemistry ..................................................................................................................... 87

Figure 95: Searching for "humanoid interactive learning" ......................................... 88

Figure 96: Showing search results for "human".......................................................... 88

Figure 97: Searching for query "I am here to search content" .................................... 89

Figure 98: Showing results for query "I am here to search content" .......................... 89

Figure 99: Searching for "content of nutrition in plant" ............................................. 90

Figure 100: showing search results for "nutrition in plants" ....................................... 90

Figure 101: searching for the "contents of light class 10" .......................................... 91

Figure 102: Showing search results for "light" ........................................................... 91

Figure 103: Searching for "humanoid content" ........................................................... 92

Figure 104: Showing search results for "humans" ...................................................... 92

Figure 105: Searching for "I am here to search content" ............................................ 93

Figure 106: Showing results for "I am here to search content" .................................. 93

Figure 107: Searching for "crop production and management".................................. 94

Figure 108: Showing results for "crop production and management" ........................ 94

Figure 109: Searching for Chemistry class 10 ............................................................ 95

Page 14: EkShiksha Question Bank Report1

Figure 110: Showing results for "chemistry" .............................................................. 95

Figure 111: Searching in other languages ................................................................... 96

Figure 112: Showing results for search in other languages ........................................ 96

Figure 113: Class Heirarchy of PIE to HTML conversion ......................................... 99

Page 15: EkShiksha Question Bank Report1

1

Chapter 1

Introduction EkShiksha Question Bank project aims to provide a multilingual, interactive and free platform to make the variety of educational content easily accessible. We also allow our users to improve the quality of educational content by contributing to EkShiksha's question bank. This content can be used for multiple choice, fill in the blank, match columns, true false type questions etc. This way a user can learn in its own pace and also self assess his progress with the help of many interactive activities on particular topic.

1.1 Aim of the Project To design and implement a system for allowing learners to select topics and get

a quiz. It includes the implementation of Databse search, dynamic quiz and display for the already existing framework for multiple choice, fill in the blank, match columns, true false type questions.

Design and implement a system where contributions to question bank can be

made through the net. Includes question evaluation, duplicate management and screening. It includes implementation of a front end for submission of question, assessing a question for uniqueness, complexity, maintaining history of attempts and dynamic classification.

1.2 Scope With the advancement in technology, eLearning has gained great popularity. This project tries to encouage the idea of eLearning by making available to the students all the classroom study materials while allowing them to follow a self-paced learning process. This project will allow students from anywhere to have the same education in the language that they prefer. We also allow our users to contribute to our question bank by inserting multiple choice, match column, true/false, fill blank questions. The interactive quizzes and activities makes the process of learning more attractive and easy.

Page 16: EkShiksha Question Bank Report1

2

1.3 Software and Resources

Software used: PIE Framework version 2.6, Flash develop, NetBeans 8.0 Tools used: Flex sdk Languages used: Action Script, HTML, Java Script, Cascading Style Sheets, MySQL, Java, Ajax, JSON, jQuery Operating System used: Windows, Linux 1.4 Application Requirements Table 1: Application Requirements for EkShiksha Question Bank

Requirement Version

Operating System

All Supported

Software and Packages

JRE 1.6 and above

Browsers Mozilla Firefox, Google chrome, IE6 & above

Page 17: EkShiksha Question Bank Report1

3

Chapter 2

EkShiksha Question Bank

2.1 Database API

2.1.1 Introduction

Database is the backbone of all the systems that store some data to be used at a later time or to be displayed in a specific format. Since the simple databases can have various limitations technological advancements has led us to the use of relational database. These databases have removed problems like data inconsistency and redundancy. As stated above the backbone of the EkShiksha is a database that has various tables for storing various types of questions contributed by users which include multiple choice questions ( MCQ ), fill in the blanks, match the columns, true false and definitions. Various other tables are also maintained in order to track the topics, documents and users contributing the questions in the database. However, one cannot directly interact with the database to produce the desired result. Complex SQL queries are required in order to perform tasks that hold utmost importance for an interactive environment. Thus, the need of an API that can handle the database is immense. Providing a layer of abstraction for the database users simplifies the work and makes the database much more usable. Even in absence of any details regarding the implementation of database one can simply provide the necessary information and let the API perform the function. A major drawback that this approach poses is lack of implementation details to the users which may result in cases where user may provide invalid values. Since Database API is at the highest level it must be designed to deal with various invalid cases so that no such invalid values are permitted in the database. A proper set of error status should be available to allow user to track the problems related to the use of API In this section we discuss about the structure of the database, how the entities are related and the basic operations that are performed by the API. The section also has a brief overview about the test cases that were checked and challenges faced.

Page 18: EkShiksha Question Bank Report1

4

2.1.2 Entity Relationship Diagram

Figure 1: ER Diagram for Database API tables

The ER diagram above shows the description of various tables used with their primary key underlined. The first and most important table is the questionbank table that stores the contributed question. There are tables present for each type of question viz. multiplechoiceoptions, fillblankoptions, matchcolumnoptions and

Page 19: EkShiksha Question Bank Report1

5

truefalseoptions. All these store the options of the question. As it is clear from the diagram the options for a given question is stored along with its question_id and order_index. The order_index determines the order of the option when it appears along with the question. The keywords table stores the keywords separately from the questionbank. It has a keyword and corresponding keyword description that can have multiple purposes. One important table is the published_content. In the database structure no table stores string contents except the published_content, The string contents are not directly stored in the questionbank , any of the option tables, keyword or keyword_desc but in the utext of published_content table. For each content a content_id is generated which is stored in the question_string or option_string of the tables. One exception is the truefalseoptions table that does not have any option_string. Note that in this table the translated content is also placed hence for the same content_id we have different contents in different language id. The topics table stores the topic tree of the EkShiksha portal and is used to distinguish the question in various topics. There is also contents table that works same as that of published_content but for topics. The languages table contains all the languages that are supported by the EkShiksha portal. Each different language has a different language id. Thus availability of such table ensures a multilingual questions are supported at EkShiksha. The ekshiksha_users table keep track of the users having different roles in the ekshiksha_portal. For each user there can be a mapping to questionbank author_id. Thus it ensures that each question is contributed only by valid users. All these tables are maintained as classes in the Database API. At the end it is important to state that the questionbank and option tables have an image_url attribute that stores the url of the image ( if the question has any). Thus the site supports image questions and options as well.

Page 20: EkShiksha Question Bank Report1

6

2.1.3 Class Diagram

Page 21: EkShiksha Question Bank Report1

7

Page 22: EkShiksha Question Bank Report1

8

Figure 2: Class diagram for database API

Page 23: EkShiksha Question Bank Report1

9

2.1.4 Class QuestionBankProcess This class manages the insertion, deletion, updation and extraction of multiple choice, match the columns, true/false and fill bank type questions.

Insertion: The major function to be performed by the API is insertion. The following steps were taken to perform insertion through a function of API :

1. Question Object: The question that needs to be stored in the database is passed as an object of the class.

2. Check for Validity : The question undergoes various validity check. This also includes validity checks for options as well. If the question is valid it goes to next step else it returns a proper message to user.

3. Check for Duplicity: Next the question goes for a duplicity test. If the question is not duplicate it goes to next step else it returns a proper message to user.

4. New Question Id: A new question id is provided to the question.

5. Insertion of Question String: The new question string(if any) is entered into published_content and the content_id is returned.

6. Insertion of Question: This question is now inserted into question bank.

7. Identify Type of Question: In this step we identify the type of question.

8. Insert Options: This step includes insertion of options string (if any) in published_content and then storing the options in respective options table.

Return Success: After the successful insertion of question a success code is returned to the user.

Page 24: EkShiksha Question Bank Report1

10

Figure 3: Activity diagram for insertion of question in question bank

Page 25: EkShiksha Question Bank Report1

11

Deletion:

Figure 4:Activity diagram for deletion of questions from database

Another functionality that a database API must include is deletion of question. As it is clear from the ER diagram one can review a question to approve it. If the question is not approved it must not remain in the database and must be deleted. The deletion procedure was performed in following steps:

Page 26: EkShiksha Question Bank Report1

12

1. Question id: The question that needs to be deleted from the database is passed.

2. Delete from database : The deletion operation is performed using the given

question id.

3. Check for any change: If any rows were deleted the question id was present otherwise an invalid question id was provided. In case of invalid question id an error status is returned and no further action takes place

4. Delete options: The corresponding options are deleted as well.

5. Return Success: After the successful deletion of question a success code is returned to the user.

Update:

Inserting questions consist of various errors from the user end. The user may make any mistake while submitting the question and later on realise the mistake. Such mistakes can also be found by the reviewer. Thus updating the question is an integral part of the database API. The following steps are used for update:

1. Question Object: The question that needs to be updated in the database is passed as an object of the class. The new question object should have same question id as that of the previous question object

2. Check for Validity : The question undergoes various validity check. This also includes validity checks for options as well. If the question is valid it goes to next step else it returns a proper message to user.

3. Check for Duplicity: Next the question goes for a duplicity test. If the question is not duplicate it goes to next step else it returns a proper message to user.

4. Insertion of Question String: The new question string(if any) is entered into published_content and the content_id is returned.

5. Update Question: This question is now updated.

6. Identify Type of Question: In this step we identify the type of question.

Page 27: EkShiksha Question Bank Report1

13

Figure 5:Activity Diagram for updating questions in question bank

Page 28: EkShiksha Question Bank Report1

14

1. Insert Options: This step includes updating option string (if any) in

published_content and then storing the options in respective options table. If another option is included then it is inserted in the respective options table

2. Return Success: After the successfully updating the question a success code is returned to the user.

Extract:

The reason to create a database is to allow the retrieval of data at any other time in a specific format. Here the questions are required to be extracted in order to provide exercises to the users. Thus extraction is also one of the basic functionality of database. It is implemented in the API as follows:

1. Required Attributes: The attributes based on which the questions need to be extracted are provided.

2. Select Question for given attributes: The questions having the given attributes are extracted from the database and all the attributes are set.

3. Get question in required language: The question string is chosen in given language id. If such a string does not exist the question string in English is selected.

4. Select Options: Options for respective questions are selected in the given

language. If such options does not exist then options in English are selected.

5. Return Question: After successfully setting different attributes to the question object it is returned to the user.

Page 29: EkShiksha Question Bank Report1

15

Figure 6:Activity Diagram for extracting questions from question bank

Page 30: EkShiksha Question Bank Report1

16

Testing :

There were various test cases that were handled by the database API the major ones are listed below :

1. Null values for attributes that cannot be null2. Invalid values for attributes ( for example total correct options cannot be

greater than number of options).3. Checking for duplicity of options in the same question.4. Checking for the total correct options and number of options are actually

provided in the question.5. Duplicity of the question.6. Invalid question id for delete and update.7. Checking validity and duplicity while update.8. During extraction if the strings are not available in the specified language then

it is should be returned in English.

2.1.5 Class KeywordManager

This class is used to insert, extract, delete and update keyword and definitions in the database. The Keywords object has the following attributes: keywordId, keyword, keywordDesc, topicId, status, authorId, reviewerId.

Insertion:

A Keywords object to be inserted must be valid, that is , it should have a topicId and authorId which are present in the database and the keyword and keyword description must be non empty strings. The keyword should not be already present in the database under the same topicId.

Page 31: EkShiksha Question Bank Report1

17

Figure 7: Activity Diagram for keyword insertion

Extraction:

If there are no keywords for the parameters specified, then an empty array is returned by the function.

Page 32: EkShiksha Question Bank Report1

18

Figure 8: Activity Diagram for keyword extraction

Updating:

A Keywords object to be updated must be valid, that is , it should have a questionId, topicId and authorId which are present in the database and the keyword and keyword description must be non empty strings. The keyword should not be already present in the database under the same topicId.

Page 33: EkShiksha Question Bank Report1

19

Figure 9: Activity Diagram for updating of keywords

Deletion: If the specified keywordId is present in the database, then the all the entries of the given keywordId would be deleted.

Page 34: EkShiksha Question Bank Report1

20

Figure 10: Activity Diagram for deletion of keywords

2.2 Read and Extract Question

2.2.1 Introduction

Different software contributors will contribute questions of various topics to the EkShiksha in the form of files which will also include the author name. The software reads the files, extracts the questions along with options provided in the specific format in the given file by parsing the file and handling the errors along and inserts the extracted questions and options into database for display of the questions after every topic as an exercise to be performed by the user for the assessment of his/her

Page 35: EkShiksha Question Bank Report1

21

knowledge depth of the topic. Reader reads the files, performs the extraction of questions and Updater updates the database by inserting the question.

It is designed and implemented in such a way to ensure proper functionality and to deal with various invalid cases so that no such invalid values are permitted in the database.

This section discuss the implementation of Read & Extract Module and also the flow of the data from the files to the database ensuring the consistency and integrity of the database.

2.2.2 Data Flow Diagram

Figure 11: DFD of read and extract questions

Page 36: EkShiksha Question Bank Report1

22

2.2.3 Fill Blank Reader

Objective: The software reads the FillBlankProblems files given in the zipped folders and extracts the questions and options from the given file and inserts into database.

Key Features:

Regular Expressions are used for the extraction of questions, options andauthor name from the given files.

All the questions have been correctly extracted & inserted into database.

Error Handling is implemented where different types of errors foundwhile parsing the given file and inserting into database are store in theError File.

Software Specification :

Input to the software:

FILNAME TOPIC ID

Output of the software: EXTRACTED QUESTIONS & OPTIONS

2.2.4 True False Reader

Objective: The software reads the TrueFalseProblems files given in the zipped folders and extracts the questions and options from the given file and inserts into database.

Page 37: EkShiksha Question Bank Report1

23

Key Features:

Regular Expressions are used for the extraction of questions, options andauthor name from the given files.

All the questions have been correctly extracted & inserted into database.

Error Handling is implemented where different types of errors found whileparsing the given file and inserting into database are store in the Error File.

Software specification

Input to the software:

FILNAME TOPIC ID

Output of the software: EXTRACTED QUESTIONS & OPTIONS

2.2.5 Match Column Reader

Objective: The software reads the MatchColumnProblems files given in the zipped folders and extracts the questions and options from the given file and inserts into database.

Key Features:

Regular Expressions are used for the extraction of questions, options andauthor name from the given files.

All the questions have been correctly extracted & inserted into database.

Error Handling is implemented where different types of errors found whileparsing the given file and inserting into database are store in the Error File.

Page 38: EkShiksha Question Bank Report1

24

Software Specification

Input to the software:

FILNAME TOPIC ID

Output of the software: EXTRACTED QUESTIONS & OPTIONS

2.2.6 Multiple Choice Reader

Objective: The software reads the MultipleChoiceProblems files given in the zipped folders and extracts the questions and options from the given file and inserts into database.

Key Features:

Regular Expressions are used for the extraction of questions, options andauthor name from the given files.

All the questions have been correctly extracted & inserted into database.

Error Handling is implemented where different types of errors found whileparsing the given file and inserting into database are store in the Error File.

Software Specification

Input to the software:

FILNAME TOPIC ID

Output of the software: EXTRACTED QUESTIONS & OPTIONS

Page 39: EkShiksha Question Bank Report1

25

2.2.7 Class Diagram

Page 40: EkShiksha Question Bank Report1

26

Page 41: EkShiksha Question Bank Report1

27

Figure 12: Class diagram for read and extract

Page 42: EkShiksha Question Bank Report1

28

2.2.8 Statistical Report

No. Of Questions Read : 11431

No. Of Questions Extracted : 10878

No. Of Questions Inserted : 10594

No. Of Invalid Questions : 553

2.2.9 Testing

A) Functional Testing: The functional testing is performed to test thefunctionality of the Read & Extract Software. The functional testing generatesthe following test report for all readers (FillBlankReader, TrueFalseReader,MatchColumnReader, and MultipleChoiceReader).

Table 2: Statistical Data of read and extracted problems of Fill Blank, True/False,

Match Column and Multiple Choice

FILE TYPE

TOTAL

QUESTION

READ

TOTAL EXTRACTED

QUESTION

TOTAL

INSERTED

QUESTION

FillBlankProblems 3272 3198 2973

TrueFalseProblems 2535 2522 2505

MatchColumnProblems 3374 2998 2968

MultipleChoiceProblems 2250 2160 2148

Page 43: EkShiksha Question Bank Report1

29

B) Destructive Testing: The destructive testing is performed to test for certainerrors generated by the Read & Extract Software. Test Cases include differenterrors containing files which are also handled by the software and are stored inError File.

Features Tested :

File should have a valid name.

File should be present in the specified path.

File has all the distinct questions with distinct options.

File should not be an empty file.

File should have atleast one question along with the options. File withoutquestions is not processed.

Questions can be inserted into file.

Questions can be deleted from file.

Questions can be updated into file.

Question without any option is not processed and is rejected.

Options without question are not processed and is rejected.

File should not have repeated questions.

A particular question should not have repeated options.

Features not tested :

Format of the question.

Semantic of the question.

Grammar of the question.

Page 44: EkShiksha Question Bank Report1

30

2.3 CONTRIBUTION PORTAL

2.3.1 INTRODUCTION

The ekShiksha PROJECT at IITB deals with an idealogy that promotes the integration of knowledge from all possible sources and it works in a self driven manner to establish a milestone in the field of education.The goal is to provide a single portal to all the users to contribute and review their and other contributor’s work by following few steps. This platform provides two major roles –

User as a Contributor. User as a Reviewer.

The user as a contributor inserts questions into the Question Bank via the form interface and user interactive application,these questions then are stored in the database and are used further on for reviewing and quizing.

The user as a Reviewer evaluates the set of questions which exists in the database via an interactive interface which enables the reviewer to change the status of the question by approving/disapproving/rejecting the question.

The application is made as simplified and interactive as possible for a user of any level to make contributions and review the questions in the Question Bank.

2.3.2 FEATURES

The QUESTION BANK exemplifies our work on interactive portals; it showcases the content of a educational subject and encourages contributions to that area. It has the following characteristics-

Useful. It covers a topic that is sufficiently broad and prominent to justify it asan entry point. Because a featured portal is selective in what it displays. Itshowcases only high-quality content that is preferably already featured.

Attractive. It displays content in an aesthetically pleasing way. The colours arecoherent and complementary, and do not detract from the content. Featuredportal have no formatting issues.

Page 45: EkShiksha Question Bank Report1

31

Ergonomic. It is coherently constructed to display question bank contentlogically and effectively in ways that enhance usefulness and attractiveness.This display and contribution is our primary aim.

Well-maintained. It is updated regularly to display different aspects ofcontent in an area. Featured portal may be designed to reduce the requiredfrequency of updating; however, they may be designed to have a higherturnover of content, using structures to ensure regular updates.

2.3.3 SCOPE STATEMENT

PROBLEM STATEMENT- According to education expert’s opinion, a student learns comparatively fastwhen challenges are posed in the learning environment. The portal is anattempt to provide a competitive platform and enlarge the periphery ofcontribution work in the domain of education and knowledge. The problem isnon existence of such a web portal which is free to use and encapsulates a largedomain of varied subjects.

DELIVERABLES-

i. Interface for contribution under different topics(for standards from 1st to 12th)provides interactive forms with tool tips for a user of any to contribute.

ii. Also, at the same time review portal to review his own contributions andcontribution of others at ease. It ensures that the database holds valuablecontent.

SCOPE- The portal is open to all and it holds the stereotype that two minds can be moreuseful if put together rather than working separately.

OBJECTIVE- The project aims at maximizing the contribution in the field of education bymaking more and more people contribute and evaluate. The aim is to make theportal so easy to use and explore so that it become popular among its users.

Page 46: EkShiksha Question Bank Report1

32

2.3.4 SOFTWARE SPECIFICATIONS

FRONTEND- JSP,HTML,CSS,JQUERY. BACKEND- JAVA JDBC,SERVLET,AJAX. DATABASE USED- MYSQL 5.5. IDE USED- NETBEANS 7.X. VERSION CONTROL SYSTEM- SVN.

2.3.5 USE CASE DIAGRAM OF CONTRIBUTION PORTAL

Figure 13: Use Case Diagram of contribution portal

Page 47: EkShiksha Question Bank Report1

33

2.3.6 FLOW CHART OF CONTRIBUTION PORTAL

Figure 14: Flow Chart of Contribution Portal

2.3.7 USER INTERFACE

HOME PAGE The Home page contains a menu bar that navigates through the website ,it comprise of:

FOR CONTRIBUTOR:Contribute, My contribution ,Contact us,FAQ.

Page 48: EkShiksha Question Bank Report1

34

Figure 15: Contribution Portal Header

FOR REVIEWER:Review, My Reviews,Contact us,FAQ.(this menu baris visible only after a user logs in as a reviewer)

The home page displays the contributions made by various users in an interactive way , which run on the screen in the form of a tickr and selecting a particular contributions leads to a dialogue box which shows the contribution and its author.

The home page also displays the various question types with a link leading to a demo showing how a particular contribution can be made by a user.

Figure 16: Screenshot of ekShiksha contribution portal Home page.

Page 49: EkShiksha Question Bank Report1

35

LOGIN PAGE

When a user wants to make a contribution to the portal, the user is always diverted to the login page, firstly the user logs in as a reviewer or a contributor and then performs the specific task as per his role.

Figure 17: Screenshot of ekShiksha contribution portal Login page.

Figure 18: Screenshot of ekShiksha contribution portal Login page when an un authenticated user

tries to log in.

Page 50: EkShiksha Question Bank Report1

36

CONTRIBUTE PAGE

The page contains a side menu that shows all the question types like definitions, true-false etc.

Figure 19: Screenshot of ekShiksha contribution portal Contribute page.

There are five question types for contributing questions to the EkShiksha

Question Bank which are :

1. MATCH THE COLOUMNS

2. DEFINITIONS

3. TRUE FALSE

4. MULTIPLE CHOICE

Page 51: EkShiksha Question Bank Report1

37

FORM INTERFACE:

o MATCH THE COLOUMNS

Figure 20: Screenshot of the match the coloumns form

Figure 21: screenshot of the match the columns form with javascript validations.

Page 52: EkShiksha Question Bank Report1

38

Figure 22: screenshot showing that the data has been entered successfully in the database by match

the columns form.

Figure 23: screenshot showing that the data which has been entered by the user, olready exists in

the database.

Page 53: EkShiksha Question Bank Report1

39

o DEFINITIONS

Figure 24: screenshot of the definition form.

Figure 25: Screenshot showing that the data has been entered successfully in the database.

Page 54: EkShiksha Question Bank Report1

40

Figure 26: screenshot showing that the data which has been entered by the user, already exists in

the database.

Figure 27: screenshot depicts that when a user selects a particular topic,he can also view the

related keywords of that topic which exists in the database by clicking the given”click here ”link.

Page 55: EkShiksha Question Bank Report1

41

Figure 28: screenshot shows the keywords which are seen after clicking the link.

o TRUE FALSE

Figure 29: screenshot of the true/false form.

Page 56: EkShiksha Question Bank Report1

42

Figure 30: screenshot showing that the data has been entered successfully to the database.

Figure 31: screenshot showing that the data already exists in the database.

Page 57: EkShiksha Question Bank Report1

43

o MULTIPLE CHOICE

Figure 32: screenshot of the multiple choice question form.

Figure 33: screenshot of the option page to give first option of multiple options .

Page 58: EkShiksha Question Bank Report1

44

Figure 34: screenshot of the option page to give second option ,after which the question can be

submitted.(minimum two options are compulsory)

Page 59: EkShiksha Question Bank Report1

45

Figure 35: screenshot of the review page which contains all the details of the question inserted by

the user.(the user can do editing of the details here)

MY CONTRIBUTIONS PAGE

The contributor views all the contributions made by him at a glance by surfing through the tabs of different question types.

Figure 36: : Screenshot of ekShiksha contribution portal my contribution page.

Page 60: EkShiksha Question Bank Report1

46

REVIEW PAGE

The page displays all the unreviewed questions of the question bank whose status changes in the database after the review has taken place.

Figure 37: Screenshot of ekShiksha contribution portal Review page.

Page 61: EkShiksha Question Bank Report1

47

MY REVIEWS PAGE

The page shows all the reviewed questions of a particular user with their status in the database.

Figure 38: Screenshot of ekShiksha contribution portal Review page.

FAQ PAGE

The page acts as an help desk for a user to answer some very frequent queries.

Figure 39: Screenshot of ekShiksha contribution portal FAQ page.

Page 62: EkShiksha Question Bank Report1

48

CONTACT US PAGE

The page is an interface for a user to send his queries or suggestions to the EkShiksha team.

2.4 Front End for Question Display

We made many interactive exercises to help our learners to build a better understanding of each and every topic. These exercises include match the column, multiple choice, fill the blanks and true false and crossword type questions. These exercises are designed in PIE framework as well as in HTML5 canvas framework.

2.4.1 Multiple Choice

Initial Screen: A loading screen appears on the frame the beginning while questions from the database populate the question array according to each topic, language or question and standard.

Page 63: EkShiksha Question Bank Report1

49

Figure 40: Initial Loading screen of all type of questions

Process: Questions get displayed one at a time with required number of options. Both question and option may include strings or images or both. There are three buttons: 1) DONE/NEXT: DONE button is used to accept a chosen option and check

whether the answer is correct. Automatically converts to NEXT after displayingthe answer.

2) SKIP: This button is needed when a user wants to skip a question3) RESET: This resets the question frame. The statistics of correct, incorrect and

skipped questions is set to zero, the number of attempts is set to 1 and a newquestion is displayed on the screen.

Page 64: EkShiksha Question Bank Report1

50

Figure 41: Display of Multiple Choice questions

Figure 42: Select the correct option(s) of the given question

Page 65: EkShiksha Question Bank Report1

51

Figure 43: On clicking the done button, correct option displayed in green and

wrong option display as red. Next question can be loaded using next button

There are four fields on the frame which gets updated each time a question is answered. They are: 1. Attempts: It calculates the number of questions attempted.2. Skip: It calculates the number of skipped questions3. Right: It calculates the number of correct answers.4. Wrong: It calculates the number of incorrect answers.

Test Cases:

a) Whenever a question demands an image which is unable to get loaded, itdisplays an “unable to load question/ option image” accordingly.

b) For question id’s that is missing its question string due to any fault, it displaysan error message "No questions to display".

Page 66: EkShiksha Question Bank Report1

52

2.4.2 Match the Columns

Initial Screen: A set of match the column questions appears on the screen, in two columns.

Figure 44: Initial Screen of Match Column Exercise

RESET button: It resets the set of questions that has been loaded from database for the current session.

NEXT button: It displays another set of questions to the user.

Process: There are two ways for the user to attempt the quiz.

1. The user can click and drag a term (text/image) of the first column and placeit on a term of the second column.

2. The user can select a term of first column by double-clicking on it and thenselect a term of second column by double-click. When term of first column is selected, it changes its appearance to indicate the selection.

Page 67: EkShiksha Question Bank Report1

53

Figure 45: Select a term from left column

To show whether the user has correctly matched the terms or not, the term of the first column changes appearance. In case of text, it turns either green, to indicate correct match or red, to indicate incorrect match. In case of image, it will be enclosed by either a green border, to indicate correct match or a red border, to indicate incorrect match.

Figure 46: Drag the selected term over the terms in right column, if correct then its

colour turns in green

Page 68: EkShiksha Question Bank Report1

54

Figure 47: Drag the selected term over the terms in right column, if wrong its colour

turns into red

Conditions and Constraints: Only terms of first column can be dragged. The user can select any term multiple times. The user must select a term of first column before selecting from second column. Once a term of first column has been selected, a term of second column must be selected.

Future Scope:

1. Terms of either columns may be dragged and dropped on the other.2. The user can change the selected term by clicking on another term of the

first column.

2.4.3 Fill the Blanks

Introduction: A front-end using html5's canvas and createjs library is created where questions, fetched from the database, are displayed and user can easily interact the components of the display to solve these exercises.

Page 69: EkShiksha Question Bank Report1

55

How it Works? When user is reading a chapter from the EkShiksha site, various links are available at the bottom of the screen from which he can select the exercise he wants to do. When he clicks on Fill Blanks, the fill blanks questions related to that chapter are fetched from the database and displayed using the software created. Questions are displayed according to topic id, question id, standard and language id.

Initial Screen: As the questions are being fetched from the database, a message is displayed on the screen that tells the user that questions are being loaded. Once, the questions are loaded they are displayed on the screen and user can solve them and for the next questions, he simply has to press the Next button.

Figure 48: Loading Screen of Fill Blanks

Page 70: EkShiksha Question Bank Report1

56

Figure 49: Fill Blanks Question Display

Process: Now when the question is displayed, user can simply pick up an option from the displayed options and drag it to the blank location. If the option dragged is right, the option label will turn green and text will be placed at the blank location but if the option is wrong, it turns red.

Figure 50: Drag the correct option to the blank

Page 71: EkShiksha Question Bank Report1

57

Figure 51:If the Fill Blank answer is correct it will display as green otherwise red

Buttons:

1. Next: When a user wants a next question from the set of fetched questions, he cansimply click on the next button and the next question will be displayed irrespective of the fact that whether user has attempted that question or not.

2. Reset: This option will reset the whole experiment and question bank. Newquestions will be fetched from the database and will be displayed.

Test Cases:

Case 1: No questions are fetched from the database in case a. question id is invalidb. topic id and standard do not matchc. topic id is invalidd. language id is invalid.

In all these cases, an error message is displayed to the user.

Case 2: In case multiple blanks are present, their respective options are displayed under the blank so that user knows that which option is for which blank.

Page 72: EkShiksha Question Bank Report1

58

2.4.4 True/False

Introduction: A front-end using html5's canvas and createjs library is created where questions, fetched from the database, are displayed and user can easily interact the components of the display to solve these exercises.

How it Works? When user is reading a chapter from the EkShiksha site, various links are available at the bottom of the screen from which he can select the exercise he wants to do. When he clicks on True False, the true false questions related to that chapter are fetched from the database and displayed using the software created. Questions are displayed according to topic id, question id, standard and language id.

Initial Screen: As the questions are being fetched from the database, a message is displayed on the screen that tells the user that questions are being loaded. Once, the questions are loaded, a set of questions are displayed on the screen and user is allowed to attempt them.

Figure 52: Initial Loading Screen of True/False Questions

Page 73: EkShiksha Question Bank Report1

59

Figure 53: True/False Question Display

Process: As the questions are displayed, user can simply attempt them by clicking on the check box next to True or False depending on the question. When he is done, he click on Done button to check the answers. There are 4 parameters that are updated after each attempt:

a. Attempt: total number of questions attempted by the user.b. Skip: total number of questions skipped by the userc. Right: total number of questions attempted correctly.d. Wrong: total number of questions attempted incorrectly.

Page 74: EkShiksha Question Bank Report1

60

Figure 54: True or False options can be selected

Figure 55: On clicking Next button correct statement will display as green and wrong

will display in red

Buttons:

1. Done/Next: When a user has attempted all the questions on the page, he can clickon Done button to check the results. After he checks the results, he can click on this button again to display the next problems.

2. Reset: This option will reset the whole experiment and question bank. Newquestions will be fetched from the database and will be displayed.

Page 75: EkShiksha Question Bank Report1

61

Test Cases:

Case 1: No questions are fetched from the database in case a. question id is invalidb. topic id and standard do not matchc. topic id is invalidd. language id is invalid.

In all these cases, an error message is displayed to the user.

Case 2: In case, the image for the question is not found, an error message is displayed.

2.4.5 Crossword

Initial Screen: A loading screen appears on the frame in the beginning while keywords from the database populate the question array according to each topic. If the question bank do not have enough keywords for crossword then the error message “Keywords are not available” is displayed. Otherwise a dynamically generated crossword is presented on the display screen.

Figure 56: Initial display screen of Crossword Puzzle

Page 76: EkShiksha Question Bank Report1

62

Process: A Crossword displayed on the screen with set of clues. The display screen will have a crossword grid, list of clues( ACROSS nad DOWN) and control buttons. There are four control buttons in the screen:

1. CHECK: This button will check if the crossword is correctly filled or not. If the words are correct then they will display as “green” else display in “red”.

2. SHOW ANSWER: This button will display solved crossword puzzle on the screen.

3. NEXT PUZZLE: This button will display new dynamically generated crossword with next set of keywords

4. RESET: This will reset the content of the display screen

Figure 57:Select the clue to answer the corresponding keyword. Hint will be

displayed at the bottom of screen

Clues are displayed on the left side of screen categorized as ACROSS and DOWN. All the clues are clickable buttons. To fill any keyword, one can click the clue from clue area and the corresponding word will be highlighted. And hint will be displayed at the bottom of screen to help our user to guess the word.

Page 77: EkShiksha Question Bank Report1

63

Figure 58: On clicking the CHECK button, correctly filled words displayed in

green and incorrectly filled or empty cells display as red. Next crossword can be

loaded using NEXT PUZZLE button

Figure 59: On clicking SHOW ANSWER button solved crossword will be

displayed

Test Cases:

c) If any error occurs during crossword loading, a message “Unable to load theCrossword” will be displayed.

d) If the question bank do not have enough keyword then a message “Keywordsare not available will be displayed”.

Page 78: EkShiksha Question Bank Report1

64

2.5 Math Activities

2.5.1 Introduction

The major challenge that the students face while understanding a concept is lack of interaction. If one can interact while learning a new concept, the concept will surely leave a mark on the student. Thus interactive activities can be used to make students understand the basic concepts related to a topic. The Akshara Foundation has provided details for various activities that can be implemented and can be provided at the EkShiksha portal for the students to learn. Under this we have developed a few activities that will be discussed in the section.

2.5.1 Number Beads Activity

This activity was made to teach the students the following activities: 1) Counting2) Displaying3) Adding4) Subtracting

Four Modes were implemented in this activity. These are as follows(along with the screen shots):

Demo Mode:

The Demo mode : where a problem is generated and solved (by the application). The learner can generate next problem and the application will solve.

1)Display: A number is displayed in a text box. The given number of beads move and are placed below the text box.

Page 79: EkShiksha Question Bank Report1

65

Figure 60: Demo of Number Beads Activity(Display)

2)Counting: Different beads are shown. The number of beads shown is displayed one by one by counting it.

Figure 61:Demo of Number Beads Activity(Counting)

Page 80: EkShiksha Question Bank Report1

66

Figure 62: Demo of Number Beads Activity(Counting) - 2

3)Addition: Number to be added are displayed. Beads move below the numbers .Addition shown by counting beads one by one.

Figure 63:Demo of Number Beads Activity(Addition)

Page 81: EkShiksha Question Bank Report1

67

Figure 64:Demo of Number Beads Activity(Addition ) – 2

Figure 65: Demo of Number Beads Activity(Addition) - 3

5)Subtraction: Total beads are shown. Number to be subtracted is shown. Beads move accordingly. Remaining beads are displayed.

Page 82: EkShiksha Question Bank Report1

68

Figure 66:Demo of Number Beads Activity(Subtraction)

Figure 67: Demo of Number Beads Activity(Subtraction) - 2

5)Counting in multiples: The beads are arranged in the multiples of number displayed.

Page 83: EkShiksha Question Bank Report1

69

Figure 68: Demo of Number Beads Activity(Counting in Multiples)

Interactive Mode

In this learner is prompted to supply number(input). The system will then solve the problem.

Figure 69: Number Beads Activity Display screen in Interactive mode

Page 84: EkShiksha Question Bank Report1

70

Figure 70: Number Beads Activity answer display in Interactive mode

Guided Mode

In this the application will provide a problem. The application will prompt the student for a step by step solution of the problem. When the number is displayed, ask learner to follow the instructions. Then learner should drag and drop the coins in proper place according to the number.

Figure 71: Number Beads Activity Guide Mode Screen

Page 85: EkShiksha Question Bank Report1

71

Figure 72: Number Beads Activity Guide Mode step by step solution

Test Mode

In this the application will generate a problem and prompt the learner for an answer. The learner submits by clicking on done button .The application indicates the result whether the action performed by the learner is correct or incorrect. If incorrect, learner must try to solve correctly.

Figure 73: Number Beads Activity Test mode display screen

Page 86: EkShiksha Question Bank Report1

72

Figure 74: Number Beads Activity Test Mode answer display

2.5.3 Abacus

This activity was made in 3 level having different number of places for each level. Level 1 has numbers up to 99, Level 2 has numbers up to 999 and Level 3 has numbers up to 99999. Four Modes were implemented in this activity. These are as follows (along with the screen shots):

Demo Mode

The demo mode has the following implemented modes: a) Show the Number. Then display the number in the form of units and tens. Then

show coins moving in the appropriate columns according to the number.b) Show the coins on the different columns at the board. Then Show the number

in the tens and units form. Then Display the number.c) Show one number. Then display it on the abacus. Show another number.

Display on top of the already displayed number/ remove from the alreadydisplayed number. Then display the result.

Page 87: EkShiksha Question Bank Report1

73

Figure 75: Abacus Display screen in demo mode

Figure 76: Abacus display screen while playing in demo mode

Page 88: EkShiksha Question Bank Report1

74

Figure 77: Abacus display screen(2)

Interactive Mode

In this learner is prompted to supply number (input). The system will then solve the problem in auto or step-by-step as chosen by learner. When learner gives the number, then display the number in the form of units and tens. Then show coins moving in the appropriate columns according to the number.

Figure 78: Abacus display screen in interactive mode

Page 89: EkShiksha Question Bank Report1

75

Figure 79: Screenshot of Abacus while playing

Figure 80: Abacus display screen in interactive mode (2)

Guided Mode

In this the application will provide a problem. The application will prompt the student for a step by step solution of the problem. When the number is displayed, ask learner to enter the number in the form of tens and ones. Then learner should drag and drop the coins in proper place according to the number.

Page 90: EkShiksha Question Bank Report1

76

Figure 81: Abacus Display screen in guided mode

Figure 82: Screenshot of abacus while playing in guided mode

Page 91: EkShiksha Question Bank Report1

77

Figure 83: Screenshot of abacus in guided mode

Figure 84:Screenshot of abacus in guided mode(2)

Test Mode

In this the application will generate a problem and prompt the learner for an answer. If the answer is incorrect, the application will solve the problem (in auto mode). a) Display the number and arrange the coins accordingly on the board b) Display the coins on the board and ask the number. c) Display addition/subtraction and ask user to write the answer

Page 92: EkShiksha Question Bank Report1

78

Figure 85:Screenshot of abacus in test mode

Figure 86: Screenshot of abacus while playing in test mode

Page 93: EkShiksha Question Bank Report1

79

2.6 Like and Comment Plugin

2.6.1 Like Plugin

OBJECTIVE: To implement the like button for the EkShiksha website. Like button will be created by using the html language. The action events will be implemented by using the javascript , ajax and java servlet.

FUNCTIONALITY: This is just a simple button with a label to show the number of likes. Whenever the user clicks the like button then the like count will be incremented in the database by using the ajax response. After clicking the like button will turn into unlike(by using javascript) and cookie will be set with infinite expired time so that the user could not allowed to like more than once if he enables the cookies. It will take the url of the parent page which includes the iframe and save the likes according to that. So the one who want to use this plugin can give the iframe src to the likes html. On the interface we will be showing the number of likes of the webpage .

2.6.2 Steps To Include Like Button In Webpage

1) Install mysql and server in your machine, And identify the port of yourmysql and give that port number in the url of the ConnectionFactory.java

file.. For the connection you should need to have com.mysql.jdbc.jar ,servlet-api.jar and jdk version(1.7) recommended.. Set the classpath inyour environment variables for above 3 jar files if you are not using an IDElike netbeans.

2) Create the two tables as given below in your database.. Give that databasename in the url of the ConnectionFactory.java file for getting theconnection with database.

I) url_likes( url_id integer primary key, url varchar , n_likes int)

II) user_likes(url_id integer foreign key referencing url_likes(url_id),

ltime varchar,ip varchar)

3) Take the project and put that in a prescribed folder of your server for getting

Page 94: EkShiksha Question Bank Report1

80

access.

4) For including the like functionality in your web page use <iframe> tag withsrc=”index.html”

5) Give the width and height for the iframe in your webpage. Width more than150px is recommended for best viewing.

6) While accessing make sure that the server is running and getting theconnection with the database.

2.6.3 Comment Plugin

OBJECTIVE: Implementing the comment functionality, which can be used in the iframes of the website.Comment box can be created by using the html and the request response will be implemented by using the Ajax.

FUNCTIONALITY: This functionality is like a facebook comment functionality. Whenever user posts the comment in the webpage, then the database will be updated by using the ajax response with the java servlet class. The posting will be done by clicking the enter in the textarea. If the user want the new line he can use shift+enter. It stores the comments based on webpage url. It takes the url of the parent page which includes the comment iframe and stroes the comments according that url in the database. On loading the iframe we will show the top 4 comments o f that webpage by getting the response from the servlet using ajax. If the number of comments are more than 4 then we will show view more comments to the user. So that the user can see all the comments by clicking on the view more comments.. If the page doesn't contain any comments then we will show no comments. We will display the username of the user who commented if he he logged in otherwise we will show guest. We will show all the comments with the time and date below the comment

2.6.4 Steps To Include Comment iframe In Webpage

1) Install mysql and server in your machine, And identify the port of your mysqland give that port number in the url of the ConnectionFactory.java file.. Forthe connection you should need to have com.mysql.jdbc.jar , servlet-api.jar

and jdk version(1.7) recommended.. Set the classpath in your environmentvariables for above 3 jar files if you are not using an IDE like netbeans.

Page 95: EkShiksha Question Bank Report1

81

2) Create the two tables as given below in your database.. Give that databasename in the url of the ConnectionFactory.java file for getting the connectionwith database.

i) comment_url(url_id integer primary key , url varchar)

ii)comment_inf(c_id integer primary key,comment varchar ,url_id

integer,

user_id integer ,time varchar, ip varchcar

3) Take the project and put that in a prescribed folder of your server for gettingaccess.

4) For including the like functionality in your web page use <iframe> tag withsrc=”index.html”.

5) Give the width and height for the iframe in your webpage. Width more than300px and height more than 400px is recommended for best viewing.

6) While accessing make sure that the server is running and getting the connectionwith the database.

2.7 Search Functionality The EkShiksha website has been functional for almost 3 years now. One of the most important aspects of any website is to allow users to search easily and quickly for the content they require. This is where the search functionality comes into the picture. Although with Google's custom search engine it is possible to search within a site, a search functionality developed in house allows the developers complete control over the contents and how changes are to be reflected.

2.7.1 Introduction

SCOPE:

Searching is an integral part of any website. A user wishing to look for specific content should have the option of typing in his query and letting

Page 96: EkShiksha Question Bank Report1

82

the site do the searching for him. The search engine allows categorical searching – user can look for particular content like video or documents on the site. Currently the search functionality is designed to accept queries in a wide range of languages, but the spelling correction feature for searching has been implemented only for English. The scope of the search functionality developed is not limited to the content currently hosted on the site. As additions are made, the code can be expanded to include the new content in the search.

DESCRIPTION OF WORK:

To create a search functionality that accepts a search query from user, analyzes and processes it to return relevant results desired by user.

SOFTWARE AND RESOURCES:

Software used: Netbeans IDE, Gliffy (Online diagram and Flowchart Software) Tools used: Apache Tomcat Server Libraries: My SQL JDBC Driver Languages used: Java, JSP, HTML, Cascading Style Sheets, SQL Operating System used: Linux(Ubuntu)

APPLICATION REQUIREMENTS:

The table below summarizes the basic system requirements for the search functionality to run on a browser:

Table 3: Application Requirement for EkShiksha Search

Requirement Version

Operating System Linux,Windows Software and Packages JRE 1.5 and above

Browsers Mozilla Firefox, Google chrome, IE6 & Above

2.7.2 Overview of Search Functionality

The search functionality for the ekShiksha website is based on database searching. All the content on the website is stored in a database. The tables from the database which have been used for the searching are: 1.contents : contains topic name, topic id and language id

Page 97: EkShiksha Question Bank Report1

83

2.document_content_ref : contains the mapping of content_ids to document_ids3.documents : contains the document_id, topic_id, content_id, standard and otherfields. 4.ilobjects : contains the applet_id,applet_name, applet_description ,topic_id, objectlevel and other fields. 5.published_content : contains all text published on the website(utext) and theircorresponding content_ids. 6.topics : contains document_id and parent topic_id.

The search functionality creates another table in the database called a dictionary which stores all words that are valid English search words in the site. At any time more words can be added to the dictionary, allowing searching of various other contents. The spell check performed is done through the dictionary but making the closest match. If the search query typed by the user contains a topic name directly, the topics table and ilobjects table are searched and corresponding document ids and applets ids are used to create the URL(s) for the web pages. If the search query typed by the user is not a topic name directly then the search query is compared to the text contained in the published_content table and corresponding content_id is obtained.

The user types the search query into the search box. The following events may occur:

1.If the search query is in English1.1. If the search query is blank, the search engine asks the user to “Enter a

valid search query”.

Figure 87: Screenshot of search functionality in ekShiksha website

Page 98: EkShiksha Question Bank Report1

84

Figure 88: On giving blank search query, "Please enter a valid search query" message will display

1.2. If the user types a misspelled query the the software first performs spelling correction. Eg: The user types “electrisiti”. The search engine performs spelling correction and returns results for “electricity”.

Page 99: EkShiksha Question Bank Report1

85

Figure 89: Searching for the query "electrisiti"

Figure 90: Showing search results for "electricity" instead

Page 100: EkShiksha Question Bank Report1

86

1.3. With a correctly spelled query, the search engine performs searching. On the basis of the query entered by the user one of the following occurs:

1.3.1.) If the user wishes to search for video or interactive learning lessons(various keywords associated with video content) then the call to the SearchInteractive is made which returns the URL and title of applets.

Figure 91: Searching for query "watch Electric bulb"

Figure 92: Search results for "electric bulb" instead where links are videos

Page 101: EkShiksha Question Bank Report1

87

▪ If the user wishes to search for video content of a particularstandard then results are displayed only for applets belongingto a that particular object level

Figure 93: Searching for query "watch Chemistry class 9"

Figure 94: Showing Search results for "chemistry" having videos of class 9 chemistry

Page 102: EkShiksha Question Bank Report1

88

• If the search query typed by the user yields no direct match,then the Porter Stemming algorithm followed by spellingcorrection is applied to map the words to their root word andsearching is then performed for the root word.

Figure 95: Searching for "humanoid interactive learning"

Figure 96: Showing search results for "human"

Page 103: EkShiksha Question Bank Report1

89

• If after Porter Stemming no match is found then no resultsfound.

Figure 97: Searching for query "I am here to search content"

Figure 98: Showing results for query "I am here to search content"

Page 104: EkShiksha Question Bank Report1

90

1.3.2.) If the user wishes to search for textual learning lessons(various keywords associated with textual content have been defined) then the call to the SearchContent is made which returns the URL, title and description of documents.

Figure 99: Searching for "content of nutrition in plant"

Figure 100: showing search results for "nutrition in plants"

Page 105: EkShiksha Question Bank Report1

91

• If the user wishes to search for textual content of a particularstandard then results are displayed only for documentsbelonging to that particular standard.

Figure 101: searching for the "contents of light class 10"

Figure 102: Showing search results for "light"

Page 106: EkShiksha Question Bank Report1

92

If the search query typed by the user yields no direct match, then the Porter Stemming algorithm followed by spelling correction is applied to map the words to their root word and searching is then performed for the root word.

Figure 103: Searching for "humanoid content"

Figure 104: Showing search results for "humans"

Page 107: EkShiksha Question Bank Report1

93

• If after Porter Stemming no match is found then no resultsfound.

Figure 105: Searching for "I am here to search content"

Figure 106: Showing results for "I am here to search content"

Page 108: EkShiksha Question Bank Report1

94

1.3.3) If the user wishes to search for video as well as textual learning lessons(various keywords associated with video content) then the call to the SearchOverall is made which returns returns the URL, title and description of documents, and the URL and title of applets.

Figure 107: Searching for "crop production and management"

Figure 108: Showing results for "crop production and management"

Page 109: EkShiksha Question Bank Report1

95

• If the user wishes to search for video and textual content of aparticular standard then results are displayed only fordocuments and applets belonging to that particular objectlevel/standard.

Figure 109: Searching for Chemistry class 10

Figure 110: Showing results for "chemistry"

Page 110: EkShiksha Question Bank Report1

96

2.If the search query is in any other language supported by ekShiksha. For example,A hindi query is taken here.

Figure 111: Searching in other languages

Figure 112: Showing results for search in other languages

Page 111: EkShiksha Question Bank Report1

97

2.7.3 Flow Chart

Page 112: EkShiksha Question Bank Report1

98

2.8 Implementation of PIE Framework in HTML5

2.8.1 Introduction

The PIE (Physics Interactive Experiment) framework aims at providing high quality interactive content for school education. It is a wrap around over Action Script 3, developed to facilitate easy and efficient learning for the children of different age groups. The purpose of this document is to outline the technical design of the PIE(Physics Interactive experiment) framework developed in HTML5 canvas, Easeljs, Zebkit. Its main purpose is to make the PIE framework compatible on new versions of browser . The Easeljs technology is used to design graphics while the Zebkit technology is used to design the UI (user interface) components, using which the all PIE framework activities can be converted into HTML5 activities.

Objective:

The idea in this project is to develop a HTML5 framework using the zebkit and easeljs technology that will demonstrate several PIE experiments and activities, allow students to perform them, and support evaluation. The motto is to work hand in hand with the latest advancements in technology and upgrade the already existing experiments, to be compatible with the present era as there is no use of thousands of PIE activities that cannot run in modern browsers.

Scope:

The aim is to illustrate the concepts and usage of PIE framework on newer versions of browser which do not support Actionscript. The use of Easeljs and zebkit integrated together over HTML5 canvas facilitates this transformation of “.as files” to “.js files” thereby, making the PIE framework compatible on both, the older and latest versions of browser. Thus, this facilitates the continuation of easy and efficient learning by the students, through Ekshiksha.

Technologies Used:

Zebra-the Zebkit library, is a WEB based alternative to Flash or Applet technologies that doesnot require a plugging on a client side to be installed. It helps in building the UI components in HTML5 canvas. Createjs- is used to design the graphical components and further enhancing their functionality using several animation strategies. Finally, the integration of both- Easeljs and Zebkit, over HTML5 canvas, facilitates the creation of PIE HTML5 framework.

Page 113: EkShiksha Question Bank Report1

99

2.8.2 Design Overview

We will be using the already available “.as files” and converting them to “.js files” so that the older activities are compatible with the new technologies. The different UI components and the graphic components are organised as classes.These classes inherits the parent classes of the graphic components and the UI components in EaselJS and Zebkit. The several UI components drawn in Zebkit, inherit the respective UI component

class. The base class of the graphic components is PIEsprite which extends the Sprite class of EaselJs. The several graphic components drawn in Easeljs, inherit the PIEsprite class.. Each class has it’s own set of parameters,methods and constructor. Also, the graphic components are enhanced by applying animations using Ticker class in EaselJS.

Fig: Class Hierarchy

Figure 113: Class Heirarchy of PIE to HTML conversion

Page 114: EkShiksha Question Bank Report1

100

2.8.3 Class and Method Details

Graphic Components:

1) Class: PIErectangle

Constructor: PIErectangle(parentPie, topLeftX, topLeftY, rectangleW, rectangleH, fillColor) Example:

var rectangle = new PIErectangle(pieHandle, 0, 0, 100, 100, “Black”); pieHandle.addDisplayChild(rectangle.shape);

2) Class: PIEarrow

Constructor: PIEarrow(parentPie,startX,startY,endX,endY,fillColor) Example:

var arrow = new PIEarrow(pieHandle, 0, 0, 100, 100, “Black”); pieHandle.addDisplayChild(arrow.shape);

Page 115: EkShiksha Question Bank Report1

101

3) Class: PIElabel

Constructor: PIElabel(parentPie,tLabel,sLabel,lBColor,lFColor) Example:

var label = new PIElabel(pieHandle, “MyLabel”, 20, “Black”, “White”); pieHandle.addDisplayChild(label.shape);

4) Class: PIEcircle

Constructor: PIEcircle(parentPie, centerX, centerY, radius, fillColor) Example:

var circle = new PIEcircle(pieHandle, 150, 150, 50,“Black”); pieHandle.addDisplayChild(circle.shape);

5) Class: PIEline

Constructor: PIEline(parentPie, startX, startY, endX, endY, fillColor, lineT, lineO) Example:

var line = new PIErectangle(pieHandle, 0, 0, 100, 100, “Black”,5,1); pieHandle.addDisplayChild(line.shape);

Page 116: EkShiksha Question Bank Report1

102

6) Class: PIEquadrilateral Constructor: PIEquadilateral(parentPie, vertex1, vertex2, vertex3, vertex4, fillColor) Example: var quadilateral = new PIEquadilateral(pieHandle, 0, 0, 100, 100, “Black”); pieHandle.addDisplayChild(quadilateral.shape);

7) Class: PIEpolygon Constructor: PIEpolygon(parentPie, vertices, fillColor)

Page 117: EkShiksha Question Bank Report1

103

8) Class: PIEroundedRectangle

Constructor: PIEroundedRectangle(parentPie, topLeftX, topLeftY, rectangleW, rectangleH, fillColor) Example:

var roundedRectangle = new PIEroundedRectangle(pieHandle, 0, 0, 100, 100, “Black”);

pieHandle.addDisplayChild(roundedRectangle.shape);

9) Class: PIEregularPolygon

Constructor: PIEregularPolygon(parentPie, firstPoint, secondPoint, vertices, fillColor)

Page 118: EkShiksha Question Bank Report1

104

10) Class: PIEarc

Constructor: PIEarc(parentPie, centerX, centerY, startX, startY, angleDifference, fillColor) Example:

var arc = new PIEarc(pieHandle, 0, 0, 100, 100,5, “Black”); pieHandle.addDisplayChild(arc.shape);

11) Class: PIEthickArrow

Constructor: PIEthickArrow(parentPie,startX,startY,endX,endY,fillColor,arrowO) Example:

var tarrow = new PIEthickArrow(pieHandle, 0, 0, 100, 100, “Black”,1); pieHandle.addDisplayChild(tarrow.shape);

Page 119: EkShiksha Question Bank Report1

105

12) Class: PIEtriangle

Constructor: PIEtriangle(parentPie, v1, v2, v3, fillColor)

Page 120: EkShiksha Question Bank Report1

106

13) PIEbutton

Constructor: PIEbutton(parentPie, bLabel) Example:

var button = new PIEbutton(pieHandle, “Next”); pieHandle.addDisplayChild(button.container);

14) PIEcheckBox

Constructor: PIEcheckBox(parentPie, cLabel) Example:

var checkbox = new PIEcheckBox(pieHandle, "Earth"); checkBox.addUIpanelChild(checkBox.container);

Page 121: EkShiksha Question Bank Report1

107

15) PIE

Page 122: EkShiksha Question Bank Report1

108

16) PIEsprite

2.8.4 Zebra

Introduction:

Zebra is a JavaScript library that comes with a bunch of rich user interface components for creating desktop-like layouts.

The UI elements are built with HTML5 canvas, colored with CSS and expected to be rendered the same on all modern browsers.There are various UI components including grid, tabs, menu, form elements, menu and much more.

Zebra provides easy for use and clear for understanding JavaScript OOP concept like inheritance. Zebra makes it possible to develop WEB based Rich UI applications. The approach sits on top of HTML5 Canvas element which

Page 123: EkShiksha Question Bank Report1

109

makes it possible to render any imaginable UI. Zebra is pure WEB based alternative to Flash or Applet technologies that doesnot

require a plugging on a client side to be installed. In the same time Zebra utilizes power, simplicity and beauty of JavaScript coding.

Zebra UI:

The UI is powerful way to create any imaginable user interface for WEB. The idea is based on developing hierarchy of UI components that sits and renders

on HTML5 Canvas element. Write zebra UI code in safe place where you can be sure all necessary structure,

configurations, etc are ready. The safe place is "zebra.ready(...)" method. Development of zebra UI application begins from creation "zebra.ui.zCanvas" class, that is starting point and root element of your UI components hierarchy. "zCanvas" is actually wrapper around HTML5 Canvas element where zebra UI sits on.

Component specific events:

Component specific event is an event that is triggered by the component itself. For instance: an item selection, data updating, tree item removed etc. The standard way of catching this type of events is calling “bind” method one of the following manner: Anonymous event handler : If component generates only one type of event no event name has to be specified: // create UI button var button = new zebra.ui.Button("Test"); // handle an button pressed event button.bind(function(src) {... });

2.8.5 EaselJS

The EaselJS Javascript library provides a retained graphics mode for canvasincluding a full hierarchical display list, a core interaction model, and helperclasses to make working with 2D graphics in Canvas much easier.

EaselJS provides straight forward solutions for working with rich graphics andinteractivity with HTML5 Canvas.

Following are the five reasons to choose EaselJS and HTML5 canvas to build your applications: Cross-platform — Using this technology will help you create HTML5 canvas applications that will be supported from: Desktop browsers such as Chrome, Safari, Firefox, Opera, and IE9+

Page 124: EkShiksha Question Bank Report1

110

iPhone, iPad, and iPod 4+ (iOS 3.2+) Android smartphones and tablets (OS 2.1+) BlackBerry browser (7.0 and 10.0+) Every HTML5 browser

Easy Integration — EaselJS applications run on browsers and finally can be seen by almost every desktop and mobile user without any plugin installed. One source code — A single codebase can be used to create a responsive application that works on almost all devices and resolutions No creativity limits — When you display a graphic element using EaselJS, you can be sure it will be placed at the same position in every browser, desktop and mobile (except for texts because every browser uses a different font renderer, and there may be some minor differences between them and of course Internet Explorer 8 and lower versions that do not support HTML5 syntax).

Freedom — Developers can now create and publish games and applications skipping the App Store submission process.

Classes used:

DisplayObject Abstract base class for all display elements in EaselJS. Exposes all of the display properties (ex. x, y, rotation, scaleX, scaleY, skewX, skewY, alpha, shadow, etc) that are common to all display objects. Stage The root level display container for display elements. Each time tick() is called on Stage, it will update and render the display list to its associated canvas. Container A nestable display container, which lets you aggregate display objects and manipulate them as a group. Sprite Displays single frames or animations from sprite sheets, and provides APIs for managing playback and sequencing. Shape Renders a Graphics object within the context of the display list. Graphics Provides an easy to use API for drawing vector data. Can be used with Shape, or completely stand alone. Ticker Provides a pausable centralized tick manager for ticking Stage instances or other time based code. Rectangle Represents a rectangle as defined by the points (x, y) and (x+width, y+height). Point Represents a point on a 2 dimensional x / y coordinate system.

Through this, we can easily manage many types of graphic elements (vector shapes, bitmap, spritesheets, texts, and HTML elements) and it also supports touch events, animations, and many other interesting features in order to quickly develop cross-platform HTML5 games and applications, providing a look and feel as well as a behavior very similar to native applications for iOS and Android.

Page 125: EkShiksha Question Bank Report1

111

Chapter 3

Challenges Faced

1. Languages: Since the website works on various languages it poses a greatproblem while extracting the questions. Since the website is dependent ontranslators to translate the content all the strings are not present in a specificlanguage. Thus if question is to be extracted and any content is not available inthe specified language it must be given in English. This was achieved byextracting single contents at a time in descending order of language id.

2. Validity: Since the users are unaware of the internal structure of the databasethey may provide any invalid values that must not be present in thequestionbank. Hence various validity checks were applied in order to checkany possible errors while insertion.

3. Images: Since the images were to be included in questionbank some of thestrict checks were bypassed if the image is present in the question or options.

4. To incorporate all the possibilities of question representation through theregular expressions build for the extraction purpose.

5. Building the validation check while parsing the file for extracting questions.

6. To include the images in all suitable types of questions in proper positions bymaintaining their aspect ratio.

7. Whenever new pages are inserted the corresponding data has to be fed in thedatabase for searching the contents of the inserted pages.

8. Failure in connection to the database results in failure of the Search Functionality

Page 126: EkShiksha Question Bank Report1

112

Chapter 4

Conclusion and Future Scope

Thus in “EkShiksha Question Bank” project we tried to build an interactive and multilingual environment which can be easily accessible to all target users. Still there are many future modification is possible to make it more feasible and effective.

• Pagination can be applied for limiting the number of results per page

• A loading symbol can be used for a temporary display until the results can beretrieved for display.

• The Search Functionality can be made efficient to correct wrongly spelled queries in all languages supported by EkShiksha site.

• Categorical search can be improvised with addition of more keywords or provision of options to the user for ease of use.

• The present database only stores images and does not check for any repetitionsof image. Thus anyone can insert same image question again and again. Thiscan be checked in future versions of API.

• Integration of the zebkit and the easeljs components so that other UIcomponents like the slider and observation table could be added on.

• The portal needs an MIS system which should be implemented to have anstatistics about the questions which exist in the database.so, that there is adeeper idea of complexity based on no. of correct and incorrect attempts.

• The question types can be increased to have a vast exposure.

• More effective reviewer policy in the contribution portal.

Page 127: EkShiksha Question Bank Report1

113

Chapter 5

References

1. www.createjs.com/Docs/EaselJS2. www.createjs.com/EaselJS/demos3. www.createjs.com/Docs/PreloadJS4. www.createjs.com/PreloadJS5. www.ekalavya.it.iitb.ac.in/summerinternship2013/groups.jsp6. www.docs.oracle.com/javase/7/docs/api7. www.stackoverflow.com8. www.w3schools.com9. www.tutorialspoint.com10. www.zebkit.com

Page 128: EkShiksha Question Bank Report1

114

Chapter 6

Appendix A

A.1 Destructive testing report for read & extract

A.1.1 Test Report for True False Problems

TEST CASE NO:

INPUT SPECIFICATION OUTPUT SPECIFICATION

1. Filepath:/users/extusr/debalaya14/test/TrueFalseProblems.as

The file has all distinct questions withdistinct options.

Questions & Options extracted successfully and inserted into database.

2. Filepath:/users/extusr/debalaya14/test/TrueFalseProblems.txt

The File Specified in the filepath hasinvalid type

ErrorId:2 ErrorDesc:Illegal file type

3. Filepath:/users/extusr/debalaya14/test/TrueFalseProblems.as

The file doesn't exists

ErrorId:1 ErrorDesc:File Not Found

4. Filepath:/users/extusr/debalaya14/test/TrueFalseProblems.as

The file is an empty file

ErrorId:11 ErrorDesc:File is empty

5. Filepath:/users/extusr/debalaya14/test/TrueFalseProblems.as

Filepath is empty

ErrorId:2 ErrorDesc:Illegal file type

6. Filepath:/users/extusr/debalaya14/test/ ErrorId : 8

Page 129: EkShiksha Question Bank Report1

115

TrueFalseProblems.as

File has no questions present

ErrorDesc : No Questions Present in File

7. Filepath:/users/extusr/debalaya14/test/ TrueFalseProblems.as

File has some questions which has no options

ErrorId : 7 ErrorDesc : No option found for question and question rejected

8. Filepath:/users/extusr/debalaya14/test/ TrueFalseProblems.as

File has some questions repeated more than once

ErrorId : 4 ErrorDesc : Question is already present. No repetition of question allowed

9. Filepath:/users/extusr/debalaya14/test/ TrueFalseProblems.as

File with new questions added along with options

Questions & Options extracted successfully and inserted into database after insertion of new questions and options

10. Filepath:/users/extusr/debalaya14/test/ TrueFalseProblems.as

File with few questions being deleted along with options

Questions & Options extracted successfully and inserted into database after deletion of few questions and options

11. Filepath:/users/extusr/debalaya14/test/ TrueFalseProblems.as

File with options but no questions

ErrorId : 6 ErrorDesc : NO QUESTION FOUND FOR THE GIVEN OPTION and option too is rejected

12. Filepath:/users/extusr/debalaya14/test/ TrueFalseProblems.as

File without options

ErrorId : 7 ErrorDesc : No option found for question and question rejected ErrorId : 8 ErrorDesc : No Questions Present in File

Table 4: Test Cases for True False Problems

A.1.2 Test Report For Fill Blank Problems

TEST CASE

INPUT SPECIFICATION OUTPUT SPECIFICATION

Page 130: EkShiksha Question Bank Report1

116

NO:

1. Filepath:/users/extusr/debalaya14/test/ FillBlankProblems.as

The file has all distinct questions with distinct options.

Questions & Options extracted successfully and inserted into

database.

2. Filepath:/users/extusr/debalaya14/test/ FillBlankProblems.txt

The File Specified in the filepath has invalid type

ErrorId:2 ErrorDesc:Illegal file type

3. Filepath:/users/extusr/debalaya14/test/ FillBlankProblems.as

The file doesn't exists

ErrorId:1 ErrorDesc:File Not Found

4. Filepath:/users/extusr/debalaya14/test/ FillBlankProblems.as

The file is an empty file

ErrorId:11 ErrorDesc:File is empty

5. Filepath:/users/extusr/debalaya14/test/ TrueFalseProblems.as

Filepath is empty

ErrorId:2 ErrorDesc:Illegal file type

6. Filepath:/users/extusr/debalaya14/test/ FillBlankProblems.as

File has no questions present

ErrorId : 8 ErrorDesc : No Questions Present in

File

7. Filepath:/users/extusr/debalaya14/test/ FillBlankProblems.as

File has some questions which has no options

ErrorId : 7 ErrorDesc : No option found for question and question rejected

Page 131: EkShiksha Question Bank Report1

117

8. Filepath:/users/extusr/debalaya14/test/ FillBlankProblems.as

File has some questions repeated more than once

ErrorId : 4 ErrorDesc : Question is already

present. No repetition of question allowed

9. Filepath:/users/extusr/debalaya14/test/ FillBlankProblems.as

File with new questions added along with options

Questions & Options extracted successfully and inserted into database after insertion of new

questions and options

10. Filepath:/users/extusr/debalaya14/test/ FillBlankProblems.as

File with few questions being deleted along with options

Questions & Options extracted successfully and inserted into database after deletion of few

questions and options

11. Filepath:/users/extusr/debalaya14/test/ FillBlankProblems.as

File with options but no questions

ErrorId : 6 ErrorDesc : NO QUESTION FOUND

FOR THE GIVEN OPTION and option too is rejected

12. Filepath:/users/extusr/debalaya14/test/ FillBlankProblems.as

File with duplicate options

ErrorId : 5 ErrorDesc : Duplicate option for

question

Table 5:Test Cases for Fill Blanks problems

A.1.3 Test Report For Match Column Problems

TEST CASE NO:

INPUT SPECIFICATION OUTPUT SPECIFICATION

1. Filepath:/users/extusr/jyotsna14/ MatchColumnProblems.as

The file has all distinct questions with

Questions & Options extracted successfully and inserted into database.

Page 132: EkShiksha Question Bank Report1

118

distinct options. 2. Filepath:/users/extusr/jyotsna14/

MatchColumnProblems.txt ErrorId:2 ErrorDesc:Invalid file type ErrorId:1 ErrorDesc:File doesn't exist

3. Filepath:/users/extusr/jyotsna14/test/ MatchColumnProblems.as

ErrorId:1 ErrorDesc:File doesn't exist

4. Filepath:/users/extusr/jyotsna14/ MatchColumnProblems.as

The file is an empty file

ErrorId:11 ErrorDesc:File is empty

5. Filepath is empty ErrorId:2 ErrorDesc:Invalid File Format Errorid:1 ErrorDesc:File doesn't exist

6. Filepath:/users/extusr/jyotsna14/ MatchColumnProblems.as

File has no questions present

Errorid : 8 Errordesc : No properties are found in the file Errorid : 9 Errordesc : No terms are found in the file Errorid : 10 Errordesc : No matches are found in the file

7. Filepath:/users/extusr/jyotsna14/ MatchColumnProblems.as

File has some questions which has no options

ErrorId : 14 ErrorDesc : INVALID MATCH : NO PROPERTY MATCHES WITH THE TERM 1 : She eats: REJECTED ErrorId : 15 ErrorDesc : NO MATCH IS FOUND FOR TERM 9 : You have already drunk water : TERM REJECTED ErrorId : 14 ErrorDesc : INVALID MATCH : NO PROPERTY MATCHES WITH THE TERM 10 : He drinks water: REJECTED ErrorId : 14 ErrorDesc : INVALID MATCH : NO PROPERTY MATCHES WITH THE TERM 19 : He reads a newspaper: REJECTED

Page 133: EkShiksha Question Bank Report1

119

ErrorId : 14 ErrorDesc : INVALID MATCH : NO PROPERTY MATCHES WITH THE TERM 28 : She writes a poem: REJECTED ErrorId : 14 ErrorDesc : INVALID MATCH : NO PROPERTY MATCHES WITH THE TERM 37 : You sleep for 6 hours: REJECTED ErrorId : 14 ErrorDesc : INVALID MATCH : NO PROPERTY MATCHES WITH THE TERM 46 : I walk for two hours: REJECTED ErrorId : 14 ErrorDesc : INVALID MATCH : NO PROPERTY MATCHES WITH THE TERM 55 : I run for two hours: REJECTED ErrorId : 14 ErrorDesc : INVALID MATCH : NO PROPERTY MATCHES WITH THE TERM 64 : I skip for 15 minutes: REJECTED ErrorId : 14 ErrorDesc : INVALID MATCH : NO PROPERTY MATCHES WITH THE TERM 73 : I dance for one hour: REJECTED ErrorId : 14 ErrorDesc : INVALID MATCH : NO PROPERTY MATCHES WITH THE TERM 82 : We play for one hour: REJECTED

9. Filepath:/users/extusr/jyotsna14/ MatchColumnProblems.as

File has some questions repeated more than once

ErrorId : 5 ErrorDesc : TERM '”You would have already eaten” IS ALREADY PRESENT :---REJECTED

10. Filepath:/users/extusr/jyotsna14/ MatchColumnProblems.as

File with few questions having no correct options

ErrorId:15 ErrorDesc:No match is found

Page 134: EkShiksha Question Bank Report1

120

11. Filepath:/users/extusr/jyotsna14/ MatchColumnProblems.as

File with new questions added along with options

ErrorId:16 ErrorDesc:DUP_QUES(for the questions already inserted) New question successfully extracted and inserted into database.

Table 6: Test Cases for Match Column problems

A.1.4 Test Report For Multiple Choice Problems

TEST CASE NO:

INPUT SPECIFICATION OUTPUT SPECIFICATION

1. Filepath:/users/extusr/jyotsna14/

MultipleChoiceProblems.as The file has all distinct questions with distinct options.

Questions & Options extracted successfully and inserted into database.

2. Filepath:/users/extusr/jyotsna14/

MultipleChoiceProblems.txt

ErrorId:2 ErrorDesc:Invalid file type

3. Filepath:/users/extusr/jyotsna14/test/

MultipleChoiceProblems.as

ErrorId:1 ErrorDesc:File doesn't exist

4. Filepath:/users/extusr/jyotsna14/

MultipleChoiceProblems.as The file is an empty file

ErrorId:11 ErrorDesc:File is empty

5. Filepath is empty ErrorId:2 ErrorDesc:Invalid File Format

Table 7: Test Case for Multiple Choice problems

Page 135: EkShiksha Question Bank Report1

121

A.2 Test Report For Database API

A.2.1 Test Report For Class QuestionBankProcess

1. Function name : insertFileFillBlank

Test Case No: Input Specification Output Specification

1 authorName not present in database

Error Code INV_AUTHOR

2 authorName present in database

SUCCESS

Table 8: Test Cases for insertFileBlank

2. Function name : insertFileMCQ

Test Case No: Input Specification Output Specification

1 authorName not present in database

Error Code INV_AUTHOR

2 authorName present in database

SUCCESS

Table 9: Test Cases for insertFileMCQ

3. Function name : insertFileMatchColumn

Test Case No: Input Specification Output Specification

1 authorName not present in database

Error Code INV_AUTHOR

2 authorName present in database

SUCCESS

Table 10: Test Cases for insertFileMatchColumn

Page 136: EkShiksha Question Bank Report1

122

4. Function name : insertFileTrueFalse

Test Case No: Input Specification Output Specification

1 authorName not present in database

Error Code INV_AUTHOR

2 authorName present in database

SUCCESS

Table 11: Test Cases for insertFileTrueFalse

5. Function name : isValid

Test Case No:

Input Specification Output Specification

1 Question object is null

Error code NULL_VALUE

2 topic field of Question object is null

Error code NULL_VALUE

3 authorId field has a value not found in database

Error code INV_AUTHOR

4 topicId of topic field of Question object has a value not found in the database

Error code INV_TOPIC

5 Invalid value for complexity e.g. complexity < 1 or > 3

Error code INV_COM

6 Invalid value for standard e.g. standard < 0 or > 12

Error code INV_STD

7 questionString field of Question object is null

Error code NULL_VALUE

8 langId field of questionString has a value not found in the database

Error code INV_LANG

Page 137: EkShiksha Question Bank Report1

123

9 unicodeText of questionString field of Question object is null

Error code NULL_VALUE

10 unicodeText of questionString field of Question object has length 0

Error code EMPTY_STRING

11 numberOfOptions field of Question object of type FILL_IN_THE_BLANKS and MULTIPLE_CHOICE is less than 2

Error code INC_NOP

12 numberOfOptions field of Question object of type MATCH_COLUMN and TRUE_AND_FALSE is not equal to 1

Error code INC_NOP

13 totalCorrectOptions field of Question object is greater than numberOfOptions field

Error code INC_NOP

14 totalCorrectOptions field of Question object of type TRUE_AND_FALSE and MATCH_COLUMN is more than 1

Error code INC_TOP

15 totalCorrectOptions field of Question object of any type is less than 1

Error code INC_TOP

16 Invalid value for questionType field of Question object e.g. questionType < 0 or > 4

Error code INV_FUNCTION

17 Options field of Question object is null Error code NULL_VALUE

18 NumberOfOptions field in Question object is not equal to the count of Option objects in the Option array.

Error code OPT_MISMATCH

19 Valid Question object VALID

Table 12:Test Cases for isValid

6. Function name : isValidOptions

Test Case No:

Input Specification Output Specification

1 OptionString field is null for any option Error code NULL_VALUE

2 UnicodeText of optionString field is null Error code NULL_VALUE

Page 138: EkShiksha Question Bank Report1

124

3 UnicodeText of optionString field has length 0

Error code EMPTY_STRING

4 LangId of optionString is different from that of questionString

Error code INV_LANG

5 BlankId field is 0 for FillBlankOptions object

Error code INV_BLANKID

6 OrderIndex fields of the options is not unique

Error code INV_ORDER_INDEX

7 Two or more options are same Error code DUP_OPTION 8 More options marked correct than

totalCorrectOptions field of the Question object Error code INC_TOP

9 No options are marked correct Error code INC_TOP

Table 13: Test Cases for isvalidOptions

7. Function name : isDuplicate

Test Case No:

Input Specification Output Specification

1 Question object has same questionString and same optionStrings as that of some other question present in the database

Error code DUP_QUESTION

2 Question object has same questionString as that of another question in the database but one of its optionString is different

VALID

Table 14: Test Cases for isDuplicate

8. Function name : nextQuestionId

Test Case No:

State of the table questionbank Output Specification

1 The table is empty question_id=1

2 There are some entries in the table and the maximum value of question_id is 3

question_id=4

Table 15: Test Cases for nextQuestionId

Page 139: EkShiksha Question Bank Report1

125

9. Function name : insertQuestion

Test Case No:

Input Specification Output Specification

1 Question object is not valid Refer test cases of isValid

2 The Option object is not valid Refer test cases of isValidOptions

3 The questionString and optionStrings are same as that of another question of the same type in the database

Refer test cases of isDuplicate

4 The Question object and the Option objects are valid and the Question is not a duplicate

SUCCESS

Table 16: Test Cases for insertQuestion

10. Function name : deleteFillBlank

Test Case No:

Input Specification Output Specification

1 questionId is 0 Error code INV_QUESTION

2 questionId belongs to Question object of different type

Error code INV_QUESTION

3 questionId not in the table Error code INV_QUESTION

4 Valid questionId SUCCESS

Table 17: Test Cases for deleteFillBlanks

11. Function name : deleteMCQ

Test Case No:

Input Specification Output Specification

Page 140: EkShiksha Question Bank Report1

126

1 questionId is 0 Error code INV_QUESTION

2 questionId belongs to Question object of different type

Error code INV_QUESTION

3 questionId not in the table Error code INV_QUESTION

4 Valid questionId SUCCESS

Table 18: Test Cases for deleteMCQ

12. Function name : deleteTrueFalse

Test Case No:

Input Specification Output Specification

1 questionId is 0 Error code INV_QUESTION

2 questionId belongs to Question object of different type

Error code INV_QUESTION

3 questionId not in the table Error code INV_QUESTION

4 Valid questionId SUCCESS

Table 19:Test Cases for deleteTrueFalse

13. Function name : deleteMatchColumn

Test Case No:

Input Specification Output Specification

1 questionId is 0 Error code INV_QUESTION

2 questionId belongs to Question object of different type

Error code INV_QUESTION

3 questionId not in the table Error code INV_QUESTION

4 Valid questionId SUCCESS

Page 141: EkShiksha Question Bank Report1

127

Table 20: Test Cases for deleteMatchColumn

14. Function name : updateFillBlank Test Case

No: Input Specification Output Specification

1 Question object is null Error Code NULL_VALUE

2 questionId of the given Question object is not found in the table

Error code INV_QUESTION

3 questionId of the given Question object is found in the table

SUCCESS

4 The given Question object becomes a duplicate after Updation

Error code DUP_QUESTION

5 questionId of the given Question object is that of a question of another type

Error code INV_QUESTION

6 The type of the given Question object is not FILL_IN_THE_BLANK but questionId belongs to a question of type FILL_IN_THE_BLANK

Error code INV_FUNCTION

Table 21: Test Cases for updateFillBlank

15. Function name : updateTrueFalse

Test Case No:

Input Specification Output Specification

1 Question object is null Error Code NULL_VALUE

2 questionId of the given Question object is not found in the table

Error code INV_QUESTION

3 questionId of the given Question object is found in the table

SUCCESS

4 The given Question object becomes a duplicate after Updation

Error code DUP_QUESTION

Page 142: EkShiksha Question Bank Report1

128

5 questionId of the given Question object is that of a question of another type

Error code INV_QUESTION

6 The type of the given Question object is not TRUE_AND_FALSE but questionId belongs to a question of type TRUE_AND_FALSE

Error code INV_FUNCTION

Table 22: Test Cases for updateTrueFalse

16. Function name : updateMCQ.

Test Case No:

Input Specification Output Specification

1 Question object is null Error Code NULL_VALUE

2 questionId of the given Question object is not found in the table

Error code INV_QUESTION

3 questionId of the given Question object is found in the table

SUCCESS

4 The given Question object becomes a duplicate after Updation

Error code DUP_QUESTION

5 questionId of the given Question object is that of a question of another type

Error code INV_QUESTION

6 The type of the given Question object is not MULTIPLE_CHOICE but questionId belongs to a question of type MULTIPLE_CHOICE

Error code INV_FUNCTION

Table 23: Test Cases for updateMCQ

17. Function name : updateMatchColumn

Test Case No:

Input Specification Output Specification

1 Question object is null Error Code NULL_VALUE

2 questionId of the given Question object is not found in the table

Error code INV_QUESTION

Page 143: EkShiksha Question Bank Report1

129

3 questionId of the given Question object is found in the table

SUCCESS

4 The given Question object becomes a duplicate after Updation

Error code DUP_QUESTION

5 questionId of the given Question object is that of a question of another type

Error code INV_QUESTION

6 The type of the given Question object is not MATCH_COLUMN but questionId belongs to a question of type MATCH_COLUMN

Error code INV_FUNCTION

Table 24: Test Cases for updateMatchColumn

18. Function name : extractFillBlanks

Test Case No:

Input Specification Output Specification

1 The table is empty An empty array of Question object

2 N less than or equal to 0 An empty array of Question object

3 N less than total number of questions of type FILL_IN_THE_BLANK

An array of Question objects containing N entries of the type FILL_IN_THE_BLANK

4 N more than total number of questions of type FILL_IN_THE_BLANK

An array of Question objects containing all entries of the type FILL_IN_THE_BLANK

Table 25: Test Cases for extractFillblanks

19. Function name : extractTrueFalse . Test Case No:

Input Specification Output Specification

Page 144: EkShiksha Question Bank Report1

130

1 The table is empty An empty array of Question object

2 N less than or equal to 0 An empty array of Question object

3 N less than total number of questions of type TRUE_AND_FALSE

An array of Question objects containing N entries of the type TRUE_AND_FALSE

4 N more than total number of questions of type TRUE_AND_FALSE

An array of Question objects containing all entries of the type TRUE_AND_FALSE

Table 26: Test Cases for extractTrueFalse

20. Function name : extractMatchColumn

Test Case No:

Input Specification Output Specification

1 The table is empty An empty array of Question object

2 N less than or equal to 0 An empty array of Question object

3 N less than total number of questions of type MATCH_COLUMN

An array of Question objects containing N entries of the type MATCH_COLUMN

4 N more than total number of questions of type MATCH_COLUMN

An array of Question objects containing all entries of the type MATCH_COLUMN

Table 27: Test Cases for extractMatchColumn

21. Function name : extractMCQ

Page 145: EkShiksha Question Bank Report1

131

Test Case No:

Input Specification Output Specification

1 The table is empty An empty array of Question object

2 N less than or equal to 0 An empty array of Question object

3 N less than total number of questions of type MULTIPLE_CHOICE

An array of Question objects containing N entries of the type MULTIPLE_CHOICE

4 N more than total number of questions of type MULTIPLE_CHOICE

An array of Question objects containing all entries of the type MULTIPLE_CHOICE

Table 28: Test Cases for extractMCQ

22. Function name : extractAllTrueFalse

Test Case No:

Input Specification Output Specification

1 There are no entries in the table of type TRUE_AND_FALSE

An empty array of Question object

2 There are some entries in the table of type TRUE_AND_FALSE

An array of Question objects containing the entries of the type TRUE_AND_FALSE

Table 29: Test Cases for extractAllTrueFalse

23. Function name : extractAllMCQ Test Case No:

Input Specification Output Specification

1 There are no entries in the table of type An empty array of Question

Page 146: EkShiksha Question Bank Report1

132

MULTIPLE_CHOICE object

2 There are some entries in the table of type MULTIPLE_CHOICE

An array of Question objects containing the entries of the type MULTIPLE_CHOICE

Table 30: Test Cases for extractAllMCQ

24. Function name : extractAllFillBlanks . Test Case No:

Input Specification Output Specification

1 There are no entries in the table of type FILL_IN_THE_BLANK

An empty array of Question object

2 There are some entries in the table of type FILL_IN_THE_BLANK

An array of Question objects containing the entries of the type FILL_IN_THE_BLANK

Table 31: Test Cases for extractAllFillBlanks

25. Function name : extractAllMatchColumn Test Case No:

Input Specification Output Specification

1 There are no entries in the table of type MATCH_COLUMN

An empty array of Question object

2 There are some entries in the table of type MATCH_COLUMN

An array of Question objects containing the entries of the type MATCH_COLUMN

Table 32: Test Cases for extractAllMatchColumn

26. Function name : extractAllByTopicId Test Case No:

Input Specification Output Specification

Page 147: EkShiksha Question Bank Report1

133

1 There are no entries in the table An empty array of Question object

2 Invalid topicId i.e. topicId not present in the database

An empty array of Question object

3 questionType is MULTIPLE_CHOICE and valid value of topicId

An array of Question objects containing the entries of the given type and topicId

4 questionType is MATCH_COLUMN and valid value of topicId

An array of Question objects containing the entries of the given type and topicId

5 questionType is FILL_IN_THE_BLANK and valid value of topicId

An array of Question objects containing the entries of the given type and topicId

6 questionType is TRUE_AND_FALSE and valid value of topicId

An array of Question objects containing the entries of the given type and topicId

Table 33: Test Cases for extractAllByTopicId

27. Function name : extractByTopicId . Test Case No:

Input Specification Output Specification

1 There are no entries in the table An empty array of Question object

2 There are no entries with the given value of topicId

An empty array of Question object

3 topicId not present in database An empty array of Question object

4 There are some entries with the given value An array of Question object

Page 148: EkShiksha Question Bank Report1

134

of topicId containing the entries

Table 34: Test Cases for extractByTopicId

28. Function name : extractByAuthorId

Test Case No:

Input Specification Output Specification

1 There are no entries in the table An empty array of Question object

2 There are no entries with the given value of authorId

An empty array of Question object

3 authorId not present in database An empty array of Question object

4 There are some entries with the given value of authorId

An array of Question object containing the entries

Table 35: Test Cases for extractByAuthorId

29. Function name : extractByReviewerId

Test Case No:

Input Specification Output Specification

1 There are no entries in the table An empty array of Question object

2 There are no entries with the given value of reviewerId

An empty array of Question object

3 reviewerId not present in database An empty array of Question object

4 There are some entries with the given value of reviewerId

An array of Question object containing the entries

Table 36: Test Cases for extractByReviewerId

30. Function name : extractByStandard

Page 149: EkShiksha Question Bank Report1

135

Test Case No:

Input Specification Output Specification

1 There are no entries in the table and a valid value of standard is used

An empty array of Question object

2 There are no entries with the given value of standard

An empty array of Question object

3 Invalid value of standard An empty array of Question object

4 There are some entries with the given value of standard

An array of Question object containing the entries

Table 37: Test Cases for extractByStandard

31. Function name : extractByComplexity

Test Case No:

Input Specification Output Specification

1 There are no entries in the table and a valid value of complexity is used

An empty array of Question object

2 There are no entries with the given value of complexity

An empty array of Question object

3 Invalid value of complexity An empty array of Question object

4 There are some entries with the given value of complexity

An array of Question object containing the entries

Table 38: Test Cases for extractByComplexity

32. Function name : extractByStatus Test Case No:

Input Specification Output Specification

1 There are no entries in the table and a valid value of status is used

An empty array of Question object

2 There are no entries with the given value of An empty array of Question

Page 150: EkShiksha Question Bank Report1

136

status object

3 Invalid value of status An empty array of Question object

4 There are some entries with the given value of status

An array of Question object containing the entries

Table 39: Test Cases for extractByStatus

A.2.2 Test Report For Class KeywordManager

1. Function name : insertKeyword

TEST CASE NO:

INPUT SPECIFICATION OUTPUT SPECIFICATION

1. Keyword object = null rest valid NULL_VALUE

2. Keyword = null NULL_VALUE

3. Lang id = 0 (not present in table) INV_LANG

4. Keyword is null NULL_VALUE

5. Keyword is empty string rest valid NULL_VALUE

6. Keyword description is null NULL_VALUE

7. Keyword description is empty string rest valid

NULL_VALUE

8. Lang id of keyword description is not provided

INV_LANG

9. Topic id invalid INV_TOPIC

10. Status invalid INV_STATUS

11. Language id of keyword and keyword description are different

INV_LANG

12. Insertion of same keyword twice with same description

DUP_KEYWORD

13. Valid data SUCCESS

Page 151: EkShiksha Question Bank Report1

137

14. Error in sql statement to simulate sql error

SQL_ERROR

Table 40: Test Cases for insertKeyword

2. Function name : deleteKeyword

TEST CASE NO:

INPUT SPECIFICATION OUTPUT SPECIFICATION

1. Keyword id = 0 (not present in the table)

INV_KEYWORDID

2. Keyword id = 2 (present in the table) SUCCESS (row with keyword id 2 will be

deleted)

6. Error in sql statement to simulate any sql error

SQL_ERROR

Table 41: Test Cases for deleteKeyword

3. Function name : extractKeyword

TEST CASE NO:

INPUT SPECIFICATION OUTPUT SPECIFICATION

1. N <= 0 Null Keyword array returned

2. N<= total number of entries in database

Keyword array having N random keywords

3. N> total number of entries in database Keyword array having all the entries in random order

4. Error in sql statement to simulate any sql error

Null array was returned

Table 42: Test Cases for extractKeyword

4. Function name : extractAllKeyword

TEST CASE

INPUT SPECIFICATION OUTPUT SPECIFICATION

Page 152: EkShiksha Question Bank Report1

138

NO:

1. None Keyword array having all the entries in random order

2. Error in sql statement to simulate anysql error

Null array was returned

Table 43: Test Cases for extractAllKeyword

5. Function name : extractKeywordByStatus

TEST CASE NO:

INPUT SPECIFICATION OUTPUT SPECIFICATION

1. Status = 4 ( invalid) Null Keyword array returned

2. Status = 2 (not in table) Null Keyword array returned

3. Status = 1 (valid and in table) Keyword array having status = 1 in random order

5. Error in sql statement to simulate anysql error

Null array was returned

Table 44: Test Cases for extractKeywordByStatus

6. Function name : extractKeywordById

TEST CASE NO:

INPUT SPECIFICATION OUTPUT SPECIFICATION

1. Keyword id = 0 ( invalid) Null Keyword array returned

2. Keyword id = 4 (not in table) Null Keyword array returned

3. Keyword id = 1 (valid and in table) Keyword array having Keyword id =1

(actually a single tuple was selected)

5. Error in sql statement to simulate anysql error

Null array was returned

Table 45: Test Cases for extractKeywordById

Page 153: EkShiksha Question Bank Report1

139

7. Function name : extractKeywordByTopic

TEST CASE NO:

INPUT SPECIFICATION OUTPUT SPECIFICATION

1. topicId = 0 ( invalid) Null Keyword array returned

2. topicId= 2 (not in table) Null Keyword array returned

3. topicId = 1 (valid and in table) Keyword array having topicId = 1 in random order

5. Error in sql statement to simulate any sql error

Null array was returned

Table 46: Test Cases for extractKeywordByTopic

8. Function name : updateKeyword

TEST CASE NO:

INPUT SPECIFICATION OUTPUT SPECIFICATION

1. Keyword object = null rest valid NULL_VALUE

2. Keyword = null NULL_VALUE

3. Lang id = 0 (not present in table) INV_LANG

4. Keyword is null NULL_VALUE

5. Keyword is empty string rest valid NULL_VALUE

6. Keyword description is null NULL_VALUE

7. Keyword description is empty string rest valid

NULL_VALUE

8. Lang id of keyword description is not provided

INV_LANG

9. Topic id invalid INV_TOPIC

Page 154: EkShiksha Question Bank Report1

140

10. Status invalid INV_STATUS

11. Language id of keyword and keyworddescription are different

INV_LANG

12. Insertion of same keyword twice withsame description

DUP_KEYWORD

13. Valid data SUCCESS

14. Error in sql statement to simulate sqlerror

SQL_ERROR

Table 47: Test Cases for updateKeyword

Page 155: EkShiksha Question Bank Report1

141

Appendix B

ekshikshaqb Tables

Table: questionbank

Field Type Null Key

question_id int(11) NO PRIMARY topic_id int(11) NO NONE author_id int(11) NO NONE reviewer_id int(11) NO NONE Std int(11) NO NONE Complexity int(11) NO NONE question_string bigint(20) NO NONE image_url varchar(50) YES NONE number_of_options int(11) NO NONE total_correct_options int(11) NO NONE question_type int(11) NO NONE submitted_on timestamp NO NONE reviewed_on timestamp YES NONE Status int(11) NO NONE Table 48: questionbank table

Table : multiplechoiceoptions

Field Type Null Key

question_id int(11) NO PRIMARY option_string bigint(20) YES NONE image_url varchar(100) YES NONE order_index int(11) NO PRIMAR Iscorrect tinyint(1) NO NONE Table 49: multiplechoiceoptions table

Table : truefalseoptions

Field Type Null Key

question_id int(11) NO PRIMARY Iscorrect tinyint(1) NO NONE Table 50: truefalseoptions table

Page 156: EkShiksha Question Bank Report1

142

Table : fillblankoptions Field Type Null Key

question_id int(11) NO PRIMARY option_string bigint(20) NO NONE image_url varchar(50) YES NONE blank_id int(11) NO NONE order_index int(11) NO PRIMARY Iscorrect tinyint(1) NO NONE Table 51:fillblankoptions table

Table : matchcolumnoptions Field Type Null Key

question_id int(11) NO PRIMARY option_string bigint(20) NO NONE image_url varchar(50) YES NONE Table 52: matchcolumnoptions table

Table : published_content

Field Type Null Key

content_id bigint(20) NO PRIMARY lang_id int(11) NO PRIMARY index_by varchar(20) NO NONE Utext Text NO NONE publisher_id int(11) YES NONE published_time timestamp NO NONE Published tinyint(1) NO NONE Translatable tinyint(1) NO NONE Table 53: published_content table

Table : ekshiksha_users

Field Type Null Key

Userid int(11) NO PRIMARY Username varchar(50) NO NONE

Page 157: EkShiksha Question Bank Report1

143

firstname varchar(30) NO NONE middlename varchar(30) YES NONE lastname varchar(30) YES NONE roleid int(11) NO MULTIPLE langid int(11) NO MULTIPLE qualification varchar(30) YES NONE profile varchar(500) YES NONE email varchar(100) YES NONE mobile bigint(20) YES NONE phone bigint(20) YES NONE organisation varchar(160) YES NONE address varchar(150) YES NONE City varchar(50) YES NONE State int(11) YES MULTIPLE pincode int(11) YES NONE user_photo varchar(50) YES NONE showmobile tinyint(1) NO NONE showphone tinyint(1) NO NONE showemail tinyint(1) NO NONE showaddress tinyint(1) NO NONE showphoto tinyint(1) NO NONE showorganisation tinyint(1) NO NONE Approved tinyint(1) NO NONE reg_on timestamp NO NONE ip_address varchar(80) NO NONE Table 54: ekshiksha_users table

Table : languages

Field Type Null Key

lang_id int(11) NO PRIMARY lang_name varchar(100) NO NONE lang_desc text YES NONE lang_code varchar(50) YES NONE start_code int(11) YES NONE end_code int(11) YES NONE Table 55: languages table

Table : topics Field Type Null Key

Page 158: EkShiksha Question Bank Report1

144

topic_id int(11) NO PRIMARY parent_id int(11) NO NONE Type int(11) NO NONE Table 56: topics table

Table : contents Field Type Null Key

topic_id int(11) NO PRIMARY topic_name text NO NONE lang_id int(11) NO PRIMARY Table 57:contents table

Page 159: EkShiksha Question Bank Report1

145