In this document:
Often, online learning content requires a minimum display size to provide a good learner experience. However, SCORM does not currently define any way to specify that size. Content developers have been using popup windows to try to get around this limitation, but this often results in a proliferation of popup windows. A cascade of popup windows makes for a confusing user experience. POPSCO is a small add-on that can be used with any SCO to help ensure that the SCO will be displayed at the desired size, regardless of how a LMS displays SCOs. At the same time it tries to avoid opening unnecessary popup windows. It requires no modification to existing SCOs and works with SCORM 1.2 and SCORM 2004. Free use is allowed with attribution under a Creative Commons 2.5 Attribution-ShareAlike 2.5 license.
This is a "wrapper" SCO used to launch a "real" SCO at a specific display size in SCORM 2004 or SCORM 1.2. By default, it uses an automatic best fit behavior: If the window provided by the SCORM runtime environment is large enough to accommodate the desired size, it displays the SCO centered within that window, otherwise it displays the SCO in a new popup window.
An option to turn off the automatic best fit behavior allows forcing the use of the popup window regardless of of whether the SCO would fit in the current window. This option might be useful if you need a window with as few distracting elements as possible. If a popup window is used, it is sized to fit the desired display area size, automatically taking into account window borders, title bar, toolbars, etc. The popup window size and visible window features are always constrained by the size of the screen and by browser security features; for example, you cannot turn off the title bar. If the SCO was launched by the LMS in a popup window rather than a frame, another option allows growing the current window to accommodate the required display size, but of course this option works only if the current window is a popup window, not if it is a frame. The default settings for the various features can be modified by changing settings in the script, or by specifying parameters in the launch URL.
The high performance API relay works automatically with either SCORM 2004 or SCORM 1.2. It does not perform any conversion and is totally transparent to the SCORM API.
The actual SCO launched through POPSCO does not need to be modified in any way. Uses JavaScript only. No Java, no ActiveX, no Flash, no server-side component to activate. No nagging and no expiration date. Works offline as well as online. Subject to the usual browser security and popup control constraints.
Every one of these features is settable by editing the value of a variable in the script. Most feature options can also be set by URL parameters without editing the script. The default settings should be appropriate most of the time.
This demo uses the actual popsco.htm file available for download below.
The demo launches a dummy SCO or a web page of your choice in a frame with a predefined viewport size, similar to the frame that a LMS might use as a "stage" in which to play SCOs. It uses a couple of dummy SCOs to keep the demo simple because the main issue here is display size, not the SCORM API. To try the demo:
The demo uses the POPSCO default settings, except for the desired size. If the desired display size is larger than the viewport in the frame, the dummy SCO or your chosen web page is launched in a popup window. If you have a popup blocker, turn it on and observe how POPSCO puts up a warning if it cannot open the window.
POPSCO can also be used to launch the SCO using the full screen. For security reasons, current browsers no longer support a true kiosk mode unless it is invoked by the user. The danger of hacking exploits simulating an entire desktop well enough to fool many users made this restriction necessary. To see how POPSCO can launch a page with a best effort to use the full screen in your browser, try the button below. This will launch the page selected in the demo above.
The LMS launches the popsco.htm file as a SCO, with the URL of the actual SCO as a parameter. The popsco.htm file checks its parameters for the required display size, prepares the window, sets up a relay API object and and launches the actual SCO in the window. Depending on the required display size and the options in effect, the actual SCO may be launched in the original window or in a popup window. The actual SCO finds the relay API object and happily communicates with the API without realizing that it is not talking directly to the LMS.
POPSCO automatically sets up the appropriate relay API object regardless of whether the runtime environment is SCORM 1.2 or SCORM 2004 conformant.
The popsco.htm file must be added to your SCORM package. Small modifications of the manifest are also needed. The <resource> element that specifies each SCO is configured to launch the actual SCO through the popsco.htm file. In other words, you launch this SCO instead of the target SCO, and specify the target SCO as a parameter in the launch URL in the resource element in the manifest.
The example below illustrates typical changes to the manifest.
See the Options Reference section below script for a detailed descriptions of the customizable values. The preferred method of customization is through URL parameters; that way you can use the same unmodified popsco.htm for any number of SCOs. Note that the parameter names are case insensitive, but the values are case sensitive.
For example, to set the desired display size for a particular SCO, you can use something like
(Note how the & character separating the parameter name=value pairs is encoded as & in the XML manifest file to avoid violating XML syntax.)
If the SCO requires parameters of its own, you must make the SCO parameter the very last in the series of URL parameters, and set the parameterized URL for the SCO as the value for that parameter.
Whether to close a popup content window automatically when a SCO finishes is a complicated issue due to differences in LMS behaviors. It has been made even more complicated by recent browser security features that prevent scripts from closing a window. For a more complete discussion of this issue, see the white paper At the end of the SCO: To close or not to close. This white paper also recommends a simple SCO design feature to provide a satisfactory user experience regardless of whether the window can be closed.
The only option you must specify is the relative URL for the SCO to launch, as illustrated in the examples above. Everything else is optional.
The options are controlled by ECMAScript global variables in the script of the file popsco.htm. Many options can be overridden by providing a parameter in the URL used to launch the file. If no URL parameter is shown in the table, the option can only be set by modifying the script.
| Variable | Type | URL parameter | Default value | Description |
|---|---|---|---|---|
| gsSCOurl | string | SCO | gsSCOurl is the URL of the actual SCO to display. The default value is an empty string, but a value must be provided either by editing the script or by using the SCO parameter in the URL. | |
| gnSCODisplayWidth | integer | SDW | 700 | Width of stage area required by the SCO. This is the actual display area width, not including the window borders. |
| gnSCODisplayHeight | integer | SDH | 525 | Height of stage area required by the SCO. This is the actual display area height, not including window border, title, status bar, etc. |
| Variable | Type | URL parameter | Default value | Description |
|---|---|---|---|---|
| gbAllowScrolling | boolean | SCRL | true | If true and a popup window is created, the window displays scrollbars as needed. Note that when this option is used some browsers may display scrollbars even when not needed. Set to false only if you know that your content does not need scrolling, e.g. if it is a Flash movie. |
| gbCenter | boolean | CENTER | true | If gbCenter is true and a popup window is created, will try to center the popup window on the screen. |
| gbAutoFit | boolean | AUTOFIT | true | If gbAutoFit is true, use a popup only if the size of the stage window in which this is launched is smaller than gnSCODisplayWidth and gnSCODisplayHeight. If the current stage window is large enough, just replace this with page the SCO. Set to true for general use. Set to false if you really want to force a popup window every time. |
| gsBgColor | BG | string | D0D0D0 | Three hex digits that represent the background color to be used for this page. It is also used for the surround if the SCO is displayed in a centered frame within this page. This value should be in upper case. |
| gsFgColor | string | FG | 000000 | Three hex digits that represent the text (foreground) color to be used for this page if it shows a prompt to the user. Must contrast with gsBgColor. This value should be in upper case. |
| gbTryAutoGrow | boolean | false | Used only if gbAutoFit is true. If gbTryToAutoGrowLaunchWindow is true and this launcher page is launced in a top level window, it will try to grow the size of the top level window to fit the desired size. If that works, the SCO is launched in the same window. If that fails, the SCO is launched in a popup. | |
| gbFillTheScreen | boolean | FILLSCREEN | false | If gbFillTheScreen is true, ignore width and height settings and try to set the window as close to the size of the screen as the browser will allow. This value overrides gbAutoFit. |
| gbAllowResize | boolean | RESZ | true | If true and a popup window is created, the window is resizable by the user. |
| gbAutoCloseWithPopup | boolean | AUTOCLOSE | false | If gbAutoCloseWithPopup is true, then this window will monitor the popup window and, if allowed, will attempt to close itself if it detects that the popup window has been closed. Has no effect if this page is opened in a frameset. Note that, depending on how this SCO was launched, this feature may not work in FireFox, due to the security rule "Scripts cannot close windows that were not opened by script." In IE it may cause a dialog box to come up to ask the user whether it is OK to close the window. Test with different browsers if you use this feature. It is better to end your SCO with a "passive" page than to try to make a SCO try to close the window. |
| gbAddParamsFromThisUrl | boolean | true | If gbAddParamsFromThisUrl is true, parameters passed to this SCO will also be passed to the launched SCO. It is strongly recommended not to change this setting. See gbStripPopupParameters below for filtering option. Note that if this option is false and any other parameters need to be passed in the URL specified by the SCO parameter, the entire value of the SCO parameter must be URL encoded. | |
| gbStripPopupParameters | boolean | true | If gbStripPopupParameters is true, any of the parameters specified in this script will be stripped but the remaining parameters will be passed to the SCO that is launched in the popup window. The stripped parameters are specified in the array variable gaParamsToBeStripped. | |
| gbMonitorPopupWindow | boolean | true | If gbMonitorPopupWindow is true and a dependent popup window is opened, this window will show a prompt telling the user that the actual content is running in another window, with a button to reactivate that window in case it got deactivated or minimized. When this page detects that the popup window has been closed, it will change its prompt from telling the user that there is another window to telling the user that the content is no longer available. This works only if the browser allows a popup window to open as a popup; it does not work if the window is forced to open as a tab within the same browser window. | |
| gnPopupMonitorInterval | integer | 1000 | gnPopupMonitorInterval is the number of milliseconds between checks that the dependent popup window is still open. This monitoring function is also required to enable automatic closing when the dependent popup is closed. This check takes very few CPU cycles, but if there is a performance issue the interval can be increased. Do not set this value to less than 100. If there is a real problem due to some conflicting code in the SCO or the LMS, the check can be turned off by setting gnPopupMonitorInterval to 0. | |
| gbRecenterAfterGrow | boolean | true | If gbRecenterAfterGrow is true and gbCenter is false and the popup window had to be made larger than its original size, it is recentered moved to the top left corner of the screen to ensure that it is entirely visible. Unless those conditions are met this flag has no effect. Actual results may vary depending on the browser. | |
| gbDebug | boolean | DEBUG | false | If true show explanatory alerts in case of trouble. Can be overridden by the URL parameter DEBUG with value "true" or "false" |
POPSCO can be localized or adapted to your editorial requirements easily by modifying global variables that contain the user interface strings.
| Variable | Default value | Description |
|---|---|---|
| gsCannotOpenPopup | Cannot open a required popup window. Please turn off any popup blocker for this site. | Text of alert message shown when POPSCO cannot open a popup window. |
| gsSCOInOtherWindow | The learning content is displayed in another window. | Text shown in the LMS-provided "stage" window for the SCO when POPSCO uses a popup window to display the actual SCO. This text is removed automatically when the popup window closes. |
| gsResetFocusLabel | Bring the content window to the front | Caption of the button shown in the LMS-provided "stage" window for the SCO when POPSCO uses a popup window to display the actual SCO. This button is removed automatically when the popup window closes. |
| gsNoSCO | Nothing to launch. No SCO parameter specified. | Text shown in the LMS-provided "stage" window when no actual SCO to display is specified in the gsSCOurl variable and no SCO URL is provided as a parameter. |
| gsPopupClosed | This content is no longer available. | Text shown in the LMS-provided "stage" window after a popup window used to display the actual SCO has been closed. |
| gsLaunchWindowTitle | SCO Launcher | Default title for the POPSCO frame. Usually invisible. Provided to support accessibility requirements because a frame title is usually never displayed. If Popsco creates a popup window, the title of that window will be the title provided by the SCO. |
With IE6, if a popup window is opened the window includes an unnecessary "dead" scrollbar on the right. This is a known IE bug for which there is no robust workaround. You can eliminate that scrollbar by setting the scrollbars option to false, but if you do then the popup window never displays scrollbars, even if they become necessary. Suppressing this scrollbar could become a problem if the window ends up being too small, for example if the screen is too small for the requested window size. This extraneous scrollbar problem does not occur in FireFox.
POPSCO was tested with IE 7.0, beta 2, and found to be working as expected. Hoever, there is intense feedback from the IE user community about windowing features of IE 7, and it is anyone's guess what the final windowing behaviors will be. POPSCO tries for a safe, conservative approach, but no one will know for sure until the final version of IE 7 is released whether changes will be required.
With Firefox, it is not possible to suppress the status bar at the bottom of a popup window invoked by a script.
Please read the no nonsense License and terms of use below before downloading or using this tool. By downloading or using this software you signify your agreement with the license and terms of use.
Right-click here to download popsco.htm.
This work is licensed under a Creative
Commons Attribution-ShareAlike2.5 License.
USE AT YOUR OWN RISK
THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHOR OR COPYRIGHT
HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.