Tuesday, August 14, 2012

Developing Quiz Test Module in OOB of SharePoint


If you have any requirement like you need to organize a quiz/exam test for set of users, then you do not need to develop any custom web part or no need to buy any third party product. Here I am going to explain step-by-step process to develop of a Quiz Test Module in OOB of SharePoint.

         Step 1.  Create a Custom List with some columns as below.
Column Name
Data Type
Default Value
Required
Hide Field
Q1. Which Country has largest population?
Choice Values [INDIA, UK, USA]
[Make it Blank]
Yes
False
A1
Single Line Text
INDIA
No
True
Q2. Which Country is more powerful?
Choice Values [CHINA, JAPAN, USA]
[Make it Blank]
Yes
False
A2
Single Line Text
JAPAN
No
True
Q3. Which Country is rich?
Choice Values [PAKISTAN, INDIA, SRILANKA]
[Make it Blank]
Yes
False
A3
Single Line Text
INDIA
No
True
Q4. Which Country is harvesting rice more?
Choice Values [SA, AUSTRALIA , INDIA]
[Make it Blank]
Yes
False
A4
Single Line Text
INDIA
No
True
Q5. Which Country is strong in Missile Manufacturing?
Choice Values [RUSSIA, INDIA, USA, JAPAN]
[Make it Blank]
Yes
False
A5
Single Line Text
USA
No
False
        Note: Here I created 5 questions and their 5 answers, so in total I created 10 columns for all.
            
             Step 2. Now enable content type for the List and hide the answer fields (A1, A2, A3, A4, and A5).
             Step 3. Now we will create 3 more fields in the same list which are Score, Final Score and Result.
  
Column Name
Data Type
Formula
Returned Data Type
Required
Test Output
Score
Calculated (calculation based on other columns)
=SUM(IF(EXACT([Q1. Which Country has largest population?] ,A1),1,0),IF(EXACT([Q2. Which Country is more powerful?],A2),1,0),IF(EXACT([Q3. Which Country is rich?],A3),1,0),IF(EXACT([Q4. Which Country is harvesting rice more?],A4),1,0),IF(EXACT([Q5. Which Country is strong in Missile Manufacturing?],A5),1,0))
Number
No
1/2/3/4/5
Final Score
Calculated (calculation based on other columns)
=CONCATENATE(Score,"/5")
Single line of text
No
1/5 Or 2/5 Or
3/5 Or
4/5 Or
5/5
Result
Calculated (calculation based on other columns)
=IF(Score>3,"PASS","FAIL")
Single line of text
No
PASS/FAIL
               
         Now if you look at the List Columns which will looks like as below.

           Step 4: Create New Item to start the Quiz Test and the screen will look like below.

           Step 5: Here is the All Users Result Report which you can also customize depending upon your requirement.
     
For individual user’s result which user can see after completing test, for that you can create another view with some filter (Created By = [Me]) and customizing the view and can get like the below output.
      
        Enjoy It !