|
The EnterPage 8-01The Source for ToolBook and VBTrain.Net News from Platte Canyon Multimedia Software Corporation HTML version available at: http://www.plattecanyon.com/ep/ep8-01.htm In This IssueIntroduction TOP STORIES Seats Available for January 24th
ToolBook Training Class One-Day TBCON Events in New Orleans and Orlando Announcing the VBTrain.Net Design Awards Looking for "Learning & Mastering ToolBook Instructor 2004" Beta Testers Tracker.Net is the Lowest Cost LMS Come Visit Us at the Training and eLearning Producer Conferences TOOLBOOK TIPS AND NEWS Plug-In Pro Tool Spotlight - First and Next Background Expert Information from the "Learning & Mastering ToolBook" Series VBTRAIN.NET TIPS AND NEWS MORE NEWS AND INFORMATION Come See Us: The Platte Canyon World Tour Platte Canyon Products in the Pipeline Coming in the Next Issue of The EnterPage With the "hustle and bustle" of the holidays over,
we wanted to share some news from the We are looking forward to the 2005 edition of The ToolBook & VBTrain.Net conference, and this issue of the EnterPage gives some details to help in your planning. We also let you know about other opportunities to get together in person. We hope that you enjoy this newsletter. For those of you who are our customers, thanks for making 2004 one of our best year’s ever. For those who are members of the ToolBook or VBTrain.Net lists (or who just want to see what all the excitement is about), thanks for your contributions! Do you want to escape to the warmth of http://www.learningandmastering.com/landm_course.aspx If you are interested in a full-day training session on
ToolBook or VBTrain.Net but can’t wait for TBCON this summer, join us in New
Orleans (Sunday, http://www.tbcon.com/1dayevents.aspx Here is a link to learn more and to enter: http://www.tbcon.com/vbtrainawards.aspx At long last, we are going to beta with the new Learning & Mastering ToolBook Instructor 2004 training CD. We have a couple more beta testing spots. If you know ToolBook well and have the time to give the training program a thorough run through, please send an email to Chris at cbell@plattecanyon.com. All beta testers receive a free copy of the shipping CD. We're already getting excited about the 2005 version of The
ToolBook & VBTrain.Net User’s Conference, to be held August 1 - 3, 2005
(preconference training July 30 and 31) in For the first time, Chris Bell is bringing his popular "Learning & Mastering ToolBook: The Class" to the preconference. He will be leading hands-on classes focused on getting started, simulations, the Actions Editor, and media/questions. Lee will dig deeply into simulation in his two preconference workshops as well. Jeff Rhodes will teach you all about .NET and VBTrain.Net controls in his workshops. Pricing remains low as always: Off Campus ($720) Loomis Double ($825) Loomis Single ($895) Apartment Multiple Occupancy ($945) Apartment Single ($1,145) All prices include meals. Everything except "Off Campus" includes lodging as well. Prices rise by $50 on June 1 and another $50 on July 1. Preconference workshop pricing ranges from $150 for one workshop to $555 for all four. You can learn more and sign up at http://www.tbcon.com. Our Tracker.Net is creating quite a stir in the industry. In addition to adding customers like British Airways and EADS Telecom, brandon-hall.com has included Tracker.Net in its "Low-Cost Learning Management Systems: 17 Products for Limited Budgets" report as well as its "LMS KnowledgeBase 2005." As part of their marketing effort for this latter product, they listed the price range for various numbers of users. For 500 users, the range was $8,980 - $234,150. At 100,000 users, the range was $11,980 - $5,340,000! What product owns the $8,980 and 11,980 prices? You guessed it, Tracker.Net. See the ranges for yourself at: http://www.brandonhall.com/public/dispatch/jan5-05.htm If any of you are planning to come to the Training
conference in New http://www.trainingconference.com The following month, Jeff will be presenting a session on
"Talking SCORM with ASP.NET" at the eLearning Producer conference
in http://www.elearningguild.com/pbuild/linkbuilder.cfm?selection=doc.740 ToolBook Tips and Newsby Jeff Rhodes First and Next Background One of the common "gotchas" in ToolBook development is inadvertently getting extra backgrounds in your book. This can create a sizing and performance issue in DHTML and a maintenance headache with any type of deployment. It can happen by copying and pasting pages from another book (be sure to use the Plug-In Pro “View a Page” tool in any case, but that’s a different EnterPage), using Paste Special and choosing to create a new background, or from the "New Page" bug in ToolBook 2004 that sometimes gives you a new background even when you ask it not to. To fix the problem, you need to first recognize that you have extra backgrounds and then figure out which pages are using it. The Plug-In Pro has a couple of buttons to help for both of these. The "First Background" button gets you started by taking you to the first page of the first background in your book. You then click the "Next Background" button to cycle through the rest of your backgrounds. In each case, the Plug-In Pro takes you to the first page of the background. When you see what LOOKS like the same background more than once, you know you have a problem. Once you know that you have multiple backgrounds, you can use Denny Dedmore's tool available through the Developer Tools menu to join them together. If you want to learn more, check out the help topics: http://www.plattecanyon.com/help/pluginpro/Going_to_the_first_backgrou.htm http://www.plattecanyon.com/help/pluginpro/Going_to_the_next_backgroun.htm More information on Plug-In Pro is available at: http://www.plattecanyon.com/pluginpro.aspx by Chris Bell The product of running the Sim AutoBuilder Recorder is a TBR file. We import the TBR file into ToolBook using the Insert Simulation from Recording menu item. That's really all that we need to know about TBR files. But if you're really interested in digging deeper, here's what you'll find: A TBR file is a zip file with a different extension. This means that you can open it with WinZip, PKZip, or another unzip routine. Inside the TBR zip file, we find two types of files: BMPs - these are the captured screens. One image per step. These are the same images that you'll see if you were to click "preview" at a step while going through the TBR import wizard. XML file - this is the data file that the simulation import process uses to create the simulation. It is a highly structured and detailed account of the full capture. Every menu item, button, dialog box, is represented here for reproduction in ToolBook. Have fun digging into the file! by Jeff Rhodes The OpenScript, Actions Editor, and VBTrain.Net tips in this issue are related to HTTP Post and come from "Learning & Mastering ToolBook Instructor 2004." For the first two, we show how to HTTP Post to a web server with your "visitor" information. In the VBTrain.Net tip, we see how to log that information to a database and return the previous visitor’s information to the client. Here is the OpenScript for the "Post" button to handle buttonCLick local object fieldID local stack returnVal, studentNumber, newDate, oldDate, oldLoc, url
if sysLevel = "reader" fieldID = field "location" --Set up parameters to pass to web get ASYM_SetHTTPPostParameter ("location", text of fieldID) --Send message to web url = "http://www.learningandmastering.com/tbcbt2004examples/userCountAndLocation.aspx" returnVal = ASYM_HTTPPost(url) if returnVal contains "<font" -- error message studentNumber = "XX" newDate = "NA" oldDate = "NA" oldLoc = "The server is currently unavailable." else oldLock = item 1 of returnVal oldDate = item 2 of returnVal studentNumber = item 3 of returnVal newDate = item 4 of returnVal end if text of field "newNum" = studentNumber text of field "newDateAndTime" = newDate text of field "prevDateAndTime" = oldDate text of field "prevLoc" = oldLoc end if end buttonClick We grab the student’s location from a field on the ToolBook page and set that as a parameter using ASYM_SetHTTPPostParameter(). We then call the ASYM_HTTPPost() method, passing in the location of the .aspx page we want to post to. That page returns a comma-delimited set of return values. We parse that and set the text of corresponding fields. by Jeff Rhodes Let’s look at the Actions Editor implementation of the code to post a student’s location to an .aspx page and then display the return values in ToolBook fields. -- On click... ----------------------------------------------------------------- Define local variable "dateTimeLocationString" (Initial value: "") Define local variable "oldLoc" (Initial value: "") Define local variable "oldDate" (Initial value: "") Define local variable "studentNum" (Initial value: "") Define local variable "newDate" (Initial value: "") Set HTTP Post parameter "location" to text of field "location" HTTP Post to: "http://" & gPostLocation & "/tbcbt2004examples/userCountAndLocation.aspx"; store return value in dateTimeLocationString If "dateTimeLocation" = "" Display alert: "Could not connect to the server. One possible cause could be that you are running Exported DHTML that is not located on a web server." Else Execute Shared Actions "item"; store return value in oldLoc Set text of Field "prevLoc" to oldLoc Execute Shared Actions "item"; store return value in oldDate Set text of Field "prevDateAndTime" to oldDate Execute Shared Actions "item"; store return value in studentNum Set text of Field "newNum" to studentNum Execute Shared Actions "item"; store return value in newDate Set text of Field "newDateAndTime" to newDate End if We start by setting the "location" parameter based on what the student entered. We then post to the designated location. One slight change compared to the OpenScript logic is that we stored the web site itself in the gPostLocation global variable. That allowed us to set it to "localhost" for testing the .aspx page and then just change the global variable to "www.learningandmastering.com" when we were ready to go live. To parse the return value, we use Denny Dedmore’s "item" shared action, available at http://www.toolbookhelp.com/downloads/actions/shared/index.htm. It isn’t all that efficient to call it four times in a row, but we didn’t want to complicate things in this case by writing our own action to return a single array. VBTrain.Net Tips and Newsby Jeff Rhodes Those of you who read the Actions Editor and OpenScript tips know that we are going to look at how to implement the posts that we covered in those sections. The idea is to write each "visitor’s" information to an Access database and then send the previous visitor’s details along with the total number of visitors as the return value. Note that we include a Visual Studio .NET solution containing this and other examples on the Learning & Mastering ToolBook Instructor 2004 CD. Here is the "code behind" for the userCountAndLocation.aspx page. Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim newLocationId As String = Request.Form("location") Dim newDateId As DateTime = Now Dim returnString As String = ConfigureDbString(newLocationId, newDateId) Response.Write(returnString) End Sub In the Page_Load code, we grab the location parameter from the "Request" collection. We also get the current time, which we are going to write to the database. We call the ConfigureDbString() function to get the return value that we need. We then Response.Write that value to return it to the calling program. Private Function ConfigureDbString(ByVal locId As String, ByVal dateId As DateTime) As String Dim conStr As String = String.Format("provider=Microsoft.Jet.OLEDB.4.0;Data Source={0}database\example.mdb", Request.PhysicalApplicationPath) Dim oleDbConId As New OleDbConnection(conStr) Dim selectCommandId As New OleDbCommand("MostRecentUsers", oleDbConId) Dim oldLoc As String Dim oldDateString As String Dim oldTimeString As String Dim returnString As String selectCommandId.CommandType = CommandType.StoredProcedure If oleDbConId.State <> ConnectionState.Open Then oleDbConId.Open() End If The code above creates the connection string to the Access database on the server. Notice the use of Request.PhysicalApplicationPath to dynamically figure out the local path to the file. This allows you to move the whole project around without needing to recompile. We use the connection string to make the OleDbConnection object. The next step is to make a "command" object. In this case, we use the "MostRecentUsers" query stored in the database. It has this SQL statement: SELECT Visits.* FROM Visits ORDER BY Visits.visitDate DESC , Visits.visitTime DESC; Dim readerId As OleDbDataReader = selectCommandId.ExecuteReader If readerId.Read = True Then oldLoc = readerId("location").ToString oldDateString = CDate(readerId("visitDate")).ToShortDateString oldTimeString = readerId("visitTime").ToString End If readerId.Close() This next set of code creates a DataReader, which is used for a fast, read-only grab of the results. Its .Read method puts us on the first row, which corresponds to the most recent visitor. We grab that visitor’s location, date, and time. Dim sqlText As String = "INSERT Into Visits(location, visitDate, visitTime) VALUES (?, ?, ?)" Dim insertCommandId As New OleDbCommand(sqlText, oleDbConId) Dim locationParamId As New OleDbParameter("location", OleDbType.VarWChar) Dim dateParamId As New OleDbParameter("visitDate", OleDbType.DBDate) Dim timeParamId As New OleDbParameter("visitTime", OleDbType.VarWChar) Dim numUsers As String = "1" locationParamId.Value = locId dateParamId.Value = dateId timeParamId.Value = dateId.ToLongTimeString With insertCommandId.Parameters .Add(locationParamId) .Add(dateParamId) .Add(timeParamId) End With With insertCommandId .CommandType = CommandType.Text .ExecuteNonQuery() End With We now add our current visitor to the database. For that, we create our own "Insert" query. We need to introduce a new object, the OleDbParameter. We add a parameter for each piece of data. They correspond to each ? in the insert query. We add the date and time separately so that we can sort by both (see query above). We then call the command object’s ExecuteNonQuery() method to actually write the new row to the database. With selectCommandId .CommandText = "UserCount" numUsers = .ExecuteScalar.ToString End With returnString = String.Format("{0},{1} {2},{3},{4},", oldLoc, oldDateString, oldTimeString, numUsers, dateId.ToString) If oleDbConId.State = ConnectionState.Open Then oleDbConId.Close() End If Return returnString End Function The last test is to read the number of users. For this, we use another stored query: SELECT Count(Visits.userId) AS UserCount FROM Visits; Note the use of the ExecuteScalar() method. We can use it rather than a DataReader since we know the return value is a single number. We then format the results into a comma delimited string. More News and InformationHere are the upcoming conferences and events that we have firmed up at this time: TBCON One-Day Event Training Spring eLearning Producer TBCON One-Day Event ASTD International Conference & Exposition Training Fall We’re getting close on the "Learning & Mastering ToolBook Instructor 2004" CBT as we mentioned and have also been working quite hard on Tracker.Net version 3. After those, look for SCORM 2004-enabled versions of LmsApi and Question. Stay tuned! · Getting Ready for TBCON · Another Plug-In Pro Tool Spotlight · More OpenScript Tips · More Actions Editor Tips · More VBTrain.Net Tidbits · Expert Information (from the "Learning and Mastering ToolBook..." Series) · More The EnterPage is distributed four times a year, with occasional special issues. Individuals who have expressed interest in Platte Canyon Multimedia Software Corporation or its products receive The EnterPage. Suggestions for articles or proposals for article submissions are welcome. Send information to EP@plattecanyon.com. Back issues of the EnterPage are available at http://www.plattecanyon.com/enterpage.aspx. To subscribe or unsubscribe, please send a message to EP@plattecanyon.com. Please include your name and company with new subscriptions. All content Copyright Platte Canyon Multimedia Software Corporation, 2005. |