ATutor

Learning Management Tools







Pages:1 2 3 4 5 6 7 8 9 10 11 12 13 14 15


javascript in import from webCT


  • 2005-08-18 11:47:38

    javascript in import from webCT

    There is some embedded javascript in some files that I am importing from a webCT IMS export that does not work in ATutor. I have also manually set up a content page and uploaded the html files (and related resources) and have the same problem. The code that does not work is the following:
    <code start>
    Read pages 1-11 in your <a onclick="
    function onclick(event) {
    MM_openBrWindow("course_files/text.htm", "test", "width=200,height=200");
    }
    " href="javascript:;"><img align="middle" src="common_files/textbook.gif" /></a>.
    <code end>

    The text image is there, but clicking on it does nothing.

    Any ideas?

  • 2005-08-18 13:37:50

    javascript in import from webCT update

    OK, I have found the issue and it is not with ATutor at all. It seems that webCT cuts off the information in the <head> of the html file before it exports it, and my non-IMS source for the same files also do not have the original <head> .......</head> that the webCT files have, so the actual javascript function that is in the body does not exist anywhere. I cut and pasted the function from the webCT source and it now works.

  • 2005-08-18 13:57:11

    javascript in import from webCT update

    Correction on the above: The issue is with ATutor in that when and import or upload is done, the <head> info is stripped off, so the javascript functions are not included in the upload. My files do have the javascript functions in the <head> section of the file.

    Is there an easy way to fix this (other than editting every file and pasting in a <head> section after doing the upload)? (There are only a couple of functions that are used)

    maurice

  • 2005-08-19 08:30:47

    Javascript removed

    Only content between the body elements are imported as ATutor content. We have a todo item to extract Javascript and stylesheets from the head of imported content and restore them when the content is displayed in ATutor.

    Pasting the Javascript into the body of a content page after its been imported into ATutor, is required for now.

  • 2005-08-19 13:29:06

    Javascript removed

    thanks Greg.

    now to resolve the path problems with the javascript referenced resources. see thread Pictures, graphics do not import (http://atutor.ca/view/7/3945/1.html)

    maurice