Tuesday, August 23, 2011

UPK : some interesting settings when publishing to LMS

Hi,

When publishing in UPK to a player package you can alter some interesting parameters. The screen for these parameters looks like this :


If you look at the parameterscreen when publishing to a LMS package a few interesting parameters are missing in this screen. The screen looks like this:


The good and the bad
The good news is that you can set these parameters in the LMS. The bad news is that you have to alter some XML-type file AFTER publishing the package.

The ugly
The ugly thing is navigating to the right file in your published package. The file you are looking for is the file defaultprefs.js. You'll find this file in the directory wherein you published your LMS package. The publishing directory looks like this :

Driveletter:\PUBLISHINGDIRECTORY\Publishing Content\LMS\preferences

and the file defaultprefs.js looks like this:

In this file you'll find some interesting parameters of which I'll touch the following:

UserPrefs.MarqueeColor="FF0000"
The marquee-color is the color used for the Action Area's in the TryIt and SeeIt mode. Normally it's set to Red but you could want it to change to a more appropriate color. This is possible in UPK when publishing to the player package but not when publishing to a LMS package. When you set this by hand you can give it an HTML color.

UserPrefs.TryIt.EnableSkipping=true
When you enable skipping, and it's turned on by default, a user can use Enter in the TryIt mode to advance to the next slide. Mostly I don't want this so I set it to false.

Please note that true and false have NO double quotes

UserPrefs.EnablePreferences=true
With this parameter you give permission to the user to alter some preferences, like marqueecolor and skipping. Set to false you deny this permission.

Please note that true and false have NO double qoutes

UserPrefs.PlayAudio="none"
The playing of audio also invokes a flash-player, which at some sites is not allowed or possible. UPK comes up with some nag screen to let the user set some preferences. I just don't want the user handle these nag screens so I've set this to none. "None" is the XML equivalent of "No Sound " in the export menu.

This variable has nothing to do with "Sound" (sound-quality, High-Medium-Low). Which btw doesn't seem to work in the LMS export.


Al in all my defaultpres.js file looks like this:

/******************************************************************
Copyright © 1998, 2009, Oracle and/or its affiliates. All rights reserved.
******************************************************************/
function SetDefaultPreferences(){UserPrefs.PlayAudio="none";UserPrefs.ShowLeadIn="all";UserPrefs.MarqueeColor="FF0000";UserPrefs.TryIt.EnableSkipping=false;UserPrefs.EnablePreferences=true;UserPrefs.TimeStamp="201107041553";UserPrefs.DoIt.HotKey.Ctrl="L";UserPrefs.DoIt.HotKey.Shift="N";UserPrefs.DoIt.HotKey.Alt="L";UserPrefs.DefaultPlayMode="";}

Tuesday, May 24, 2011

How to crop all frames in UPK

Resizing images in UPK Developer 3.6.1

On the LinkIn group Oracle UPK and Oracle Tutor Professionals there was the question how I managed to crop all frames of a topic. In this article I will write my solution, as it can be done.

I provide this information as this functionality is not provided in the UPK developer but sometimes badly needed.

Beware : After this point you are on your own as I can not give guarantee on the final result.

All information is provided as is.


What you need

For this action you need some additional software :

  • A text editor, eg Notepad plus plus
  • A picture program that can batch proces images: xnview
  • a text search program, I use fgrep, a GNU Utility

Before you start


Again : I still see this as a hazardous operation! I do not give any guarantee!

  • Export your course to an odarc file. If something went wrong you can copy this file, rename it to something.odarc.zip and unzip the odarc file.
  • UPK seems to be VERY picky on capitals in the tags of the XML files. So if you copy-paste a line into the XML file make sure copy exactly the same capitalisation into the xml files. It won't hurt UPK itself but after opening the topic it will die with strange errors

Where do you find the frames?

First thing is to find the directory where the images (png's) of the frames are stored. This directory is located at something like :

C:\Documents and Settings\yourlogin\Local Settings\Application Data\SUPDev5\D\Content\W

In this directory you find more directories with long alphanumeric names like
923f26ac73154f96a101389772ef29a6
where the images are stored ánd, very helpful, some xml files.

2 xml files are important : manifest.mfx and topic.xml .

Part of the magic is finding the right directory. This you can find by finding the name of the topic in the file manifest.mfx by doing a text search on the title of the topic. It is important to name your topic uniquely.

This I do with a little batch file which uses fgrep but can also be accomplished with the search utility in the (windows) file explorer however this may take some more time.

When you know the directory, you can open manifest.mfx and topic.xml in the text editor. In manifest.mfx you see the topic title. Is this the right title you can carry on.

In topic.xml you look up the line < ScreenResolution Width="1024" Height="768" />. This is the resolution in which you recorded your topic. It is grayed out btw in you topic editor!


Rescale your images

Open also up xnview (or another image editor) and navigate to the right directory. Now you see the images of your topic. In XnView you can batch proces the images, like cropping or resizing.


Steps batch processing

  • Warning : This can not be undone, so backupping the directory is wise. (see : Before you start)
  • If you want to resize (crop, zoom) select ALL images
  • Pres < ctrl> +U to open up batch mode.
  • In the screen in the second tab you can tell which things must be done.
  • Important : remember the resulting Height and Width of the images
  • Perform the batch processing

New height and width

  • Type the resulting Height and Width in the file topic.xml< ScreenResolution Width="new width" Height="new height" />
  • Save the file topic.xml

Open topic

now you can open your topic in the topic editor. It is important to look through the whole topic as action area's can be moved outside the frame.

  • Action area's outside the image: you can double klik on the black spots of the action area and resize and move into the frame
  • Connect, if you want, the balloons with the action area
  • If your image seems distorted then possibly the screenresolution in the file topic.xml is not right and you must look at an individual image to find the right screenresolution.

Good luck