Ever thought about submitting a quick anonymous survey to all your students in Saba and make it available in a portlet on the person's dashboard?
The Saba's own survey tool is not quite fit for the purpose, not last because it requires a content administrator in Saba to create the survey itself.
What we really want, instead, is a very simple and immediate survey that even your CEO can create and submit in minutes.
Tools like Survey Monkey (www.surveymonkey.com) suits perfectly the need and the good news is that you can integrate a survey in Saba and display it within a portlet in just minutes!
Basically, a mashup portlet is a container of HTML and JavaScript code that can be embedded in a Saba portal. The page manager class is com.saba.client.portal.MashupPortletPageManager.
With this in mind, adding a new mashup portlet to an existing portal is as simple as an ABC (and therefore I won't bore you with the details).
For reference, the next picture shows the details of my Survey Monkey mashup portlet as configured in my environment.
The survey web link comes in the form http://www.surveymonkey/s/XXXXXXX, where XXXXXXX is a 7-character code the uniquely identifies the survey, as in the picture below.
All we need to do now is to embed this survey within the mashup portlet. We do this by using an iframe configured as follows:
<iframe src="http://www.surveymonkey.com/s/6S9Y5Y5" width="100%" height="300px"></iframe>
The src attribute clearly references the survey web link. The iframe width is set to 100% so it can take all the horizontal extent of portlet. The height attribute instead is fixed to the minimum height you want to set for your survey showing inside the portlet's frame. 300 pixel is a reasonable size, but make your own tries to figure out which height best fits your survey.
Just add that piece of HTML to the XHTML property of the mashup portlet, save, add the portlet to a portal and voilĂ job done!
There's margin for improvement, though. Once the survey is answered, Survey Monkey displays a promotional page instead. You may not want your users to see this page. Unfortunately, portlets cannot be assigned and removed on a user-by-user basis. The only workaround viable at the moment is that the user themselves removes the portlet from their dashboard, or for the administrator to wait until the survey closes and then remove the portlet from the portal.
An enhanced version of the Survey Monkey portlet will be presented in the next article, with better control on exactly this scenario when a user has completed the survey.
Regards,
Stefano
The Saba's own survey tool is not quite fit for the purpose, not last because it requires a content administrator in Saba to create the survey itself.
What we really want, instead, is a very simple and immediate survey that even your CEO can create and submit in minutes.
Tools like Survey Monkey (www.surveymonkey.com) suits perfectly the need and the good news is that you can integrate a survey in Saba and display it within a portlet in just minutes!
The Mashup portlet
All the wiring of the Survey Monkey survey with Saba is done in a mashup portlet. Mashup portlets display data retrieved from an external site using JavaScript and HTML.Basically, a mashup portlet is a container of HTML and JavaScript code that can be embedded in a Saba portal. The page manager class is com.saba.client.portal.MashupPortletPageManager.
With this in mind, adding a new mashup portlet to an existing portal is as simple as an ABC (and therefore I won't bore you with the details).
For reference, the next picture shows the details of my Survey Monkey mashup portlet as configured in my environment.
Not in the picture, there are two extra parameters that can be configured for defining the content and layout of the mashup portlet:
- JSFunc: This parameter defines the JavaScript expression that is executed on page load, i.e. when the portal completes loading the mashup portlet. Please note, the Saba 5.5 System Administration Guide reports an example of a JavaScript function specified for this parameter. Unfortunately, this is not correct. The JSFunc parameter accepts immediate JavaScript commands and not functions. The good news is that... we don't need to configure anything here, the Survey Monkey survey will open automatically inside the portlet container, we don't need to specify any JavaScript action occurring after the portlet loads.
- XHTML: This is where the HTML code goes, which defines the content and layout of the portlet. This must be a properly formatted XHTML code, so all tags should have an opening and a respecting closing tag (i.e. <p> and </p>). Also, attributes should be quoted (<div width=100> is not acceptable, it has to be <div width="100">). We will use this parameter to embed the Survey Monkey survey in our mashup portlet.
Putting a Survey Monkey in a portlet
Probably you have already used Survey Monkey in the past, so you already know how to create a survey in there. What you need to do now is simply obtaining the survey web link and use it for defining the survey to display in the portlet.The survey web link comes in the form http://www.surveymonkey/s/XXXXXXX, where XXXXXXX is a 7-character code the uniquely identifies the survey, as in the picture below.
All we need to do now is to embed this survey within the mashup portlet. We do this by using an iframe configured as follows:
<iframe src="http://www.surveymonkey.com/s/6S9Y5Y5" width="100%" height="300px"></iframe>
The src attribute clearly references the survey web link. The iframe width is set to 100% so it can take all the horizontal extent of portlet. The height attribute instead is fixed to the minimum height you want to set for your survey showing inside the portlet's frame. 300 pixel is a reasonable size, but make your own tries to figure out which height best fits your survey.
Just add that piece of HTML to the XHTML property of the mashup portlet, save, add the portlet to a portal and voilĂ job done!
There's margin for improvement, though. Once the survey is answered, Survey Monkey displays a promotional page instead. You may not want your users to see this page. Unfortunately, portlets cannot be assigned and removed on a user-by-user basis. The only workaround viable at the moment is that the user themselves removes the portlet from their dashboard, or for the administrator to wait until the survey closes and then remove the portlet from the portal.
An enhanced version of the Survey Monkey portlet will be presented in the next article, with better control on exactly this scenario when a user has completed the survey.
Regards,
Stefano
No comments:
Post a Comment