How to modify SP widget "take-survey"

venkateshdhanap
Tera Contributor

Hi All,

I have created new quiz with some 10 questions.

After completing assessment its taking me to page called "assessment_thanks" and it has just message to say "You have completed this assessment".

I need to display result like 7/10, may be in the same page or different page.

Actually while taking assessment "take-survey" widget is displaying. How display the result once user click on submit button.

find_real_file.pngThanks in advance,

Venkatesh Dhanapal

 

 

1 REPLY 1

Sateesh Kumar 2
Kilo Guru

Hello,

Usually Assessment questions will be shown in UI page named "assessment_take2", on the submission of this assessment it will take you to another UI page "assessment_thanks".

Follow the below steps to customize this feature.

Goto UI Page "assessment_take2" under 'Processing script' look for the line staring with "url = 'assessment_thanks.do?" and add the percentage answered url with an custom attribute name.

ex:  url = 'assessment_thanks.do?sysparm_assessable_type=' + type_sysID.toString() + '&sysparm_assessment_type=' + type.evaluation_method.getChoiceValue().toLowerCase()+"&result="+inst.percent_answered;

Instead of percent_answer if you would like to use some other value you can build your own logic , look for a line "if (selection_result == 'submit') {" add your result calculation logic after this line (use Metric instance to get user selections) and the result can be passed on to UI page "assessment_thanks" via URL. 

Now goto UI Page "assessment_thanks" under HTML make your own jelly script to display the result the way you want , you can get the result from URL using "jelly.result" 

 

Hope this helps!

 

Regards,

Sateesh Kumar Devadoss