Advertisement
Guest User

Untitled

a guest
Feb 10th, 2018
1,137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. <!DOCTYPE html>
  3. <!--[if lte IE 9 ]><html class="ie lt-ie9" lang="it-IT"> <![endif]-->
  4. <!--[if (gte IE 9)|!(IE)]><!--><html lang="it-IT"> <!--<![endif]-->
  5. <head>
  6.     <meta charset="UTF-8" />
  7.     <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
  8.     <link rel="profile" href="http://gmpg.org/xfn/11" />
  9.     <link rel="pingback" href="http://eni-learning.com/xmlrpc.php" />
  10.    
  11.         <link rel="shortcut icon" href="http://eni-learning.com/wp-content/uploads/2016/02/favicon.png    " />
  12.  
  13.     <!-- Retina/iOS favicon -->
  14.     <link rel="apple-touch-icon-precomposed" href="http://eni-learning.com/wp-content/uploads/2016/02/favicon-retina.png    " />
  15. <title>Player &#8211; ENI-learning</title>
  16. <link rel="alternate" type="application/rss+xml" title="ENI-learning &raquo; Feed" href="http://eni-learning.com/feed/" />
  17. <link rel="alternate" type="application/rss+xml" title="ENI-learning &raquo; Feed dei commenti" href="http://eni-learning.com/comments/feed/" />
  18.         <script type="text/javascript">
  19.             window._wpemojiSettings = {"baseUrl":"https:\/\/s.w.org\/images\/core\/emoji\/72x72\/","ext":".png","source":{"concatemoji":"http:\/\/eni-learning.com\/wp-includes\/js\/wp-emoji-release.min.js?ver=4.4.2"}};
  20.             !function(a,b,c){function d(a){var c,d=b.createElement("canvas"),e=d.getContext&&d.getContext("2d"),f=String.fromCharCode;return e&&e.fillText?(e.textBaseline="top",e.font="600 32px Arial","flag"===a?(e.fillText(f(55356,56806,55356,56826),0,0),d.toDataURL().length>3e3):"diversity"===a?(e.fillText(f(55356,57221),0,0),c=e.getImageData(16,16,1,1).data.toString(),e.fillText(f(55356,57221,55356,57343),0,0),c!==e.getImageData(16,16,1,1).data.toString()):("simple"===a?e.fillText(f(55357,56835),0,0):e.fillText(f(55356,57135),0,0),0!==e.getImageData(16,16,1,1).data[0])):!1}function e(a){var c=b.createElement("script");c.src=a,c.type="text/javascript",b.getElementsByTagName("head")[0].appendChild(c)}var f,g;c.supports={simple:d("simple"),flag:d("flag"),unicode8:d("unicode8"),diversity:d("diversity")},c.DOMReady=!1,c.readyCallback=function(){c.DOMReady=!0},c.supports.simple&&c.supports.flag&&c.supports.unicode8&&c.supports.diversity||(g=function(){c.readyCallback()},b.addEventListener?(b.addEventListener("DOMContentLoaded",g,!1),a.addEventListener("load",g,!1)):(a.attachEvent("onload",g),b.attachEvent("onreadystatechange",function(){"complete"===b.readyState&&c.readyCallback()})),f=c.source||{},f.concatemoji?e(f.concatemoji):f.wpemoji&&f.twemoji&&(e(f.twemoji),e(f.wpemoji)))}(window,document,window._wpemojiSettings);
  21.         </script>
  22.         <style type="text/css">
  23. img.wp-smiley,
  24. img.emoji {
  25.     display: inline !important;
  26.     border: none !important;
  27.     box-shadow: none !important;
  28.     height: 1em !important;
  29.     width: 1em !important;
  30.     margin: 0 .07em !important;
  31.     vertical-align: -0.1em !important;
  32.     background: none !important;
  33.     padding: 0 !important;
  34. }
  35. </style>
  36. <link rel='stylesheet' id='cookielawinfo-style-css'  href='http://eni-learning.com/wp-content/plugins/cookie-law-info/css/cli-style.css?ver=1.5.3' type='text/css' media='all' />
  37. <link rel='stylesheet' id='flatsome-icons-css'  href='http://eni-learning.com/wp-content/themes/flatsome/css/fonts.css?ver=2.8.5' type='text/css' media='all' />
  38. <link rel='stylesheet' id='flatsome-animations-css'  href='http://eni-learning.com/wp-content/themes/flatsome/css/animations.css?ver=2.8.5' type='text/css' media='all' />
  39. <link rel='stylesheet' id='flatsome-main-css-css'  href='http://eni-learning.com/wp-content/themes/flatsome/css/foundation.css?ver=2.8.5' type='text/css' media='all' />
  40. <link rel='stylesheet' id='flatsome-style-css'  href='http://eni-learning.com/wp-content/themes/Eni-learning/style.css?ver=2.8.5' type='text/css' media='all' />
  41. <link rel='stylesheet' id='flatsome-googlefonts-css'  href='//fonts.googleapis.com/css?family=Dancing+Script%3A300%2C400%2C700%2C900%7CRaleway%3A300%2C400%2C700%2C900%7COpen+Sans%3A300%2C400%2C700%2C900%7CRaleway%3A300%2C400%2C700%2C900&#038;subset=latin&#038;ver=4.4.2' type='text/css' media='all' />
  42. <script type='text/javascript' src='http://eni-learning.com/wp-includes/js/jquery/jquery.js?ver=1.11.3'></script>
  43. <script type='text/javascript' src='http://eni-learning.com/wp-includes/js/jquery/jquery-migrate.min.js?ver=1.2.1'></script>
  44. <script type='text/javascript' src='http://eni-learning.com/wp-content/plugins/cookie-law-info/js/cookielawinfo.js?ver=1.5.3'></script>
  45. <link rel='https://api.w.org/' href='http://eni-learning.com/wp-json/' />
  46. <link rel="EditURI" type="application/rsd+xml" title="RSD" href="http://eni-learning.com/xmlrpc.php?rsd" />
  47. <link rel="wlwmanifest" type="application/wlwmanifest+xml" href="http://eni-learning.com/wp-includes/wlwmanifest.xml" />
  48. <meta name="generator" content="WordPress 4.4.2" />
  49. <meta name="generator" content="WooCommerce 2.6.13" />
  50. <link rel="canonical" href="http://eni-learning.com/player/" />
  51. <link rel='shortlink' href='http://eni-learning.com/?p=905' />
  52. <link rel="alternate" type="application/json+oembed" href="http://eni-learning.com/wp-json/oembed/1.0/embed?url=http%3A%2F%2Feni-learning.com%2Fplayer%2F" />
  53. <link rel="alternate" type="text/xml+oembed" href="http://eni-learning.com/wp-json/oembed/1.0/embed?url=http%3A%2F%2Feni-learning.com%2Fplayer%2F&#038;format=xml" />
  54. <!--[if lt IE 9]><link rel="stylesheet" type="text/css" href="http://eni-learning.com/wp-content/themes/flatsome/css/ie8.css"><script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script><script>var head = document.getElementsByTagName('head')[0],style = document.createElement('style');style.type = 'text/css';style.styleSheet.cssText = ':before,:after{content:none !important';head.appendChild(style);setTimeout(function(){head.removeChild(style);}, 0);</script><![endif]-->        <style type="text/css">.recentcomments a{display:inline !important;padding:0 !important;margin:0 !important;}</style>
  55.         <!-- Custom CSS Codes --><style type="text/css"> .top-bar-nav a.nav-top-link,body,p,#top-bar,.cart-inner .nav-dropdown,.nav-dropdown{font-family:Open Sans,helvetica,arial,sans-serif}.header-nav a.nav-top-link, a.cart-link, .mobile-sidebar a{font-family:Raleway,helvetica,arial,sans-serif}h1,h2,h3,h4,h5,h6{font-family:Raleway,helvetica,arial,sans-serif}.alt-font{font-family:Dancing Script,Georgia,serif!important;} #masthead{ height:109px;}#logo a img{ max-height:79px} .logo-center #masthead #logo{width:19.444444444444%}.logo-center #masthead .left-links, .logo-center #masthead .right-links{width:40.277777777778%}#masthead #logo a{max-width:210px} #masthead.stuck.move_down{height:70px;}.wide-nav.move_down{top:70px;}#masthead.stuck.move_down #logo a img{ max-height:60px } ul.header-nav li a {font-size:80%} #masthead{background-color:#fff; ;} .slider-nav-reveal .flickity-prev-next-button, #main-content{background-color:#FFF!important} .wide-nav {background-color:#ffffff} #top-bar{background-color:#ffffff }.header-nav li.mini-cart.active .cart-icon strong{background-color:#ffd100 } .ux-timer-text.primary span .alt-button.primary,.callout.style3 .inner .inner-text,.add-to-cart-grid .cart-icon strong,.tagcloud a,.navigation-paging a, .navigation-image a ,ul.page-numbers a, ul.page-numbers li > span,#masthead .mobile-menu a,.alt-button, #logo a, li.mini-cart .cart-icon strong,.widget_product_tag_cloud a, .widget_tag_cloud a,.post-date,#masthead .mobile-menu a.mobile-menu a,.checkout-group h3,.order-review h3 {color:#ffd100;}button[disabled], .button[disabled],button[disabled]:hover, .button[disabled]:hover, .ux-timer.primary span, .slider-nav-circle .flickity-prev-next-button:hover svg, .slider-nav-circle .flickity-prev-next-button:hover .arrow, .ux-box.ux-text-badge:hover .ux-box-text, .ux-box.ux-text-overlay .ux-box-image,.ux-header-element a:hover,.featured-table.ux_price_table .title,.scroll-to-bullets a strong,.scroll-to-bullets a.active,.scroll-to-bullets a:hover,.tabbed-content.pos_pills ul.tabs li.active a,.ux_hotspot,ul.page-numbers li > span,.label-new.menu-item a:after,.add-to-cart-grid .cart-icon strong:hover,.text-box-primary, .navigation-paging a:hover, .navigation-image a:hover ,.next-prev-nav .prod-dropdown > a:hover,ul.page-numbers a:hover,.widget_product_tag_cloud a:hover,.widget_tag_cloud a:hover,.custom-cart-count,.iosSlider .sliderNav a:hover span, li.mini-cart.active .cart-icon strong,.product-image .quick-view, .product-image .product-bg, #submit, button, #submit, button, .button, input[type="submit"],li.mini-cart.active .cart-icon strong,.post-item:hover .post-date,.blog_shortcode_item:hover .post-date,.column-slider .sliderNav a:hover,.ux_banner {background-color:#ffd100}button[disabled], .button[disabled],.slider-nav-circle .flickity-prev-next-button:hover svg, .slider-nav-circle .flickity-prev-next-button:hover .arrow, .ux-header-element a:hover,.featured-table.ux_price_table,.text-bordered-primary,.callout.style3 .inner,ul.page-numbers li > span,.add-to-cart-grid .cart-icon strong, .add-to-cart-grid .cart-icon-handle,.add-to-cart-grid.loading .cart-icon strong,.navigation-paging a, .navigation-image a ,ul.page-numbers a ,ul.page-numbers a:hover,.post.sticky,.widget_product_tag_cloud a, .widget_tag_cloud a,.next-prev-nav .prod-dropdown > a:hover,.iosSlider .sliderNav a:hover span,.column-slider .sliderNav a:hover,.woocommerce .order-review, .woocommerce-checkout form.login,.button, button, li.mini-cart .cart-icon strong,li.mini-cart .cart-icon .cart-icon-handle,.post-date{border-color:#ffd100;}.ux-loading{border-left-color:#ffd100;}.primary.alt-button:hover,.button.alt-button:hover{background-color:#ffd100!important}.flickity-prev-next-button:hover svg, .flickity-prev-next-button:hover .arrow, .featured-box:hover svg, .featured-img svg:hover{fill:#ffd100!important;}.slider-nav-circle .flickity-prev-next-button:hover svg, .slider-nav-circle .flickity-prev-next-button:hover .arrow, .featured-box:hover .featured-img-circle svg{fill:#FFF!important;}.featured-box:hover .featured-img-circle{background-color:#ffd100!important; border-color:#ffd100!important;} .star-rating:before, .woocommerce-page .star-rating:before, .star-rating span:before{color:#d26e4b}.secondary.alt-button,li.menu-sale a{color:#d26e4b!important}.secondary-bg.button.alt-button.success:hover,.label-sale.menu-item a:after,.mini-cart:hover .custom-cart-count,.callout .inner,.button.secondary,.button.checkout,#submit.secondary, button.secondary, .button.secondary, input[type="submit"].secondary{background-color:#d26e4b}.button.secondary,.button.secondary{border-color:#d26e4b;}.secondary.alt-button:hover{color:#FFF!important;background-color:#d26e4b!important}ul.page-numbers li > span{color:#FFF;} .callout.style3 .inner.success-bg .inner-text,.woocommerce-message{color:#7a9c59!important}.success-bg,.woocommerce-message:before,.woocommerce-message:after{color:#FFF!important; background-color:#7a9c59}.label-popular.menu-item a:after,.add-to-cart-grid.loading .cart-icon strong,.add-to-cart-grid.added .cart-icon strong{background-color:#7a9c59;border-color:#7a9c59;}.add-to-cart-grid.loading .cart-icon .cart-icon-handle,.add-to-cart-grid.added .cart-icon .cart-icon-handle{border-color:#7a9c59}.label-new.menu-item > a:after{content:"New";}.label-hot.menu-item > a:after{content:"Hot";}.label-sale.menu-item > a:after{content:"Sale";}.label-popular.menu-item > a:after{content:"Popular";}.featured_item_image{max-height:250px}.callout .inner.callout-new-bg{background-color:#7a9c59!important;}.callout.style3 .inner.callout-new-bg{background-color:none!important;border-color:#7a9c59!important} div {}</style></head>
  56.  
  57. <body class="page page-id-905 page-template page-template-page-blank-container page-template-page-blank-container-php antialiased logo-center breadcrumb-normal full-width">
  58.  
  59.  
  60.     <div id="wrapper">
  61.         <div class="header-wrapper before-sticky">
  62.                 <div id="top-bar">
  63.             <div class="row">
  64.                 <div class="large-12 columns">
  65.                     <!-- left text -->
  66.                     <div class="left-text left">
  67.                         <div class="html"></div><!-- .html -->
  68.                     </div>
  69.                     <!-- top bar right -->
  70.                     <div class="right-text right">
  71.  
  72.                             <ul id="menu-top-bar-menu" class="top-bar-nav">
  73.                                
  74.                                    
  75.                                    
  76.                                                                 </ul>
  77.                     </div><!-- top bar right -->
  78.  
  79.                 </div><!-- .large-12 columns -->
  80.             </div><!-- .row -->
  81.         </div><!-- .#top-bar -->
  82.                 <header id="masthead" class="site-header" role="banner">
  83.             <div class="row">
  84.                 <div class="large-12 columns header-container">
  85.                     <div class="mobile-menu show-for-small">
  86.                         <a href="#jPanelMenu" class="off-canvas-overlay" data-pos="left" data-color="light"><span class="icon-menu"></span></a>
  87.                     </div><!-- end mobile menu -->
  88.  
  89.                    
  90.                     <div class="left-links">
  91.                          
  92.                         <div class="wide-nav-search hide-for-small">
  93.                                                        
  94.                             <div>
  95.                                                             </div>
  96.                         </div>
  97.                        
  98.  
  99.                                             </div><!-- .left-links -->
  100.  
  101.                      
  102.                     <div id="logo" class="logo-center">
  103.                         <a href="http://eni-learning.com/" title="ENI-learning - Alternanza scuola/lavoro" rel="home">
  104.                             <img src="http://eni-learning.com/wp-content/uploads/2016/02/logo-enilearning.png" class="header_logo " alt="ENI-learning"/>                        </a>
  105.                     </div><!-- .logo -->
  106.                    
  107.                     <div class="right-links">
  108.                         <ul  class="header-nav">
  109.                            
  110.                        
  111.                            
  112.                                                
  113.                                                
  114.                     <!-- Show mini cart if Woocommerce is activated -->
  115.  
  116.                        
  117.                                     </ul><!-- .header-nav -->
  118.             </div><!-- .right-links -->
  119.         </div><!-- .large-12 -->
  120.     </div><!-- .row -->
  121.  
  122.  
  123. </header><!-- .header -->
  124.  
  125. <!-- Main navigation - Full width style -->
  126. <div class="wide-nav light nav-center">
  127.     <div class="row">
  128.         <div class="large-12 columns">
  129.         <div class="nav-wrapper">
  130.         <ul id="site-navigation" class="header-nav">
  131.                                     <li id="menu-item-714" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-714"><a href="http://eni-learning.com/progetto/" class="nav-top-link">Progetto</a></li>
  132. <li id="menu-item-733" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-733"><a href="http://eni-learning.com/contenuti/" class="nav-top-link">Contenuti</a></li>
  133. <li id="menu-item-737" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-737"><a href="http://eni-learning.com/corso/" class="nav-top-link">Corso</a></li>
  134. <li id="menu-item-959" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-959"><a href="http://eni-learning.com/faq/" class="nav-top-link">Faq</a></li>
  135. <li id="menu-item-715" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-715"><a href="http://eni-learning.com/contatti/" class="nav-top-link">Contatti</a></li>
  136.  
  137.                                                            
  138.         </ul>
  139.                 </div><!-- .nav-wrapper -->
  140.         </div><!-- .large-12 -->
  141.     </div><!-- .row -->
  142. </div><!-- .wide-nav -->
  143. </div><!-- .header-wrapper -->
  144.  
  145. <div id="main-content" class="site-main hfeed light">
  146.  
  147.  
  148. <!-- woocommerce message -->
  149.  
  150. <div class="page-header">
  151.     <div style="height:200px;">
  152. <div style="z-index:999;position:absolute;top:160;left:50%;margin-left:-150px;text-align:center;font-size:36px;color:#fff;line-height:200px;width:300px;font-weight:bold;">Il corso</div>
  153. <p><img src="http://eni-learning.com//wp-content/uploads/2016/03/corso.jpg" style="height:200px;width:100%">
  154. </div>
  155. </div>
  156.  
  157. <div  class="page-wrapper">
  158. <div class="row">
  159. <div id="content" class="large-12 columns" role="main">
  160.  
  161.        
  162.            
  163.                
  164. <!DOCTYPE html>
  165. <html>
  166.     <head>
  167.     <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
  168.     <title>SimpleAPI for SCORM 1.2</title>
  169.     <link href='http://fonts.googleapis.com/css?family=Leckerli+One' rel='stylesheet' type='text/css'>
  170.     <script type="text/javascript">
  171.     (function(){
  172.    
  173.         this._VERSION = "2.2.20130225";
  174.        
  175.         /*
  176.         pdf SCHEMA A PAG 67
  177.        
  178.         //API Firma
  179.         LMSInitialize( "" ) : bool – Inizia una sessione di comunicazione con l'LMS.
  180.         LMSFinish( "" ) : bool – Termina una sessione di comunicazione con l'LMS.
  181.         LMSGetValue( elemento : CMIElement ) : stringa – Recupera un valore dalla LMS.
  182.         LMSSetValue( elemento : CMIElement, valore : stringa) : stringa – Salva un valore al LMS.
  183.         LMSCommit( "" ) : bool – Indica al sistema LMS che tutti i dati dovrebbero essere mantenuti (non richiesta).
  184.         LMSGetLastError() : CMIErrorCode – Restituisce il codice di errore che ha portato dalla chiamata API ultima.
  185.         LMSGetErrorString( errorCode : CMIErrorCode ) : stringa – Restituisce una breve stringa che descrive il codice di errore specificato.
  186.         LMSGetDiagnostic( errorCode : CMIErrorCode ) : stringa – Restituisce informazioni dettagliate su l'ultimo errore che si è verificato.
  187.        
  188.         //Data Model
  189.         cmi.core._children (student_id, student_name, lesson_location, credito, lesson_status, ingresso, punteggio, TOTAL_TIME, lesson_mode, uscita, sessione_idcss, RO) Elenco di elementi di dati supportati modello
  190.         cmi.core.student_id (CMIString (SPM: 255), RO) Identifica lo studente per conto dei quali la SCO è stato lanciato
  191.         cmi.core.student_name (CMIString (SPM: 255), RO) Denominazione prevista per lo studente dalla LMS
  192.         cmi.core.lesson_location (CMIString (SPM: 255), RW) Posizione corrente dello studente nella SCO
  193.         cmi.core.credit ("credito", "no-credito", RO) Indica se lo studente sarà accreditato per le prestazioni nel SCO
  194.         cmi.core.lesson_status ("passato", "completato", "mancato", "incompleto", "naviga", "non tentò", RW) Indica se lo studente ha completato e soddisfatti i requisiti per la SCO
  195.         cmi.core.entry ("ab-initio", "riprendere", "", RO) Asserisce se lo studente ha già accesso al SCO
  196.         cmi.core.score_children (crudo,il mio,max, RO) Elenco di elementi di dati supportati modello
  197.         cmi.core.score.raw (CMIDecimal, RW) Numero che riflette la performance del discente rispetto alla gamma delimitata dai valori minimi e massimi
  198.         cmi.core.score.max (CMIDecimal, RW) Valore massimo nel range per il punteggio grezzo
  199.         cmi.core.score.min (CMIDecimal, RW) Valore minimo della gamma per il punteggio grezzo
  200.         cmi.core.total_time (CMITimespan, RO) Somma di tutti i tempi della sessione lo studente ha accumulato nel tentativo studente corrente
  201.         cmi.core.lesson_mode ("sfogliare", "normale", "recensione", RO) Identifica uno dei tre possibili modi in cui la SCO possono essere presentate al discente
  202.         cmi.core.exit ("time-out", "sospendere", "Logout", "", DOVE) Indica come o perché lo studente ha lasciato il SCO
  203.         cmi.core.session_time (CMITimespan, DOVE) Quantità di tempo che lo studente ha trascorso nella sessione corrente discente per questo SCO
  204.         cmi.suspend_data (CMIString (SPM: 4096), RW) Offre spazio per archiviare e recuperare i dati tra le sessioni studente
  205.         cmi.launch_data (CMIString (SPM: 4096), RO) Dati forniti da uno SCO dopo il lancio, inizializzato dall'elemento manifestano dataFromLMS
  206.         cmi.comments (CMIString (SPM: 4096), RW) Di input testuale da parte dello studente circa la SCO
  207.         cmi.comments_from_lms (CMIString (SPM: 4096), RO) Commenti o annotazioni associate con un SCO
  208.         cmi.objectives._children (id,punteggio,stato, RO) Elenco di elementi di dati supportati modello
  209.         cmi.objectives._count (intero non negativo, RO) Numero attuale di obiettivi essere memorizzati dal LMS
  210.         cmi.objectives.n.id (CMIIdentifier, RW) Un'etichetta univoca per l'obiettivo
  211.         cmi.objectives.n.score._children (crudo,il mio,max, RO) Elenco di elementi di dati supportati modello
  212.         cmi.objectives.n.score.raw (CMIDecimal, RW) Numero che riflette la performance del discente, per l'obiettivo, rispetto alla gamma delimitata dai valori minimi e massimi
  213.         cmi.objectives.n.score.max (CMIDecimal, Rw) Valore massimo, per l'obiettivo, nel range per il punteggio grezzo
  214.         cmi.objectives.n.score.min (CMIDecimal, RW) Valore minimo, per l'obiettivo, nel range per il punteggio grezzo
  215.         cmi.objectives.n.status ("passato", "completato", "mancato", "incompleto", "naviga", "non tentò", RW) Indica se lo studente ha completato o soddisfatto l'obiettivo
  216.         cmi.student_data._children (mastery_score, max_time_allowed, time_limit_action, RO) Elenco di elementi di dati supportati modello
  217.         cmi.student_data.mastery_score (CMIDecimal, RO) Punteggio di passaggio necessario per padroneggiare la SCO
  218.         cmi.student_data.max_time_allowed (CMITimespan, RO) Quantità di tempo accumulato lo studente è autorizzato ad utilizzare uno SCO
  219.         cmi.student_data.time_limit_action (uscita,messaggio," "uscita,nessun messaggio"," continuare,messaggio", "continuare, nessun messaggio", RO) Indica che la SCO dovrebbe fare quando si supera max_time_allowed
  220.         cmi.student_preference._children (audio,lingua,velocità,testo, RO) Elenco di elementi di dati supportati modello
  221.         cmi.student_preference.audio (CMISInteger, RW) Specifica un cambiamento che si intende a livello audio percepita
  222.         cmi.student_preference.language (CMIString (SPM: 255), RW) Lingua preferita dello studente per SCO con funzionalità multilingue
  223.         cmi.student_preference.speed (CMISInteger, RW) Velocità preferita del discente relativa di content delivery
  224.         cmi.student_preference.text (CMISInteger, RW) Specifica se il testo delle didascalie corrispondente audio viene visualizzato
  225.         cmi.interactions._children (id,obiettivi,tempo,tipo,correct_responses,ponderazione,student_response,risultato,latenza, RO) Elenco di elementi di dati supportati modello
  226.         cmi.interactions._count (CMIInteger, RO) Attuale numero di interazioni essere memorizzati dal LMS
  227.         cmi.interactions.n.id (CMIIdentifier, DOVE) Un'etichetta univoca per l'interazione
  228.         cmi.interactions.n.objectives._count (CMIInteger, RO) Numero attuale di obiettivi (i.e., identificatori obiettivo) essere memorizzati dal sistema LMS per questa interazione
  229.         cmi.interactions.n.objectives.n.id (CMIIdentifier, DOVE) Etichetta per obiettivi associati con l'interazione
  230.         cmi.interactions.n.time (CMITime, DOVE) Momento in cui l'interazione è stato messo a disposizione dello studente per l'interazione degli studenti e risposta
  231.         cmi.interactions.n.type ("vero-falso", "scelta", "fill-in", "corrispondenza", "performance", "sequenziamento", "Likert", "numerico", DOVE) Quale tipo di interazione è registrato
  232.         cmi.interactions.n.correct_responses._count (CMIInteger, RO) Attuale numero di risposte corrette essere memorizzati dal sistema LMS per questa interazione
  233.         cmi.interactions.n.correct_responses.n.pattern (formato dipende dal tipo di interazione, DOVE) Un modello di risposta corretta per l'interazione
  234.         cmi.interactions.n.weighting (CMIDecimal, DOVE) Peso dato alla interazione rispetto a altre interazioni
  235.         cmi.interactions.n.student_response (formato dipende dal tipo di interazione, DOVE) I dati generati quando uno studente risponde a una interazione
  236.         cmi.interactions.n.result ("corretto", "sbagliato", "impreviste", "neutrale", "xx [CMIDecimal]", DOVE) Sentenza della correttezza della risposta discente
  237.         cmi.interactions.n.latency (CMITimespan, DOVE) Tempo intercorso tra il momento è stata fatta l'interazione a disposizione del discente per la risposta e il tempo della prima risposta
  238.        
  239.         //Codici di errore
  240.         Nessun errore (0) Nessun errore, la precedente chiamata API ha avuto successo.
  241.         Eccezione generale (101) Nessun codice di errore specifico esiste per descrivere l'errore. Usa LMSGetDiagnostic per maggiori informazioni.
  242.         Argomento non valido errore (201) Indica che un argomento rappresenta un valido modello di dati o elementi altrimenti non corretta.
  243.         Elemento non può avere figli (202) Indica che LMSGetValue è stato chiamato con un nome di elemento del modello dati che finiscono in "_children" per un elemento del modello di dati che non supporta il "_children" suffisso.
  244.         Elemento non è un array. Non può avere contano. (203) Indica che LMSGetValue è stato chiamato con un nome di elemento del modello dati che finiscono in "_count" per un elemento del modello di dati che non supporta il "_count" suffisso.
  245.         Non inizializzata (301) Indica che una chiamata API è stata fatta prima della chiamata a LMSInitialize.
  246.         Non implementato errore (401) L'elemento di modello di dati indicati in una chiamata a LMSGetValue o LMSSetValue è valido, ma non è stata attuata da questo LMS. SCORM 1.2 definisce un insieme di elementi del modello dati è facoltativo per un LMS per implementare.
  247.         Impostare un valore non valido, elemento è una parola chiave (402) Indica che LMSSetValue è stato chiamato su un elemento del modello di dati che rappresenta una parola chiave (elementi che terminano con "_children" e "_count").
  248.         Elemento è di sola lettura. (403) LMSSetValue è stato chiamato con un elemento di modello di dati che possono essere letti solo.
  249.         Elemento è scrivere solo (404) LMSGetValue è stato chiamato su un elemento del modello dati che possono essere scritti solo per.
  250.         Tipo di dati non corretti (405) LMSSetValue è stato chiamato con un valore che non è compatibile con il formato di dati dell'elemento dati forniti modello.
  251.         */
  252.        
  253.         /*
  254.          * SimpleAPI for SCORM 1.2
  255.          * --------------------------------------------------
  256.        
  257.          * Option Defaults
  258.          * --------------------------------------------------
  259.          */
  260.    
  261.         // Should we skip the automatic manifest check?
  262.         this.skipManifestCheck = false;
  263.    
  264.         // The SCO's *default* launch file
  265.         this.launchFile = 'default.htm';
  266.    
  267.         // The *default* name of the cookie to be used within this session
  268.         this.cookieName = 'SimpleAPI_Data_'+_VERSION;
  269.    
  270.         // Should the *default* cookie name use the name of the parent folder instead?
  271.         this.useParentFolderAsCookieName = true;
  272.    
  273.         // Shall we close SCO on LMSFinish?
  274.         this.closeOnFinish = true;
  275.    
  276.         // The width of the SCO window when launched
  277.         this.wWidth = 1024;
  278.    
  279.         // The height of the SCO window when launched
  280.         this.wHeight = 768;
  281.    
  282.         // SCO window default features
  283.         this.wToolbar = false;
  284.         this.wTitlebar = false;
  285.         this.wLocation = true;
  286.         this.wStatus = true;
  287.         this.wScrollbars = true;
  288.         this.wResizable = true;
  289.         this.wMenubar = false;
  290.    
  291.         // Default value for the search string option
  292.         this.defaultSearchString = '?embedded=true';
  293.    
  294.         // Default values for the custom API key/value pair injection option
  295.         this.defaultCustomApiKey = 'SomeCustomKey';
  296.         this.defaultCustomApiValue = 'SomeCustomValue';
  297.    
  298.         // Default state of the SCORM API if one cannot be pulled from the
  299.         // data cookie.  Change values below if you wish to test a SCO
  300.         // being launched in a specific state.  Ensure you reset it back
  301.         // to the defaults already present below when finished testing
  302.         // to avoid the appearance of unexpected behaviors within the SCO
  303.         // in subsequent tests...
  304.         this.initialState = {
  305.             'cmi.core._children':'student_id,student_name,lesson_status,lesson_location,lesson_mode,score,credit,entry,exit,session_time,total_time',
  306.             'cmi.core.score._children':'raw',
  307.             'cmi.core.student_id':'29448',
  308.             'cmi.core.student_name':'1811-05',
  309.             'cmi.core.lesson_status':'incomplete',
  310.             'cmi.core.score.raw':'0',
  311.             'cmi.core.lesson_location':'0',
  312.             'cmi.suspend_data':'',
  313.             'cmi.core.session_time':'00:00:00',
  314.             'cmi.core.total_time':'0000:00:00',
  315.             'cmi.core.credit':'credit', /* "credit" or "no-credit" */
  316.             'cmi.core.entry':'ab-initio', /* "resume" or "ab-initio" */
  317.             'cmi.core.lesson_mode':'normal', /* "browse",  "normal" or "review" */
  318.             'cmi.core.exit':'' /* "time-out", "suspend" or "logout" */
  319.         };
  320.        
  321.         /*
  322.          * Do not touch anything below
  323.          * --------------------------------------------------
  324.          */
  325.         this.scoWin;
  326.         this.API;
  327.         this.hasTerminated = false;
  328.         this.hasInitialized = false;
  329.         this.optionsOpen = true;
  330.         this.initTimeoutMax = 20000;
  331.         this.initTimeout = 0;
  332.         this.fullPath = document.location.href.substr(0,document.location.href.lastIndexOf('/'))
  333.         this.parentFolder = fullPath.substr(fullPath.lastIndexOf('/')+1,fullPath.length);
  334.         this.timeoutErrorDisplayed = false;
  335.         this.launchWithEmbeddedParam = false;
  336.         this.launchWithCustomApiProperty = false;
  337.         this.storageObject;
  338.    
  339.         this.SimpleAPI = function(cookiename,api,initData)
  340.         {
  341.             this.api = api;
  342.             this.initData = initData;
  343.             this.__data = null;
  344.             this.cookiename = cookiename;
  345.             this.initialized = false;
  346.             this.terminated = false;
  347.             this.lastError = "0";
  348.             this.lastCmd = '';
  349.    
  350.             this.logCommand=function()
  351.             {
  352.                 Utils.log(this.lastCmd,'entry');
  353.                 var lasterr = this.api.LMSGetLastError();
  354.                 if (lasterr != '0')
  355.                 {
  356.                     var errorstr = this.api.LMSGetErrorString(lasterr);
  357.                     var diag = this.api.LMSGetDiagnostic(lasterr);
  358.                     var msg = "Error Calling: " + this.lastCmd + "<br>";
  359.                     msg += "LMSGetLastError() = " + lasterr + "<br>";
  360.                     msg += "LMSGetErrorString('" + lasterr + "') = " + errorstr + "<br>";
  361.                     msg += "LMSGetDiagnostic('" + lasterr + "') = " + diag;
  362.                     Utils.log(msg,'error');
  363.                 }
  364.             };
  365.    
  366.             // LMSInitialize
  367.             this.LMSInitialize=function(arg)
  368.             {
  369.                 var success = this.api.LMSInitialize(arg);
  370.                 this.lastCmd = "LMSInitialize('" + arg + "') = " + success;
  371.                 this.logCommand();
  372.                 this.initialized = (success === 'true') ? true : false;
  373.                 if(this.initialized)
  374.                 {
  375.                     this.terminated = false;
  376.                     hasInitialized = true;
  377.                     for(var o in this.api)
  378.                     {
  379.                         if(typeof this.api[o] != 'function')
  380.                         {
  381.                             this[o] = this.api[o];
  382.                         }
  383.                     }
  384.    
  385.                     this.__data = Utils.getInitAPIData(this.initData);
  386.                     for(var el in this.__data)
  387.                     {
  388.                         loadDataIntoModel(el,this.__data[el]);
  389.                     }
  390.                 }
  391.                 return success;
  392.             };
  393.    
  394.             // LMSFinish
  395.             this.LMSFinish=function(arg)
  396.             {
  397.                 var success = this.api.LMSFinish(arg);
  398.                 this.lastCmd = "LMSFinish('" + arg + "') = " + success;
  399.                 this.logCommand();
  400.                
  401.                 if(success === 'true')
  402.                 {
  403.                     this.initialized = false;
  404.                     this.terminated = true;
  405.                     hasTerminated = true;
  406.                     if(this.__data['cmi.core.session_time'] && (this.__data['cmi.core.session_time'].length > 0))
  407.                     {
  408.                         if(this.__data['cmi.core.total_time'] == null || this.__data['cmi.core.total_time'] == '')
  409.                         {
  410.                             this.__data['cmi.core.total_time'] = '00:00:00';
  411.                         }
  412.                         var totalTime = Utils.addTime(this.__data['cmi.core.total_time'], this.__data['cmi.core.session_time']);
  413.                         this.__data['cmi.core.total_time'] = totalTime;
  414.                        
  415.                         var cdata = this.__data.toJSONString();
  416.                         storageObject.persist(this.cookiename,cdata,365);
  417.                        
  418.                         Utils.log('Total Time (cmi.core.total_time): '+totalTime,'info');
  419.                     }
  420.    
  421.                     if(closeOnFinish)
  422.                     {
  423.                         if(scoWin && !scoWin.closed)
  424.                         {
  425.                             Utils.closeSCO();
  426.                         }
  427.                     }
  428.                 }
  429.                 return success;
  430.             };
  431.    
  432.             // LMSGetValue
  433.             this.LMSGetValue=function(name)
  434.             {
  435.                 var value = unescape(this.api.LMSGetValue(name));
  436.                 this.lastCmd = "LMSGetValue('" + name + "') = " + value;
  437.                 this.logCommand();
  438.                
  439.                 return value;
  440.             };
  441.    
  442.             // LMSSetValue
  443.             this.LMSSetValue=function(name, value)
  444.             {
  445.                 var success = this.api.LMSSetValue(name, escape(value));
  446.                 this.lastCmd = "LMSSetValue('" + name + "','" + value + "') = " + success;             
  447.                 this.logCommand();
  448.                                        
  449.                 if(success === 'true')
  450.                 {
  451.                     this.__data[name] = value;
  452.                     //---------------------------------------------------------------------
  453.                     if(value != ''){
  454.                         xmlhttpPost('http://eni-learning.com/php-custom/ajax/save-scorm.php','save','save',
  455.                                                                     'id_u','29448',
  456.                                                                     'id_l','6',
  457.                                                                     'id_sc_e','41',
  458.                                                                     'name',name,
  459.                                                                     'value',value);
  460.                     }
  461.                     //---------------------------------------------------------------------
  462.                 }
  463.                
  464.                 return success;
  465.             };
  466.    
  467.             // LMSCommit
  468.             this.LMSCommit=function(arg)
  469.             {
  470.                 var success = this.api.LMSCommit(arg);
  471.                 this.lastCmd = "LMSCommit('" + arg + "') = " + success;
  472.                 this.logCommand();
  473.                
  474.                 if(success === 'true')
  475.                 {
  476.                     var cdata = this.__data.toJSONString();
  477.                     storageObject.persist(this.cookiename,cdata,365);
  478.                 }
  479.                
  480.                 return success;
  481.             };
  482.    
  483.             // LMSGetErrorString
  484.             this.LMSGetErrorString=function(arg)
  485.             {
  486.                 var errorstr = this.api.LMSGetErrorString(arg);
  487.                 Utils.log("LMSGetErrorString('" + arg + "') = " + errorstr,'entry');
  488.                 return errorstr;
  489.             };
  490.    
  491.             // LMSGetLastError
  492.             this.LMSGetLastError=function()
  493.             {
  494.                 var lasterr = this.api.LMSGetLastError();
  495.                 Utils.log("LMSGetLastError() = " + lasterr,'entry');
  496.                 return lasterr;
  497.             };
  498.    
  499.             // LMSGetDiagnostic
  500.             this.LMSGetDiagnostic=function(arg)
  501.             {
  502.                 var diag = this.api.LMSGetDiagnostic(arg);
  503.                 Utils.log("LMSGetDiagnostic('" + arg + "') = " + diag,'entry');
  504.                 return diag;
  505.             };
  506.         };
  507.    
  508.         // Utilities
  509.         // ----------------------------------------------------------------------------
  510.         this.Utils = {
  511.             getInitAPIData:function(initData)
  512.             {
  513.                 if(storageObject.retrieve(API.cookiename) !== null && storageObject.retrieve(API.cookiename) !== undefined)
  514.                 {
  515.                     return storageObject.retrieve(API.cookiename).parseJSON();
  516.                 }
  517.                 else
  518.                 {
  519.                     return initData;
  520.                 }
  521.             },
  522.             dumpAPI:function()
  523.             {
  524.                 if(API.__data)
  525.                 {
  526.                     Utils.log('<b>Dumping API object:</b> <blockquote> ' + this.formatAPIData(API.__data.toJSONString()) + '</blockquote>','info');
  527.                 }
  528.                 else
  529.                 {
  530.                     Utils.log('ERROR: API object contains no data.','error');
  531.                 }
  532.             },
  533.    
  534.             dumpExistingAPIData:function()
  535.             {
  536.                 if(storageObject.retrieve(cookieName) !== undefined && storageObject.retrieve(cookieName) !== null)
  537.                 {
  538.                     var existingData = storageObject.retrieve(cookieName);
  539.                     Utils.log('<b>Existing API Data (from '+storageObject.toString()+' &quot;'+cookieName+'&quot; - To be used in API during initialization):</b> <blockquote> ' + this.formatAPIData(existingData) + '</blockquote>','info');
  540.                 }
  541.                 else
  542.                 {
  543.                     Utils.log('No Existing API data found in &quot;'+cookieName+'&quot;. Will use default init data.','info');
  544.                 }
  545.             },
  546.    
  547.             formatAPIData:function(str)
  548.             {
  549.                 var html;
  550.                 html = this.replaceAll(str, '{"', '{<br>"');
  551.                 html = this.replaceAll(html, '"}', '"<br>}');
  552.                 html = this.replaceAll(html, '","', '",<br>"');
  553.    
  554.                 return html;
  555.             },
  556.    
  557.             replaceAll:function(text, strA, strB)
  558.             {
  559.                 return text.replace( new RegExp(strA,"g"), strB );    
  560.             },
  561.    
  562.             addTime:function(first, second)
  563.             {
  564.                 var sFirst = first.split(":");
  565.                 var sSecond = second.split(":");
  566.                 var cFirst = sFirst[2].split(".");
  567.                 var cSecond = sSecond[2].split(".");
  568.                 var change = 0;
  569.    
  570.                 FirstCents = 0;  //Cents
  571.                 if (cFirst.length > 1) {
  572.                     FirstCents = parseInt(cFirst[1],10);
  573.                 }
  574.                 SecondCents = 0;
  575.                 if (cSecond.length > 1) {
  576.                     SecondCents = parseInt(cSecond[1],10);
  577.                 }
  578.                 var cents = FirstCents + SecondCents;
  579.                 change = Math.floor(cents / 100);
  580.                 cents = cents - (change * 100);
  581.                 if (Math.floor(cents) < 10) {
  582.                     cents = "0" + cents.toString();
  583.                 }
  584.    
  585.                 var secs = parseInt(cFirst[0],10)+parseInt(cSecond[0],10)+change;  //Seconds
  586.                 change = Math.floor(secs / 60);
  587.                 secs = secs - (change * 60);
  588.                 if (Math.floor(secs) < 10) {
  589.                     secs = "0" + secs.toString();
  590.                 }
  591.    
  592.                 mins = parseInt(sFirst[1],10)+parseInt(sSecond[1],10)+change;   //Minutes
  593.                 change = Math.floor(mins / 60);
  594.                 mins = mins - (change * 60);
  595.                 if (mins < 10) {
  596.                     mins = "0" + mins.toString();
  597.                 }
  598.    
  599.                 hours = parseInt(sFirst[0],10)+parseInt(sSecond[0],10)+change;  //Hours
  600.                 if (hours < 10) {
  601.                     hours = "0" + hours.toString();
  602.                 }
  603.    
  604.                 if (cents != '0') {
  605.                     return hours + ":" + mins + ":" + secs + '.' + cents;
  606.                 } else {
  607.                     return hours + ":" + mins + ":" + secs;
  608.                 }
  609.             },
  610.             openWindow:function(winURL,winName,winW,winH,winOpts)
  611.             {
  612.                 winOptions = winOpts+",width=" + winW + ",height=" + winH;
  613.                 /*newWin = window.open(winURL,winName,winOptions);
  614.                 newWin.moveTo(0,0);
  615.                 newWin.focus();
  616.                 return newWin;*/
  617.                 window.open(winURL,'ifr-scorm');
  618.             },
  619.             log:function(status,style)
  620.             {
  621.                 var timeFix=function(time)
  622.                 {
  623.                     return (time<10) ? '0'+time : time;
  624.                 };
  625.                 var d = new Date();
  626.                 var hrs = timeFix(d.getHours());
  627.                 var min = timeFix(d.getMinutes());
  628.                 var sec = timeFix(d.getSeconds());
  629.                 var tmp = (style) ? '<div class="'+style+'">' : '<div class="entry">';
  630.                 tmp += '&gt; '+hrs+':'+min+':'+sec+' ';
  631.                 tmp += status;
  632.                 tmp += '</div>';
  633.                
  634.                 $('debug').innerHTML += tmp;
  635.                 $('debug').scrollTop = $('debug').scrollHeight;
  636.             },
  637.             clearCookieData:function()
  638.             {
  639.                 var cookieNameAltVal = $('cookieNameAlt').value;
  640.    
  641.                 if(cookieNameAltVal.length > 0)
  642.                 {
  643.                     if(storageObject.retrieve(cookieNameAltVal))
  644.                     {
  645.                         storageObject.remove(cookieNameAltVal);
  646.                         Utils.log(storageObject.toString()+'"'+$('cookieNameAlt').value+'" Cleared','info');
  647.                     }
  648.                     else
  649.                     {
  650.                         Utils.log(storageObject.toString()+'"'+$('cookieNameAlt').value+'" Not Found','error');
  651.                     }
  652.                 }
  653.                 else
  654.                 {
  655.                     if(storageObject.retrieve(cookieName))
  656.                     {
  657.                         storageObject.remove(cookieName);
  658.                         Utils.log(storageObject.toString()+'"'+cookieName+'" Cleared','info');
  659.                     }
  660.                     else
  661.                     {
  662.                         Utils.log(storageObject.toString()+'"'+cookieName+'" Not Found','error');
  663.                     }
  664.                 }
  665.             },
  666.             genNewSessionName:function()
  667.             {
  668.                 var d = new Date();
  669.                 var hrs = d.getHours();
  670.                 var min = d.getMinutes();
  671.                 var sec = d.getSeconds();
  672.    
  673.                 if(useParentFolderAsCookieName)
  674.                 {
  675.                     var tmp = parentFolder+'_';
  676.                 }
  677.                 else
  678.                 {
  679.                     var tmp = 'SimpleAPI_Data_';
  680.                 }
  681.                
  682.                 tmp += hrs+'.'+min+'.'+sec;
  683.    
  684.                 $('cookieNameAlt').value = tmp;
  685.             },
  686.             watchWin:function()
  687.             {
  688.                 if(scoWin && !scoWin.closed)
  689.                 {
  690.                     initTimeout += 1000;
  691.                     if(initTimeout >= initTimeoutMax)
  692.                     {
  693.                         if(!API.initialized && !timeoutErrorDisplayed)
  694.                         {
  695.                             this.log('ERROR: LMSInitialize not called within 20 seconds from launching.', 'error');
  696.                             timeoutErrorDisplayed = true;
  697.                         }
  698.                     }
  699.                    
  700.                     setTimeout(function(){Utils.watchWin()},1000);
  701.                 }
  702.                 else
  703.                 {
  704.                     this.log('SCO Closed','info');
  705.                     if(!hasInitialized)
  706.                     {
  707.                         this.log('ERROR: LMSInitialize was never called.', 'error');
  708.                     }
  709.                     if(!hasTerminated)
  710.                     {
  711.                         this.log('ERROR: LMSFinish was never called.', 'error');
  712.                     }
  713.                 }
  714.             },
  715.             launchSCO:function()
  716.             {
  717.                 // Reset the SimpleAPI
  718.                 hasTerminated = false;
  719.                 hasInitialized = false;
  720.                 API.terminated = false;
  721.                 API.initialized = false;
  722.                 initTimeout = 0;
  723.                 timeoutErrorDisplayed = false;
  724.                
  725.                 var launchFileAltVal = $('launchFileAlt').value;
  726.                 var cookieNameAltVal = $('cookieNameAlt').value;
  727.    
  728.                 if(launchFileAltVal.length > 0)
  729.                 {
  730.                     launchFile = launchFileAltVal;
  731.                     if(launchFileAltVal.indexOf(":") == 1)
  732.                     {
  733.                         launchFile = "file:///"+launchFile;
  734.                     }
  735.                 }
  736.    
  737.                 if(cookieNameAltVal.length > 0)
  738.                 {
  739.                     API.cookiename = cookieName = cookieNameAltVal;
  740.                 }
  741.    
  742.                 if(launchWithCustomApiProperty)
  743.                 {
  744.                     try
  745.                     {
  746.                         var key = $('customApiKey').value;
  747.                         var val = $('customApiValue').value;
  748.                         if(key && val)
  749.                         {
  750.                             API[key] = val;
  751.                         }
  752.                         Utils.log('Injected custom key/value into API object: '+key+'='+val,'info');
  753.                     }
  754.                     catch(e)
  755.                     {
  756.                         Utils.log('ERROR: Cannot inject custom key/value into API object: '+key+'='+val+ '('+e+')','error');
  757.                     }
  758.                 }
  759.    
  760.                 try
  761.                 {
  762.                     var w = (($('winW').value != "") && ($('winW').value > 0)) ? $('winW').value : wWidth;
  763.                     var h = (($('winH').value != "") && ($('winH').value > 0)) ? $('winH').value : wHeight;
  764.                     var embedParam = '';
  765.                     if(launchWithEmbeddedParam)
  766.                     {
  767.                         try
  768.                         {
  769.                             embedParam = $('searchString').value;
  770.                             Utils.log('Appending search string to launch file: '+$('searchString').value,'info');
  771.                         }
  772.                         catch(e)
  773.                         {
  774.                             embedParam = '';
  775.                         }
  776.                     }
  777.                     else
  778.                     {
  779.                         embedParam = '';
  780.                     }
  781.    
  782.                     var opts = '';
  783.                     opts += (wToolbar) ? 'toolbar=yes,' : '';
  784.                     opts += (wTitlebar) ? 'titlebar=yes,' : '';
  785.                     opts += (wLocation) ? 'location=yes,' : '';
  786.                     opts += (wStatus) ? 'status=yes,' : '';
  787.                     opts += (wScrollbars) ? 'scrollbars=yes,' : '';
  788.                     opts += (wResizable) ? 'resizable=yes,' : '';
  789.                     opts += (wMenubar) ? 'menubar=yes,' : '';
  790.                     opts = opts.substring(0, opts.length-1)
  791.                    
  792.                     Utils.log("Launching SCO win with options: "+opts)
  793.                    
  794.                     scoWin = this.openWindow(launchFile+embedParam,"SCOwindow",w,h,opts);
  795.                 }
  796.                 catch (e)
  797.                 {
  798.                     Utils.log('ERROR: '+e.description, 'error');
  799.                 }
  800.                
  801.                 if(scoWin !== null)
  802.                 {
  803.                     try
  804.                     {
  805.                         Utils.log('SCO Launched','info');
  806.                         scoWin.focus();
  807.                         this.watchWin();
  808.                     }
  809.                     catch (e)
  810.                     {
  811.                         Utils.log('ERROR: '+err.description,'error');
  812.                     }
  813.                 }
  814.                 else
  815.                 {
  816.                     Utils.log('ERROR: SCO windows unable to open.  Please disable any popup blockers you might have enabled and ensure the launch file path is correct.', 'error');
  817.                 }
  818.             },
  819.             closeSCO:function()
  820.             {
  821.                 try
  822.                 {
  823.                     if(scoWin && !scoWin.closed)
  824.                     {
  825.                         Utils.log('Attempting to close SCO window...','info');
  826.                         scoWin.close();
  827.                     }
  828.                 }
  829.                 catch(e)
  830.                 {
  831.                     Utils.log('ERROR: Unable to close SCO window ('+e.description+')','error');
  832.                 }
  833.             },
  834.             toggleDisplay:function(elm)
  835.             {
  836.                 $(elm).style.display = ($(elm).style.display == 'block') ? 'none' : 'block';
  837.             },
  838.             toggleCloseOnFinishOption:function(chkd)
  839.             {
  840.                 closeOnFinish = chkd;
  841.             },
  842.             toggleEmbeddedParam:function(chkd)
  843.             {
  844.                 launchWithEmbeddedParam = chkd;
  845.                 $('searchString').disabled = !chkd;
  846.    
  847.             },
  848.             toggleCustomKeyValueOption:function(chkd)
  849.             {
  850.                 launchWithCustomApiProperty = chkd;
  851.                 $('customApiKey').disabled = !chkd;
  852.                 $('customApiValue').disabled = !chkd;
  853.             },
  854.             toggleWindowOption:function(prop,el)
  855.             {
  856.                 window[prop] = el.checked;
  857.             },
  858.             enableAllWindowOptions:function()
  859.             {
  860.                 wToolbar = true;
  861.                 wTitlebar = true;
  862.                 wLocation = true;
  863.                 wStatus = true;
  864.                 wScrollbars = true;
  865.                 wResizable = true;
  866.                 wMenubar = true;
  867.                 $('wToolbarOption').checked = true;
  868.                 $('wTitlebarOption').checked = true;
  869.                 $('wLocationOption').checked = true;
  870.                 $('wStatusOption').checked = true;
  871.                 $('wScrollbarsOption').checked = true;
  872.                 $('wResizableOption').checked = true;
  873.                 $('wMenubarOption').checked = true;
  874.             },
  875.             disableAllWindowOptions:function()
  876.             {
  877.                 wToolbar = false;
  878.                 wTitlebar = false;
  879.                 wLocation = false;
  880.                 wStatus = false;
  881.                 wScrollbars = false;
  882.                 wResizable = false;
  883.                 wMenubar = false;
  884.                 $('wToolbarOption').checked = false;
  885.                 $('wTitlebarOption').checked = false;
  886.                 $('wLocationOption').checked = false;
  887.                 $('wStatusOption').checked = false;
  888.                 $('wScrollbarsOption').checked = false;
  889.                 $('wResizableOption').checked = false;
  890.                 $('wMenubarOption').checked = false;
  891.             },
  892.             loadManifest:function()
  893.             {
  894.                 var xmlDoc = null;
  895.                 var file = fullPath+"/imsmanifest.xml";
  896.    
  897.                 var useManifest=function()
  898.                 {
  899.                     try
  900.                     {
  901.                         var m = xmlDoc.getElementsByTagName("manifest")[0];
  902.                        
  903.                         var orgs = xmlDoc.getElementsByTagName("organizations")[0];
  904.                         var org = orgs.getElementsByTagName("organization")[0];
  905.                         var orgTitle = org.getElementsByTagName("title")[0].firstChild.nodeValue;
  906.                        
  907.                         var items = org.getElementsByTagName("item");
  908.                         var item = items[0];
  909.                         var itemTitle = item.getElementsByTagName("title")[0].firstChild.nodeValue;
  910.                         var itemMasteryScore = item.getElementsByTagName("adlcp:masteryscore")[0].firstChild.nodeValue;
  911.                         var itemIdentifier = item.getAttribute("identifier");
  912.                         var itemIdentifierRef = item.getAttribute("identifierref");
  913.    
  914.                         var resources = xmlDoc.getElementsByTagName("resources")[0];
  915.                         var resource = resources.getElementsByTagName("resource");
  916.                         var itemResource = null;
  917.                         for(var i=0;i<resource.length;i++)
  918.                         {
  919.                             var id = resource[i].getAttribute("identifier");
  920.                             var scormtype = resource[i].getAttribute("adlcp:scormtype");
  921.                             if(id == itemIdentifierRef && scormtype.toLowerCase() == "sco")
  922.                             {
  923.                                 itemResource = resource[i];
  924.                             }
  925.                         }
  926.                         var itemResourceHref = itemResource.getAttribute("href");
  927.                        
  928.                         Utils.log('IMS Manifest: Organization Title = &quot;'+orgTitle+'&quot;','entry');
  929.                         if(items.length > 1)
  930.                         {
  931.                             Utils.log('IMS Manifest: SimpleAPI detected multiple SCO references - Only the first will be launched.','entry');
  932.                         }
  933.                         Utils.log('IMS Manifest: First SCO Item = &quot;'+itemTitle+'&quot; (Mastery Score: '+itemMasteryScore+' / Identifier: &quot;'+itemIdentifier+'&quot;)','entry');
  934.                         Utils.log('IMS Manifest: Resource &quot;'+itemIdentifierRef+'&quot; HREF for Item &quot;'+itemIdentifier+'&quot; = &quot;'+itemResourceHref+'&quot;');
  935.    
  936.                         var obj = {};
  937.                         obj.id = m.getAttribute("identifier");
  938.                         obj.orgTitle = orgTitle;
  939.                         obj.itemTitle = itemTitle;
  940.                         obj.itemMasteryScore = itemMasteryScore;
  941.                         obj.itemResourceHref = itemResourceHref;
  942.    
  943.                         $('launchFileAlt').value = itemResourceHref;
  944.    
  945.                         return obj;
  946.                     }
  947.                     catch(e)
  948.                     {
  949.                         error=e.message;
  950.                         Utils.log('IMS Manifest: Cannot locate or parse manifest - '+error,'error');
  951.                         return false;
  952.                     }
  953.                 };
  954.    
  955.                 /* - For Webkit - Not now though...
  956.                 // Check for the various File API support.
  957.                 if (window.File && window.FileReader) {
  958.                   alert('Great success! All the File APIs are supported.');
  959.                 } else {
  960.                   alert('The File APIs are not fully supported in this browser.');
  961.                 }
  962.                 */
  963.    
  964.                
  965.                 try //Internet Explorer
  966.                 {
  967.                     xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
  968.                     xmlDoc.async=false;
  969.                     xmlDoc.onreadystatechange = function()
  970.                     {
  971.                         if(xmlDoc.readyState == 4)
  972.                         {
  973.                             useManifest();
  974.                         }
  975.                     }
  976.                     var success = xmlDoc.load(file);
  977.                 }
  978.                 catch(e)
  979.                 {
  980.                     try //Firefox, Mozilla, Opera, etc.
  981.                     {
  982.                         xmlDoc=document.implementation.createDocument("","",null);
  983.                         xmlDoc.async=false;
  984.                         xmlDoc.onload = function()
  985.                         {
  986.                             useManifest();
  987.                         };
  988.                         var success = xmlDoc.load(file);
  989.                     }
  990.                     catch(e)
  991.                     {
  992.                         try //Google Chrome
  993.                         {
  994.                             var xmlhttp = new window.XMLHttpRequest();
  995.                             xmlhttp.open("GET",file,false);
  996.                             xmlhttp.send(null);
  997.                             xmlDoc = xmlhttp.responseXML.documentElement;
  998.                             //alert(success);
  999.                         }
  1000.                         catch(e)
  1001.                         {
  1002.                             error=e.message;
  1003.                             Utils.log('IMS Manifest: Cannot locate or parse manifest - '+error,'error');
  1004.    
  1005.                             return false;
  1006.                         }
  1007.                     }
  1008.                 }
  1009.             }
  1010.         };
  1011.    
  1012.         // General/Global
  1013.         // ----------------------------------------------------------------------------
  1014.         this.init=function()
  1015.         {
  1016.             scoWin = null;
  1017.             var manifestObj = null;
  1018.    
  1019.             if(!skipManifestCheck)
  1020.             {
  1021.                 var manifestObj = Utils.loadManifest();
  1022.             }
  1023.    
  1024.             if(!manifestObj)
  1025.             {
  1026.                 if(useParentFolderAsCookieName)
  1027.                 {
  1028.                     cookieName = parentFolder;
  1029.                 }
  1030.             }
  1031.             else
  1032.             {
  1033.                 if(manifestObj.id)
  1034.                 {
  1035.                     cookieName = manifestObj.id;
  1036.                 }
  1037.                
  1038.                 if(manifestObj.itemResourceHref)
  1039.                 {
  1040.                     $('launchFileAlt').value = manifestObj.itemResourceHref;
  1041.                 }
  1042.             }
  1043.    
  1044.             var api = new GenericAPIAdaptor();
  1045.             API = new SimpleAPI(cookieName,api,initialState);
  1046.    
  1047.             // test for localStorage
  1048.             if(typeof(Storage) !== "undefined")
  1049.             {
  1050.                 try {
  1051.                   if (('localStorage' in window) && window['localStorage'] && window.localStorage !== null)
  1052.                   {
  1053.                     storageObject = localStorageObject;
  1054.                   }
  1055.                   else
  1056.                   {
  1057.                     storageObject = cookieStorageObject;
  1058.                   }
  1059.                 } catch(e) {
  1060.                   storageObject = cookieStorageObject;
  1061.                 }
  1062.             }
  1063.             else
  1064.             {
  1065.                 storageObject = cookieStorageObject;
  1066.             }
  1067.    
  1068.             $('cookieNameAlt').value = cookieName;
  1069.    
  1070.             $('winW').value = wWidth;
  1071.             $('winH').value = wHeight;
  1072.    
  1073.             $('wToolbarOption').checked = wToolbar;
  1074.             $('wTitlebarOption').checked = wTitlebar;
  1075.             $('wLocationOption').checked = wLocation;
  1076.             $('wStatusOption').checked = wStatus;
  1077.             $('wScrollbarsOption').checked = wScrollbars;
  1078.             $('wResizableOption').checked = wResizable;
  1079.             $('wMenubarOption').checked = wMenubar;
  1080.    
  1081.             Utils.toggleDisplay('optionSet');
  1082.             Utils.toggleDisplay('debug');
  1083.    
  1084.             if(closeOnFinish)
  1085.             {
  1086.                 $('closeOnFinishOption').checked = true;
  1087.             }
  1088.    
  1089.             launchWithEmbeddedParam = $('toggleEmbeddedOption').checked;
  1090.             launchWithCustomApiProperty = $('toggleCustomKeyValueOption').checked;
  1091.            
  1092.             $('searchString').disabled = !launchWithEmbeddedParam;
  1093.             $('customApiKey').disabled = !launchWithCustomApiProperty;
  1094.             $('customApiValue').disabled = !launchWithCustomApiProperty;
  1095.    
  1096.    
  1097.             $('searchString').value = defaultSearchString;
  1098.             $('customApiKey').value = defaultCustomApiKey;
  1099.             $('customApiValue').value = defaultCustomApiValue;
  1100.    
  1101.             Utils.log('Storage type will be: '+storageObject.toString(),'info');
  1102.    
  1103.             Utils.dumpExistingAPIData();
  1104.         };
  1105.    
  1106.         this.sendSimApi=function(simAPI,title,totalToInclude,totalIncorrect,incStepNumberList)
  1107.         {
  1108.             Utils.log('Sim API Object: '+simAPI,'info');
  1109.             Utils.log('Sim Title: '+title,'info');
  1110.         };
  1111.    
  1112.         this.$=function(id)
  1113.         {
  1114.             var el = document.getElementById(id);
  1115.             return el;
  1116.         };
  1117.    
  1118.         // Cookie Object interface
  1119.         this.cookieStorageObject={
  1120.             persist:function(name,data,lifetime)
  1121.             {
  1122.                 saveCookie(name,data,lifetime)
  1123.             },
  1124.             retrieve:function(name)
  1125.             {
  1126.                 return readCookie(name);
  1127.             },
  1128.             remove:function(name)
  1129.             {
  1130.                 deleteCookie(name);
  1131.             },
  1132.             toString:function()
  1133.             {
  1134.                 return "Cookie";
  1135.             }
  1136.         };
  1137.    
  1138.         // LocalStorage Interface
  1139.         this.localStorageObject={
  1140.             persist: function(name,data,lifetime)
  1141.             {
  1142.                 localStorage[name] = data;
  1143.             },
  1144.             retrieve:function(name)
  1145.             {
  1146.                 return localStorage[name];
  1147.             },
  1148.             remove:function(name)
  1149.             {
  1150.                 delete localStorage[name];
  1151.             },
  1152.             toString:function()
  1153.             {
  1154.                 return "LocalStorage";
  1155.             }
  1156.         };
  1157.    
  1158.         window.onload=function()
  1159.         {
  1160.             this.init();
  1161.                         //----------------------
  1162.             javascript:void(0);
  1163.             $('debug').innerHTML='';
  1164.             Utils.clearCookieData();
  1165.             Utils.launchSCO();
  1166.             //----------------------
  1167.                     };
  1168.     })();
  1169.    
  1170.    
  1171.     // Cookie Functions
  1172.     // ----------------------------------------------------------------------------
  1173.     // save/read/delete cookie functions for storing small chunks of data in the browser
  1174.     // 19990326
  1175.    
  1176.     // Copyright (C) 1999 Dan Steinman
  1177.     // Distributed under the terms of the GNU Library General Public License
  1178.     // Available at http://www.dansteinman.com/dynapi/
  1179.    
  1180.     // thanks to: Jesee Chisholm <JCHISHOLM@SENSORMATIC-VPD.com>
  1181.    
  1182.     function saveCookie(name,value,days)
  1183.     {
  1184.         if(days)
  1185.         {
  1186.             var date = new Date();
  1187.             date.setTime(date.getTime()+(days*24*60*60*1000));
  1188.             var expires = "; expires="+date.toGMTString();
  1189.         }
  1190.         else
  1191.         {
  1192.             expires = "";
  1193.         }
  1194.         document.cookie = name+"="+value+expires+"; path=/";
  1195.     }
  1196.     function readCookie(name)
  1197.     {
  1198.         var nameEQ = name + "=";
  1199.         var ca = document.cookie.split(';');
  1200.         for(var i=0;i<ca.length;i++)
  1201.         {
  1202.             var c = ca[i];
  1203.             while (c.charAt(0)==' ') c = c.substring(1,c.length);
  1204.             if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
  1205.         }
  1206.         return null;
  1207.     }
  1208.     function deleteCookie(name)
  1209.     {
  1210.         saveCookie(name,"",-1);
  1211.     }
  1212.    
  1213.     // JSON
  1214.     // ----------------------------------------------------------------------------
  1215.     /*
  1216.         json.js
  1217.         2006-11-09
  1218.    
  1219.         This file adds these methods to JavaScript:
  1220.    
  1221.             array.toJSONString()
  1222.             boolean.toJSONString()
  1223.             date.toJSONString()
  1224.             number.toJSONString()
  1225.             object.toJSONString()
  1226.             string.toJSONString()
  1227.                 These method produces a JSON text from a JavaScript value.
  1228.                 It must not contain any cyclical references. Illegal values
  1229.                 will be excluded.
  1230.    
  1231.                 The default conversion for dates is to an ISO string. You can
  1232.                 add a toJSONString method to any date object to get a different
  1233.                 representation.
  1234.    
  1235.             string.parseJSON()
  1236.                 This method parses a JSON text to produce an object or
  1237.                 array. It can throw a SyntaxError exception.
  1238.    
  1239.         It is expected that these methods will formally become part of the
  1240.         JavaScript Programming Language in the Fourth Edition of the
  1241.         ECMAScript standard in 2007.
  1242.     */
  1243.    
  1244.     Array.prototype.toJSONString = function () {
  1245.         var a = ['['], b, i, l = this.length, v;
  1246.    
  1247.         function p(s) {
  1248.             if (b) {
  1249.                 a.push(',');
  1250.             }
  1251.             a.push(s);
  1252.             b = true;
  1253.         }
  1254.    
  1255.         for (i = 0; i < l; i += 1) {
  1256.             v = this[i];
  1257.             switch (typeof v) {
  1258.             case 'undefined':
  1259.             case 'function':
  1260.             case 'unknown':
  1261.                 break;
  1262.             case 'object':
  1263.                 if (v) {
  1264.                     if (typeof v.toJSONString === 'function') {
  1265.                         p(v.toJSONString());
  1266.                     }
  1267.                 } else {
  1268.                     p("null");
  1269.                 }
  1270.                 break;
  1271.             default:
  1272.                 p(v.toJSONString());
  1273.             }
  1274.         }
  1275.         a.push(']');
  1276.         return a.join('');
  1277.     };
  1278.     Boolean.prototype.toJSONString = function () {
  1279.         return String(this);
  1280.     };
  1281.     Date.prototype.toJSONString = function () {
  1282.    
  1283.         function f(n) {
  1284.             return n < 10 ? '0' + n : n;
  1285.         }
  1286.    
  1287.         return '"' + this.getFullYear() + '-' +
  1288.                 f(this.getMonth() + 1) + '-' +
  1289.                 f(this.getDate()) + 'T' +
  1290.                 f(this.getHours()) + ':' +
  1291.                 f(this.getMinutes()) + ':' +
  1292.                 f(this.getSeconds()) + '"';
  1293.     };
  1294.     Number.prototype.toJSONString = function () {
  1295.         return isFinite(this) ? String(this) : "null";
  1296.     };
  1297.     Object.prototype.toJSONString = function () {
  1298.         var a = ['{'], b, i, v;
  1299.    
  1300.         function p(s) {
  1301.             if (b) {
  1302.                 a.push(',');
  1303.             }
  1304.             a.push(i.toJSONString(), ':', s);
  1305.             b = true;
  1306.         }
  1307.    
  1308.         for (i in this) {
  1309.             if (this.hasOwnProperty(i)) {
  1310.                 v = this[i];
  1311.                 switch (typeof v) {
  1312.                 case 'undefined':
  1313.                 case 'function':
  1314.                 case 'unknown':
  1315.                     break;
  1316.                 case 'object':
  1317.                     if (v) {
  1318.                         if (typeof v.toJSONString === 'function') {
  1319.                             p(v.toJSONString());
  1320.                         }
  1321.                     } else {
  1322.                         p("null");
  1323.                     }
  1324.                     break;
  1325.                 default:
  1326.                     p(v.toJSONString());
  1327.                 }
  1328.             }
  1329.         }
  1330.         a.push('}');
  1331.         return a.join('');
  1332.     };
  1333.     (function (s){
  1334.         var m = {
  1335.             '\b': '\\b',
  1336.             '\t': '\\t',
  1337.             '\n': '\\n',
  1338.             '\f': '\\f',
  1339.             '\r': '\\r',
  1340.             '"' : '\\"',
  1341.             '\\': '\\\\'
  1342.         };
  1343.         s.parseJSON = function () {
  1344.             try {
  1345.                 if (/^("(\\.|[^"\\\n\r])*?"|[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t])+?$/.
  1346.                         test(this)) {
  1347.                     return eval('(' + this + ')');
  1348.                 }
  1349.             } catch (e) {
  1350.             }
  1351.             throw new SyntaxError("parseJSON");
  1352.         };
  1353.         s.toJSONString = function () {
  1354.             if (/["\\\x00-\x1f]/.test(this)) {
  1355.                 return '"' + this.replace(/([\x00-\x1f\\"])/g, function(a, b) {
  1356.                     var c = m[b];
  1357.                     if (c) {
  1358.                         return c;
  1359.                     }
  1360.                     c = b.charCodeAt();
  1361.                     return '\\u00' +
  1362.                         Math.floor(c / 16).toString(16) +
  1363.                         (c % 16).toString(16);
  1364.                 }) + '"';
  1365.             }
  1366.             return '"' + this + '"';
  1367.         };
  1368.     })(String.prototype);
  1369.    
  1370.     /**
  1371.      *  RELOAD TOOLS
  1372.      *
  1373.      *  Copyright (c) 2003 Oleg Liber, Bill Olivier, Phillip Beauvoir, Paul Sharples
  1374.      *
  1375.      *  Permission is hereby granted, free of charge, to any person obtaining a copy
  1376.      *  of this software and associated documentation files (the "Software"), to deal
  1377.      *  in the Software without restriction, including without limitation the rights
  1378.      *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  1379.      *  copies of the Software, and to permit persons to whom the Software is
  1380.      *  furnished to do so, subject to the following conditions:
  1381.      *
  1382.      *  The above copyright notice and this permission notice shall be included in
  1383.      *  all copies or substantial portions of the Software.
  1384.      *
  1385.      *  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  1386.      *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  1387.      *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  1388.      *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  1389.      *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  1390.      *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  1391.      *
  1392.      *  Project Management Contact:
  1393.      *
  1394.      *  Oleg Liber
  1395.      *  Bolton Institute of Higher Education
  1396.      *  Deane Road
  1397.      *  Bolton BL3 5AB
  1398.      *  UK
  1399.      *
  1400.      *  e-mail:   o.liber@bolton.ac.uk
  1401.      *
  1402.      *
  1403.      *  Technical Contact:
  1404.      *
  1405.      *  Phillip Beauvoir
  1406.      *  e-mail:   p.beauvoir@bolton.ac.uk
  1407.      *
  1408.      *  Paul Sharples
  1409.      *  e-mail:   p.sharples@bolton.ac.uk
  1410.      *
  1411.      *  Web:      http://www.reload.ac.uk
  1412.      *
  1413.      * @author Paul Sharples
  1414.      * @version $Id: ReloadAPIAdaptor.js,v 1.3 2004/07/25 13:04:59 ps3com Exp $
  1415.      *
  1416.      */
  1417.     /*
  1418.     * -----------------------------------------------------------------------------------------------
  1419.     *  Convenience Methods needed for SCO communication
  1420.     * -----------------------------------------------------------------------------------------------
  1421.     */
  1422.    
  1423.     var looseChecking ="false";
  1424.    
  1425.     /*
  1426.     * Function to initially load the server model CMI elements into the javascript
  1427.     * model, when this page first loads.
  1428.     */
  1429.     function loadDataIntoModel(element, value){
  1430.       if (element != "cmi.interactions._count" && element != "cmi.interactions._count"){
  1431.             if (element.indexOf("cmi.objectives") != -1){
  1432.                  dealWithSettingObjectives(element, value);
  1433.             }
  1434.             else if (element.indexOf("cmi.interactions") != -1){
  1435.                  dealWithSettingInteractions(element, value);
  1436.             }
  1437.             else{
  1438.                var result = eval ("API."+element);
  1439.                if (result != null){
  1440.                     result.cmivalue = value;
  1441.                }
  1442.             }
  1443.       }
  1444.     }
  1445.    
  1446.     /*
  1447.     *  Object ServerScoSettings()
  1448.     *  Used to store server specific settings and error codes etc..
  1449.     *  Is accessed as an object inside this implementation of the API object.
  1450.     */
  1451.     function ServerScoSettings(){
  1452.         this.isInitialized = "false";
  1453.         this.lastError = "0";
  1454.         this.checkDataTypeAndVocab = scoCheckDataTypeAndVocab;
  1455.     }
  1456.    
  1457.     /*
  1458.     * A CMIComponent holds properties for each CMI element in the model.
  1459.     * Here we keep the element name, it current value, its read/write status
  1460.     * and finally it CMI datatype
  1461.     */
  1462.     function CMIComponent(thename, thevalue, readstatus, datatype){
  1463.         this.cminame=thename;
  1464.         this.cmivalue=thevalue;
  1465.         this.cmireadStatus=readstatus;
  1466.         this.cmidatatype=datatype;
  1467.     }
  1468.    
  1469.     /*
  1470.     * Top level object to hold complete CMI data model and API methods
  1471.     */
  1472.     function GenericAPIAdaptor(){
  1473.         this.cmi = new CMIModel;
  1474.         this.LMSInitialize = LMSInitializeMethod;
  1475.         this.LMSGetValue = LMSGetValueMethod;
  1476.         this.LMSSetValue = LMSSetValueMethod;
  1477.         this.LMSCommit = LMSCommitMethod;
  1478.         this.LMSFinish = LMSFinishMethod;
  1479.         this.LMSGetLastError = LMSGetLastErrorMethod;
  1480.         this.LMSGetErrorString = LMSGetErrorStringMethod;
  1481.         this.LMSGetDiagnostic = LMSGetDiagnosticMethod;
  1482.         this.ServerSco = new ServerScoSettings;
  1483.     }
  1484.    
  1485.     /*
  1486.     * ---------------------------------------------------------------------------------------------
  1487.     *   API Javascript Functions
  1488.     * ---------------------------------------------------------------------------------------------
  1489.     */
  1490.    
  1491.     /*
  1492.     * LMSInitialize. Initialize this sco (if it is one)
  1493.     */
  1494.     function LMSInitializeMethod(parameter){
  1495.         // check that this has been called with an empty string...
  1496.         if (parameter != ""){
  1497.             this.ServerSco.lastError = "201"
  1498.             return "false";
  1499.         }
  1500.         // check that we are not already initialized...
  1501.         if(this.ServerSco.isInitialized == "false"){
  1502.             this.ServerSco.isInitialized = "true";
  1503.             this.ServerSco.lastError = "0"
  1504.             return "true";
  1505.         }
  1506.         else{
  1507.             this.ServerSco.lastError = "101"
  1508.             return "false";
  1509.         }
  1510.     }
  1511.    
  1512.     /*
  1513.     * LMSFinish. Finish this sco session.
  1514.     */
  1515.     function LMSFinishMethod(parameter){
  1516.         // check that this has been called with an empty string...
  1517.         if (parameter != ""){
  1518.             this.ServerSco.lastError = "201";
  1519.             return "false";
  1520.         }
  1521.         // make sure that the server is initialized...
  1522.         if (this.ServerSco.isInitialized=="true"){
  1523.                 this.ServerSco.isInitialized = "false";
  1524.                 this.ServerSco.lastError = "0";
  1525.                 return "true";
  1526.         }
  1527.         else{
  1528.             // not initialized
  1529.             this.ServerSco.lastError = "301";
  1530.             return "false";
  1531.         }
  1532.     }
  1533.    
  1534.    
  1535.    
  1536.     /*
  1537.     * LMSCommit.  Method to update/persist any changed items in the CMI datamodel
  1538.     */
  1539.     function LMSCommitMethod(parameter){
  1540.         // check that this has been called with an empty string...
  1541.         if (parameter!=""){
  1542.             this.ServerSco.lastError = "201"
  1543.             return "false";
  1544.         }
  1545.         if (this.ServerSco.isInitialized == "true"){
  1546.                 this.ServerSco.lastError = "0";
  1547.                 return "true";
  1548.         }
  1549.         else{
  1550.             // not initialized
  1551.             this.ServerSco.lastError = "301";
  1552.             return "false";
  1553.         }
  1554.     }
  1555.    
  1556.     function dealWithGettingObjectives(element){
  1557.         // RETURN _CHILDREN
  1558.         if (element == "cmi.objectives._children"){
  1559.             API.ServerSco.lastError = "0";
  1560.             return API.cmi.objectives._children.cmivalue;
  1561.         }
  1562.    
  1563.         // RETURN _COUNT
  1564.         if (element == "cmi.objectives._count"){
  1565.             API.ServerSco.lastError = "0";
  1566.             return API.cmi.objectives._count.cmivalue;
  1567.         }
  1568.    
  1569.         // ELSE CHECK THAT THE ELEMENT IS VALID AND HAS AT LEAST 3 PARAMS
  1570.         var cmiArray = element.split(".");
  1571.         if (cmiArray.length < 3){
  1572.             API.ServerSco.lastError = "201";
  1573.             return "";
  1574.         }
  1575.    
  1576.         var theCount = API.cmi.objectives._count.cmivalue;
  1577.    
  1578.         // IF 3RD ARG IS NOT A NUMBER THEN THROW ERROR
  1579.         // need to check cmiArray[2] to see if its a number
  1580.         if (isNaN(cmiArray[2])){
  1581.             API.ServerSco.lastError = "401";
  1582.             return "";
  1583.         }
  1584.    
  1585.         // IF ITS A NUMBER MAKE SURE ITS IN THE ARRAY BOUNDS
  1586.         if(cmiArray[2] >= theCount){
  1587.             // call to array is out of bounds
  1588.             API.ServerSco.lastError = "201";
  1589.             return "";
  1590.         }
  1591.         else{   // WEVE GOT TO THE POINT OF VALIDATING cmi.objective.n
  1592.             // does this element exist in the objectives array? - sanity check...
  1593.             var mystr = "API."+cmiArray[0] + "." + cmiArray[1] + ".objArray(" + cmiArray[2] + ");";
  1594.             ans = eval(mystr);
  1595.             //if it doesn't exist
  1596.             if (ans == null){
  1597.                 API.ServerSco.lastError = "201";
  1598.                 return "";
  1599.             }
  1600.             else{
  1601.                 // we need to see if the call is asking for a valid element under cmi.objectives.n
  1602.                 // we can trust the element parameter now to call the following...
  1603.                 subelementstr = "ans";
  1604.                 for (i=3;i<cmiArray.length;i++){
  1605.                     subelementstr = subelementstr + "." + cmiArray[i];
  1606.                 }
  1607.    
  1608.                 var objTest = eval(subelementstr);
  1609.                 if (objTest == null){
  1610.                     API.ServerSco.lastError = "201";
  1611.                     return "false";
  1612.                 }
  1613.    
  1614.                 subelementstr = subelementstr + ".cmivalue;";
  1615.                 res = eval(subelementstr);
  1616.                 if (res == null){
  1617.                     API.ServerSco.lastError = "201";
  1618.                     return "";
  1619.                 }
  1620.                 else{
  1621.                     API.ServerSco.lastError = "0";
  1622.                     return res;
  1623.                 }
  1624.             }
  1625.         }
  1626.     }
  1627.    
  1628.     function dealWithGettingInteractions(element){
  1629.         // RETURN _CHILDREN
  1630.         if (element == "cmi.interactions._children"){
  1631.             API.ServerSco.lastError = "0";
  1632.             return API.cmi.interactions._children.cmivalue;
  1633.         }
  1634.    
  1635.         // RETURN _COUNT
  1636.         if (element == "cmi.interactions._count"){
  1637.             API.ServerSco.lastError = "0";
  1638.             return API.cmi.interactions._count.cmivalue;
  1639.         }
  1640.    
  1641.         // ELSE CHECK THAT THE ELEMENT IS VALID AND HAS AT LEAST 3 PARAMS, DOESNT HAVE
  1642.         // MORE THAN 6 PARAMS  - IF SO, ITS ILLEGAL
  1643.         var cmiArray = element.split(".");
  1644.         if (cmiArray.length < 3 || cmiArray.length > 6){
  1645.             API.ServerSco.lastError = "201";
  1646.             return "";
  1647.         }
  1648.    
  1649.         var theCount = API.cmi.interactions._count.cmivalue;
  1650.    
  1651.         // IF 3RD ARG IS NOT A NUMBER THEN THROW ERROR
  1652.         // need to check cmiArray[2] to see if its a number
  1653.         if (isNaN(cmiArray[2])){
  1654.             API.ServerSco.lastError = "401";
  1655.             return "";
  1656.         }
  1657.    
  1658.         // IF ITS A NUMBER MAKE SURE ITS IN THE ARRAY BOUNDS
  1659.         if(cmiArray[2] >= theCount){
  1660.             // call to array is out of bounds
  1661.             API.ServerSco.lastError = "201";
  1662.             return "";
  1663.         }
  1664.         else{   // WEVE GOT TO THE POINT OF VALIDATING cmi.interactions.n
  1665.             // does this element exist in the interactions array? - sanity check...
  1666.             //
  1667.             // We are checking that 'cmi.interactions.n' exists
  1668.             var mystr = "API."+cmiArray[0] + "." + cmiArray[1] + ".intArray(" + cmiArray[2] + ")";
  1669.             ans = eval(mystr);
  1670.             //if it doesn't exist
  1671.             if (ans==null){
  1672.                 API.ServerSco.lastError = "201";
  1673.                 return "";
  1674.             }
  1675.             else{
  1676.                 // if theres 4 bits to the element path then try to see if object exists
  1677.                 if (cmiArray.length == 4){
  1678.                     strleaf = "ans."+ cmiArray[3] + ";";
  1679.                     var doesLeafExist = eval (strleaf);
  1680.                     if (doesLeafExist == null){
  1681.                         API.ServerSco.lastError = "201";
  1682.                         return "";
  1683.                     }
  1684.                     else{
  1685.                         // NEXT CHECK THAT THIS ELEMENT IS NOT WRITEONLY
  1686.                         strleafstatus = mystr + "."+ cmiArray[3] + ".cmireadStatus;";
  1687.                         var leafstatus = eval(strleafstatus);
  1688.                         if (leafstatus == "writeonly"){
  1689.                             API.ServerSco.lastError = "404";
  1690.                             return "";
  1691.                         }
  1692.    
  1693.                         // WE CAN NOW TRY TO GET THE FULL OBJECT REFERENCE
  1694.                         var strleafval = mystr + "."+ cmiArray[3] + ".cmivalue;";
  1695.                         var leafVal = eval(strleafval);
  1696.                         if (leafVal == null){
  1697.                             // IT FAILED AT THE FINAL HURDLE...
  1698.                             API.ServerSco.lastError = "201";
  1699.                             return "";
  1700.                         }
  1701.                         else{
  1702.                             API.ServerSco.lastError = "0";
  1703.                             return leafVal;
  1704.                         }
  1705.    
  1706.                     }
  1707.                 }
  1708.                 // if theres 5 bits to the element path then try to see if object exists
  1709.                 if (cmiArray.length == 5){
  1710.                     // check object exists
  1711.                     strbranch = "ans."+ cmiArray[3] + ";";
  1712.                     var doesLeafExist = eval (strbranch);
  1713.                     if (doesLeafExist == null){
  1714.                         API.ServerSco.lastError = "201";
  1715.                         return "";
  1716.                     }
  1717.    
  1718.                     // check final object exists in the array list...
  1719.                     nextstrbranch = "ans."+ cmiArray[3] + "." + cmiArray[4] + ";";
  1720.                     var doesLeafExist = eval (nextstrbranch);
  1721.                     if (doesLeafExist == null){
  1722.                         API.ServerSco.lastError = "201";
  1723.                         return "";
  1724.                     }
  1725.    
  1726.                     // check for write only
  1727.                     strread = "ans."+ cmiArray[3] + "." + cmiArray[4] + ".cmireadStatus;";
  1728.                     var isWriteOnly = eval (strread);
  1729.                     if (isWriteOnly == "writeonly"){
  1730.                         API.ServerSco.lastError = "404";
  1731.                         return "";
  1732.                     }
  1733.    
  1734.                     // see if value exists
  1735.                     strleaf = "ans."+ cmiArray[3] + "." + cmiArray[4] + ".cmivalue;";
  1736.                     var doesLeafExist = eval (strleaf);
  1737.                     if (doesLeafExist == null){
  1738.                         API.ServerSco.lastError = "201";
  1739.                         return "";
  1740.                     }
  1741.                     else{
  1742.                         API.ServerSco.lastError = "0";
  1743.                         return doesLeafExist;
  1744.                     }
  1745.    
  1746.                 }
  1747.                 // if theres 6 bits to the element path then try to see if object exists
  1748.                 if (cmiArray.length == 6){
  1749.                     // check object exists
  1750.                     strbranch = "ans."+ cmiArray[3];
  1751.                     var doesBranchExist = eval (strbranch);
  1752.                     if (doesBranchExist == null){
  1753.                         API.ServerSco.lastError = "201";
  1754.                         return "";
  1755.                     }
  1756.                     // The fifth argument should be an array reference, so do some checking...
  1757.    
  1758.                     // IF 5TH ARG IS NOT A NUMBER THEN THROW ERROR
  1759.                     // need to check cmiArray[4] to see if its a number
  1760.                     if (isNaN(cmiArray[4])){
  1761.                         API.ServerSco.lastError = "401";
  1762.                         return "";
  1763.                     }
  1764.    
  1765.                     // check to see if this element has a _count
  1766.                     // If it hasn't we'll have to throw an error here
  1767.                     // because we need the correct array index for array #2...
  1768.                     var theCount = "ans." + cmiArray[3] + "._count.cmivalue;";
  1769.                     var hasCount = eval(theCount);
  1770.                     // CANT FIND _COUNT FOR THIS ELEMENT, SO THROW AN ERROR...
  1771.                     if (hasCount == null){
  1772.                         API.ServerSco.lastError = "201";
  1773.                         return "";
  1774.                     }
  1775.                     // next need to check to see if array ref is in array bounds
  1776.                     if(cmiArray[4] >= hasCount || cmiArray[4] < 0){
  1777.                         // call to array is out of bounds
  1778.                         API.ServerSco.lastError = "201";
  1779.                         return "";
  1780.                     }
  1781.                     // make sure that array index 4 is either 'objectives' or 'correct_responses'
  1782.                     if (cmiArray[3] == "objectives"){
  1783.                         // next check that there is an object here at this array index...
  1784.                         var arrayIndex2Check = eval("ans." + cmiArray[3] + ".objectivesInteractionArray(" + cmiArray[4] + ")");
  1785.                         // check for null
  1786.                         if (arrayIndex2Check == null){
  1787.                             API.ServerSco.lastError = "201";
  1788.                             return "";
  1789.                         }
  1790.                         else{
  1791.                             // next check that the last element is valid...
  1792.                             finalObjectCheck = eval ("arrayIndex2Check." + cmiArray[5]);
  1793.                             if (finalObjectCheck == null){
  1794.                                 API.ServerSco.lastError = "201";
  1795.                                 return "";
  1796.                             }
  1797.                             else{
  1798.                                 // call must be to a valid element in the model so...
  1799.                                 // check it for writeonly...
  1800.                                 isWriteonly = eval ("finalObjectCheck.cmireadStatus");
  1801.                                 if (isWriteonly == "writeonly"){
  1802.                                     API.ServerSco.lastError = "404";
  1803.                                     return "";
  1804.                                 }
  1805.                                 else{
  1806.                                     API.ServerSco.lastError = "0";
  1807.                                     return eval ("finalObjectCheck.cmivalue");
  1808.                                 }
  1809.                             }
  1810.                         }
  1811.                     }
  1812.                     else if (cmiArray[3] == "correct_responses"){
  1813.                         // next check that there is an object here at this array index...
  1814.                         var arrayIndex2Check = eval("ans." + cmiArray[3] + ".correctResponsesInteractionArray(" + cmiArray[4] + ")");
  1815.                         // check for null
  1816.                         if (arrayIndex2Check == null){
  1817.                             API.ServerSco.lastError = "201";
  1818.                             return "";
  1819.                         }
  1820.                         else{
  1821.                             // next check that the last element is valid...
  1822.                             finalObjectCheck = eval ("arrayIndex2Check." + cmiArray[5]);
  1823.                             if (finalObjectCheck == null){
  1824.                                 API.ServerSco.lastError = "201";
  1825.                                 return "";
  1826.                             }
  1827.                             else{
  1828.                                 // call must be to a valid element in the model so...
  1829.                                 // check it for writeonly...
  1830.                                 isWriteonly = eval ("finalObjectCheck.cmireadStatus");
  1831.                                 if (isWriteonly == "writeonly"){
  1832.                                     API.ServerSco.lastError = "404";
  1833.                                     return "";
  1834.                                 }
  1835.                                 else{
  1836.                                     API.ServerSco.lastError = "0";
  1837.                                     return eval ("finalObjectCheck.cmivalue");
  1838.                                 }
  1839.                             }
  1840.                         }
  1841.                     }
  1842.                     else {
  1843.                         // throw an error becuase 4th arg was not either
  1844.                         // objectives or correct_responses
  1845.                         API.ServerSco.lastError = "201";
  1846.                         return "";
  1847.                     }
  1848.                 }
  1849.             }
  1850.         }
  1851.     }
  1852.    
  1853.     function dealWithSettingObjectives(element, value){
  1854.         //  _CHILDREN ARE READONLY
  1855.         if (element == "cmi.objectives._children"){
  1856.             API.ServerSco.lastError = "402";
  1857.             return "false";
  1858.         }
  1859.    
  1860.         //  _COUNT IS READ ONLY
  1861.         if (element == "cmi.objectives._count"){
  1862.             API.ServerSco.lastError = "402";
  1863.             return "false";
  1864.         }
  1865.    
  1866.         // ELSE CHECK THAT THE ELEMENT IS VALID AND HAS AT LEAST 3 PARAMS
  1867.         var cmiArray = element.split(".");
  1868.         if (cmiArray.length < 3){
  1869.             API.ServerSco.lastError = "201";
  1870.             return "false";
  1871.         }
  1872.    
  1873.         // IF 3RD ARG IS NOT A NUMBER THEN THROW ERROR
  1874.         // need to check cmiArray[2] to see if its a number
  1875.         if (isNaN(cmiArray[2])){
  1876.             API.ServerSco.lastError = "401";
  1877.             return "false";
  1878.         }
  1879.    
  1880.    
  1881.         var theCount = API.cmi.objectives._count.cmivalue;
  1882.    
  1883.         // IF ITS A NUMBER MAKE SURE ITS IN THE ARRAY BOUNDS
  1884.         if(cmiArray[2] > theCount || cmiArray[2] < 0){
  1885.             // call to array is out of bounds
  1886.             API.ServerSco.lastError = "201";
  1887.             return "false";
  1888.         }
  1889.         else if(cmiArray[2] == theCount || cmiArray[2]  < theCount){
  1890.    
  1891.             //create a new one
  1892.             var existingObjectiveHandle = API.cmi.objectives.objArray(cmiArray[2]);
  1893.             if (existingObjectiveHandle == null){
  1894.                 API.ServerSco.lastError = "101";
  1895.                 return "false";
  1896.             }
  1897.             else{
  1898.                 // we need to see if the call is asking for a valid element under cmi.objectives.n
  1899.                 // we can trust the element parameter now to call the following...
  1900.                 subelementstr = "existingObjectiveHandle";
  1901.                 for (i=3;i<cmiArray.length;i++){
  1902.                     subelementstr = subelementstr + "." + cmiArray[i];
  1903.                 }
  1904.    
  1905.                 var objTest = eval(subelementstr);
  1906.                 if (objTest == null){
  1907.                     API.ServerSco.lastError = "201";
  1908.                     return "false";
  1909.    
  1910.                 }
  1911.    
  1912.                 var subelementstrWithoutLeaf = subelementstr;
  1913.                 subelementstr = subelementstr + ".cmireadStatus;";
  1914.                 res = eval(subelementstr);
  1915.                 if (res == null){
  1916.                     API.ServerSco.lastError = "101";
  1917.                     return "false";
  1918.                 }
  1919.                 else{
  1920.                     if (res == "readonly"){
  1921.                         API.ServerSco.lastError = "403";
  1922.                         return "false";
  1923.                     }
  1924.                     else{
  1925.    
  1926.                         // check the datatype and vocabulary...
  1927.                         var datatype = objTest.cmidatatype;
  1928.                         res = API.ServerSco.checkDataTypeAndVocab(element, value, datatype);
  1929.    
  1930.                         if (res == "true"){
  1931.                             // correct datatype...
  1932.                             // WE CAN NOW TRY TO SET THE FULL OBJECT REFERENCE
  1933.                             var strleafval = "objTest.cmivalue =\"" + value + "\";";
  1934.                             var leafVal = eval(strleafval);
  1935.                             if (leafVal == null){
  1936.                                 // IT FAILED AT THE FINAL HURDLE...
  1937.                                 API.ServerSco.lastError = "201";
  1938.                                 return "false";
  1939.                            }
  1940.                            else{
  1941.                                 API.ServerSco.lastError = "0";
  1942.                                 return "true";
  1943.                            }
  1944.                        }
  1945.                        else{
  1946.                            // incorrect data type...
  1947.                            API.ServerSco.lastError = "405";
  1948.                            return "false";
  1949.                        }
  1950.    
  1951.                     }
  1952.                 }
  1953.             }
  1954.         }
  1955.     }
  1956.    
  1957.     function dealWithSettingInteractions(element, value){
  1958.         //  _CHILDREN ARE READONLY
  1959.         if (element == "cmi.interactions._children"){
  1960.             API.ServerSco.lastError = "402";
  1961.             return "false";
  1962.         }
  1963.    
  1964.         //  _COUNT IS READ ONLY
  1965.         if (element == "cmi.interactions._count"){
  1966.             API.ServerSco.lastError = "402";
  1967.             return "false";
  1968.         }
  1969.    
  1970.         // ELSE CHECK THAT THE ELEMENT IS VALID AND HAS AT LEAST 3 PARAMS, DOESNT HAVE
  1971.         // MORE THAN 6 PARAMS  - ALL ILLEGAL
  1972.         var cmiArray = element.split(".");
  1973.         if (cmiArray.length < 3 || cmiArray.length > 6){
  1974.             API.ServerSco.lastError = "201";
  1975.             return "false";
  1976.         }
  1977.    
  1978.         var theCount = API.cmi.interactions._count.cmivalue;
  1979.    
  1980.         // IF 3RD ARG IS NOT A NUMBER THEN THROW ERROR
  1981.         // need to check cmiArray[2] to see if its a number
  1982.         if (isNaN(cmiArray[2])){
  1983.             API.ServerSco.lastError = "401";
  1984.             return "false";
  1985.         }
  1986.    
  1987.         var theCount = API.cmi.interactions._count.cmivalue;
  1988.    
  1989.         // IF ITS A NUMBER MAKE SURE ITS IN THE ARRAY BOUNDS
  1990.         if(cmiArray[2] > theCount || cmiArray[2] < 0){
  1991.             // call to array is out of bounds
  1992.             API.ServerSco.lastError = "201";
  1993.             return "false";
  1994.         }
  1995.         else if(cmiArray[2] <= theCount){
  1996.    
  1997.             //create a new one or get existing object
  1998.             var existingObjectiveHandle = API.cmi.interactions.intArray(cmiArray[2]);
  1999.             if (existingObjectiveHandle == null){
  2000.                 API.ServerSco.lastError = "101";
  2001.                 return "false";
  2002.             }
  2003.             else{
  2004.                 // we now have a reference to cmi.interactions.n
  2005.                 // if theres 4 bits to the element path then try to see if object exists
  2006.    
  2007.                 if (cmiArray.length == 4){
  2008.                     strleaf = "existingObjectiveHandle." + cmiArray[3];
  2009.                     var doesLeafExist = eval (strleaf);
  2010.                     if (doesLeafExist == null){
  2011.                         API.ServerSco.lastError = "201";
  2012.                         return "false";
  2013.                     }
  2014.                     else{
  2015.    
  2016.                         // NEXT CHECK THAT THIS ELEMENT IS NOT READONLY
  2017.                         strleafstatus = "doesLeafExist.cmireadStatus";
  2018.                         var leafstatus = eval(strleafstatus);
  2019.                         if (leafstatus == "readonly"){
  2020.                             API.ServerSco.lastError = "403";
  2021.                             return "false";
  2022.                         }
  2023.    
  2024.                         // check the datatype and vocabulary...
  2025.                         var datatype = doesLeafExist.cmidatatype;
  2026.                         res = API.ServerSco.checkDataTypeAndVocab(element, value, datatype);
  2027.                         if (res == "true"){
  2028.                             // correct datatype...
  2029.                             // WE CAN NOW TRY TO SET THE FULL OBJECT REFERENCE
  2030.                             var strleafval = "doesLeafExist.cmivalue =\"" + value + "\";";
  2031.                             var leafVal = eval(strleafval);
  2032.                             if (leafVal == null){
  2033.                                 // IT FAILED AT THE FINAL HURDLE...
  2034.                                 API.ServerSco.lastError = "201";
  2035.                                 return "false";
  2036.                            }
  2037.                            else{
  2038.                                 API.ServerSco.lastError = "0";
  2039.                                 return "true";
  2040.                            }
  2041.                        }
  2042.                        else{
  2043.                            // incorrect data type...
  2044.                            API.ServerSco.lastError = "405";
  2045.                            return "false";
  2046.                        }
  2047.                     }
  2048.                 }
  2049.                 if (cmiArray.length == 5){
  2050.                     // check object exists
  2051.                     strbranch = "existingObjectiveHandle."+ cmiArray[3] + ";";
  2052.                     var doesLeafExist = eval (strbranch);
  2053.                     if (doesLeafExist == null){
  2054.                         API.ServerSco.lastError = "201";
  2055.                         return "false";
  2056.                     }
  2057.    
  2058.                     // check final object exists in the array list...
  2059.                     nextstrbranch = "existingObjectiveHandle."+ cmiArray[3] + "." + cmiArray[4] + ";";
  2060.                     var doesLeafExist = eval (nextstrbranch);
  2061.                     if (doesLeafExist == null){
  2062.                         API.ServerSco.lastError = "201";
  2063.                         return "false";
  2064.                     }
  2065.    
  2066.                     // check for write only
  2067.                     strread = "existingObjectiveHandle."+ cmiArray[3] + "." + cmiArray[4] + ".cmireadStatus;";
  2068.                     var isWriteOnly = eval (strread);
  2069.                     if (isWriteOnly == "readonly"){
  2070.                         API.ServerSco.lastError = "403";
  2071.                         return "false";
  2072.                     }
  2073.    
  2074.                     // see if value exists
  2075.                     strleaf = "existingObjectiveHandle."+ cmiArray[3] + "." + cmiArray[4] + ".cmivalue;";
  2076.                     var doesLeafExist = eval (strleaf);
  2077.                     if (doesLeafExist == null){
  2078.                         API.ServerSco.lastError = "201";
  2079.                         return "false";
  2080.                     }
  2081.                     else{
  2082.                         // check the datatype and vocabulary...
  2083.                         var datatype = doesLeafExist.cmidatatype;
  2084.                         res = API.ServerSco.checkDataTypeAndVocab(element, value, datatype);
  2085.                         if (res == "true"){
  2086.                             // correct datatype...
  2087.                             // WE CAN NOW TRY TO SET THE FULL OBJECT REFERENCE
  2088.                             var strleafval = "doesLeafExist.cmivalue =\"" + value + "\";";
  2089.                             var leafVal = eval(strleafval);
  2090.                             if (leafVal == null){
  2091.                                 // IT FAILED AT THE FINAL HURDLE...
  2092.                                 API.ServerSco.lastError = "201";
  2093.                                 return "false";
  2094.                             }
  2095.                             else{
  2096.                                 API.ServerSco.lastError = "0";
  2097.                                 return "true";
  2098.                             }
  2099.                         }
  2100.                         else{
  2101.                            // incorrect data type...
  2102.                            API.ServerSco.lastError = "405";
  2103.                            return "false";
  2104.                         }
  2105.                     }
  2106.                 }
  2107.                 if (cmiArray.length == 6){
  2108.                     // check object exists
  2109.                     strbranch = "existingObjectiveHandle."+ cmiArray[3];
  2110.                     var doesBranchExist = eval (strbranch);
  2111.                     if (doesBranchExist == null){
  2112.                         API.ServerSco.lastError = "201";
  2113.                         return "false";
  2114.                     }
  2115.                     // The fifth argument should be an array reference, so do some checking...
  2116.    
  2117.                     // IF 5TH ARG IS NOT A NUMBER THEN THROW ERROR
  2118.                     // need to check cmiArray[4] to see if its a number
  2119.                     if (isNaN(cmiArray[4])){
  2120.                         API.ServerSco.lastError = "401";
  2121.                         return "false";
  2122.                     }
  2123.    
  2124.                     // check to see if this element has a _count
  2125.                     // If it hasn't we'll have to throw an error here
  2126.                     // because we need the correct array index for array #2...
  2127.                     var theCount = "existingObjectiveHandle." + cmiArray[3] + "._count.cmivalue;";
  2128.                     var hasCount = eval(theCount);
  2129.                     // CANT FIND _COUNT FOR THIS ELEMENT, SO THROW AN ERROR...
  2130.                     if (hasCount == null){
  2131.                         API.ServerSco.lastError = "201";
  2132.                         return "false";
  2133.                     }
  2134.                     // next need to check to see if array ref is in array bounds
  2135.                     if(cmiArray[4] > hasCount || cmiArray[4] < 0){
  2136.                         // call to array is out of bounds
  2137.                         API.ServerSco.lastError = "201";
  2138.                         return "false";
  2139.                     }
  2140.    
  2141.                     // make sure that array index 4 is either 'objectives' or 'correct_responses'
  2142.                     if (cmiArray[3] == "objectives"){
  2143.                         // next check that there is an object here at this array index...
  2144.                         var arrayIndex2Check = eval("existingObjectiveHandle." + cmiArray[3] + ".objectivesInteractionArray(" + cmiArray[4] + ")");
  2145.                         // check for null
  2146.                         if (arrayIndex2Check == null){
  2147.                             API.ServerSco.lastError = "201";
  2148.                             return "false";
  2149.                         }
  2150.                         else{
  2151.                             // next check that the last element is valid...
  2152.                             finalObjectCheck = eval ("arrayIndex2Check." + cmiArray[5]);
  2153.                             if (finalObjectCheck == null){
  2154.                                 API.ServerSco.lastError = "201";
  2155.                                 return "false";
  2156.                             }
  2157.                             else{
  2158.                                 // call must be to a valid element in the model so...
  2159.                                 // check it for readonly...
  2160.                                 isWriteonly = eval ("finalObjectCheck.cmireadStatus");
  2161.                                 if (isWriteonly == "readonly"){
  2162.                                     API.ServerSco.lastError = "403";
  2163.                                     return "false";
  2164.                                 }
  2165.                                 else{
  2166.    
  2167.                                     // check the datatype and vocabulary...
  2168.                                     var datatype = finalObjectCheck.cmidatatype;
  2169.                                     res = API.ServerSco.checkDataTypeAndVocab(element, value, datatype);
  2170.                                     if (res == "true"){
  2171.                                         // correct datatype...
  2172.                                         // WE CAN NOW TRY TO SET THE FULL OBJECT REFERENCE
  2173.                                         var strleafval = "finalObjectCheck.cmivalue =\"" + value + "\";";
  2174.                                         var leafVal = eval(strleafval);
  2175.                                         if (leafVal == null){
  2176.                                             // IT FAILED AT THE FINAL HURDLE...
  2177.                                             API.ServerSco.lastError = "201";
  2178.                                             return "false";
  2179.                                         }
  2180.                                         else{
  2181.                                            API.ServerSco.lastError = "0";
  2182.                                            return "true";
  2183.                                         }
  2184.                                    }
  2185.                                    else{
  2186.                                        // incorrect data type...
  2187.                                        API.ServerSco.lastError = "405";
  2188.                                        return "false";
  2189.                                    }
  2190.                                 }
  2191.                             }
  2192.                         }
  2193.                     }
  2194.                     else if (cmiArray[3] == "correct_responses"){
  2195.                         // next check that there is an object here at this array index...
  2196.                         var arrayIndex2Check = eval("existingObjectiveHandle." + cmiArray[3] + ".correctResponsesInteractionArray(" + cmiArray[4] + ")");
  2197.                         // check for null
  2198.                         if (arrayIndex2Check == null){
  2199.                             API.ServerSco.lastError = "201";
  2200.                             return "false";
  2201.                         }
  2202.                         else{
  2203.                             // next check that the last element is valid...
  2204.                             finalObjectCheck = eval ("arrayIndex2Check." + cmiArray[5]);
  2205.                             if (finalObjectCheck == null){
  2206.                                 API.ServerSco.lastError = "201";
  2207.                                 return "false";
  2208.                             }
  2209.                             else{
  2210.                                 // call must be to a valid element in the model so...
  2211.                                 // check it for readonly...
  2212.                                 isWriteonly = eval ("finalObjectCheck.cmireadStatus");
  2213.                                 if (isWriteonly == "readonly"){
  2214.                                     API.ServerSco.lastError = "403";
  2215.                                     return "false";
  2216.                                 }
  2217.                                 else{
  2218.                                     // check the datatype and vocabulary...
  2219.                                     var datatype = finalObjectCheck.cmidatatype;
  2220.                                     res = API.ServerSco.checkDataTypeAndVocab(element, value, datatype);
  2221.                                     if (res == "true"){
  2222.                                         // correct datatype...
  2223.                                         // WE CAN NOW TRY TO SET THE FULL OBJECT REFERENCE
  2224.                                                    var strleafval = "finalObjectCheck.cmivalue =\"" + value + "\";";
  2225.                                         var leafVal = eval(strleafval);
  2226.                                         if (leafVal == null){
  2227.                                             // IT FAILED AT THE FINAL HURDLE...
  2228.                                             API.ServerSco.lastError = "201";
  2229.                                             return "false";
  2230.                                         }
  2231.                                         else{
  2232.                                             API.ServerSco.lastError = "0";
  2233.                                             return "true";
  2234.                                         }
  2235.                                     }
  2236.                                     else{
  2237.                                         // incorrect data type...
  2238.                                         API.ServerSco.lastError = "405";
  2239.                                         return "false";
  2240.                                     }
  2241.                                 }
  2242.                             }
  2243.                         }
  2244.                     }
  2245.                     else {
  2246.                         // throw an error because 4th arg was not either
  2247.                         // objectives or correct_responses
  2248.                         API.ServerSco.lastError = "201";
  2249.                         return "false";
  2250.                     }
  2251.                 }
  2252.             }
  2253.         }
  2254.     }
  2255.    
  2256.     /*
  2257.     * LMSGetValue.  Method to allow sco to read/access CMI datamodel elements
  2258.     */
  2259.     function LMSGetValueMethod(element){
  2260.         if(this.ServerSco.isInitialized=="true"){
  2261.             var invalid = "false";
  2262.             var cannotHaveChildren = "false";
  2263.             var isNotAnArray = "false";
  2264.    
  2265.             // this checks to make sure there is at least one dot in the value
  2266.             if (element.indexOf(".")== -1){
  2267.                 invalid = "true";
  2268.             }
  2269.    
  2270.             // dont bother doing this if we have already found an error...
  2271.             if (invalid != "true"){
  2272.                 // we then loop around the children, making sure they exist one, by one...
  2273.                 var cmiArray = element.split(".");
  2274.                 var teststring = "this";
  2275.                 for(i=0;i<cmiArray.length;i++){
  2276.                     doesExist = eval(teststring + "." + cmiArray[i]+ ";");
  2277.                     if(doesExist == null){
  2278.                         invalid="true";
  2279.                         // check for invalid _children call
  2280.                         if (cmiArray[i]=="_children"){
  2281.                             cannotHaveChildren = "true";
  2282.                         }
  2283.                         // check for invalid _count call
  2284.                         if (cmiArray[i]=="_count"){
  2285.                             isNotAnArray = "true";
  2286.                         }
  2287.                         break;
  2288.                     }
  2289.                     else{
  2290.                         teststring = teststring + "." + cmiArray[i];
  2291.                         // WE NEED TO TRAP THE OBJECTIVES...
  2292.                         if (teststring=="this.cmi.objectives"){
  2293.                             return dealWithGettingObjectives(element);
  2294.                         }
  2295.                         // WE NEED TO TRAP THE INTERACTIONS...
  2296.                         if (teststring=="this.cmi.interactions"){
  2297.                             return dealWithGettingInteractions(element);
  2298.                         }
  2299.                     }
  2300.                 }
  2301.             }
  2302.    
  2303.             // user tried to call _count on a non-array value
  2304.             if (isNotAnArray=="true"){
  2305.                 this.ServerSco.lastError = "203";
  2306.                 return "";
  2307.             }
  2308.    
  2309.             // user tried to call _children on an element that didnt support it
  2310.             if (cannotHaveChildren=="true"){
  2311.                 this.ServerSco.lastError = "202";
  2312.                 return "";
  2313.             }
  2314.    
  2315.             // if there was some kind of error found above, then...
  2316.             if (invalid == "true"){
  2317.                 this.ServerSco.lastError = "401";
  2318.                 return "";
  2319.             }
  2320.             else{
  2321.                 // otherwise its a valid model reference...
  2322.                 elementObj = eval ("this."+element);
  2323.             }
  2324.    
  2325.             // next we will check to make sure this element is not writeonly..
  2326.             if (elementObj.cmireadStatus == "writeonly"){
  2327.                 this.ServerSco.lastError = "404";
  2328.                 return "";
  2329.             }
  2330.             else{
  2331.                 // its okay and user can read it...
  2332.                 this.ServerSco.lastError = "0";
  2333.                 return elementObj.cmivalue;
  2334.             }
  2335.         }
  2336.         else{
  2337.             // not initialized...
  2338.             this.ServerSco.lastError = "301";
  2339.             return "";
  2340.         }
  2341.     }
  2342.    
  2343.    
  2344.    
  2345.     /*
  2346.     * LMSSetValue.  Method to allow sco to write data to CMI datamodel
  2347.     */
  2348.     function LMSSetValueMethod(element, value){
  2349.          value = unescape(value)  ;
  2350.          if (this.ServerSco.isInitialized == "true"){
  2351.             var invalid = "false";
  2352.             var cannotHaveChildren = "false";
  2353.             var isNotAnArray = "false";
  2354.    
  2355.                     // check for sco trying to set _children & _count
  2356.                     //element is a keyword, cannot set...
  2357.                     if (element.indexOf("._children") != -1 || element.indexOf("._count") != -1){
  2358.                             this.ServerSco.lastError = "402";
  2359.                             return "false";
  2360.                     }
  2361.    
  2362.             // this checks to make sure there is at least one dot in the value
  2363.                     // if it doesnt, then it cant be a valid CMI model reference
  2364.             if (element.indexOf(".")== -1){
  2365.                 invalid = "true";
  2366.             }
  2367.    
  2368.             // dont bother doing this if we have already found an error...
  2369.             if (invalid != "true"){
  2370.                 // we then loop around the children, making sure they exist one, by one...
  2371.                 var cmiArray = element.split(".");
  2372.                 var teststring = "this";
  2373.                 for(i=0;i<cmiArray.length;i++){
  2374.                     doesExist = eval(teststring + "." + cmiArray[i]+ ";");
  2375.                     if(doesExist == null){
  2376.                         invalid="true";
  2377.                         // check for invalid _children call
  2378.                         if (cmiArray[i]=="_children"){
  2379.                             cannotHaveChildren = "true";
  2380.                         }
  2381.                         // check for invalid _count call
  2382.                         if (cmiArray[i]=="_count"){
  2383.                             isNotAnArray = "true";
  2384.                         }
  2385.                         break;
  2386.                     }
  2387.                     else{
  2388.                         teststring = teststring + "." + cmiArray[i];
  2389.                         // WE NEED TO TRAP THE OBJECTIVES...
  2390.                         if (teststring=="this.cmi.objectives"){
  2391.                             return dealWithSettingObjectives(element, value);
  2392.                         }
  2393.                         // WE NEED TO TRAP THE INTERACTIONS...
  2394.                         if (teststring=="this.cmi.interactions"){
  2395.                             return dealWithSettingInteractions(element, value);
  2396.                         }
  2397.                     }
  2398.                 }
  2399.             }
  2400.    
  2401.             // user tried to call _count on a non-array value
  2402.             if (isNotAnArray=="true"){
  2403.                 this.ServerSco.lastError = "203";
  2404.                 return "false";
  2405.             }
  2406.    
  2407.             // user tried to call _children on an element that didnt support it
  2408.             if (cannotHaveChildren=="true"){
  2409.                 this.ServerSco.lastError = "202";
  2410.                 return "false";
  2411.             }
  2412.    
  2413.             // if there was some kind of error found above, then...
  2414.             if (invalid=="true"){
  2415.                 this.ServerSco.lastError = "401";
  2416.                 return "false";
  2417.             }
  2418.             else{
  2419.                 // otherwise its a valid model reference...
  2420.                 elementObj = eval ("this."+element);
  2421.             }
  2422.    
  2423.             // check that its writeable...
  2424.             if (elementObj.cmireadStatus == "readonly"){
  2425.                 //--------------------------------------------------------------------------------- ECCEZ.
  2426.                 if(element == 'cmi.core.total_time'){
  2427.                     saveTime(value);
  2428.                     this.ServerSco.lastError = "0";
  2429.                     return "true";
  2430.                 }else{
  2431.                     // stringa di codice originale
  2432.                     this.ServerSco.lastError = "403";
  2433.                     return "false";
  2434.                 }
  2435.                 //---------------------------------------------------------------------------------
  2436.             }
  2437.             else{
  2438.                 // check the datatype and vocabulary...
  2439.                 var datatype = elementObj.cmidatatype;
  2440.                 res = this.ServerSco.checkDataTypeAndVocab(element, value, datatype);
  2441.                 if (res == "true"){
  2442.                     // correct datatype...
  2443.                     // cmi.comments need to be appended...
  2444.                     if (element == "cmi.comments"){
  2445.                         pre = this.LMSGetValue("cmi.comments");
  2446.                         setString = "this." + element + ".cmivalue =\"" + pre + value + "\";";
  2447.                     }
  2448.                     else{
  2449.                         setString = "this." + element + ".cmivalue =\"" + value + "\";";
  2450.                     }
  2451.                     var result = eval(setString);
  2452.                     this.ServerSco.lastError = "0";
  2453.                     return "true";
  2454.                 }
  2455.                 else{
  2456.                     // incorrect data type...
  2457.                     this.ServerSco.lastError = "405";
  2458.                     return "false";
  2459.                 }
  2460.             }
  2461.         }
  2462.         else{
  2463.             // not initialized...
  2464.             this.ServerSco.lastError = "301";
  2465.             return "false";
  2466.         }
  2467.     }
  2468.    
  2469.     function LMSGetErrorStringMethod(errorCode){
  2470.         switch (errorCode)
  2471.         {
  2472.             case "0":   { return "No error"; break }
  2473.             case "101": { return "General exception"; break  }
  2474.             case "201": { return "Invalid argument error"; break }
  2475.             case "202": { return "Element cannot have children"; break  }
  2476.             case "203": { return "Element not an array - Cannot have count"; break  }
  2477.             case "301": { return "Not initialized"; break  }
  2478.             case "401": { return "Not implemented error"; break  }
  2479.             case "402": { return "Invalid set value, element is a keyword"; break  }
  2480.             case "403": { return "Element is read only"; break  }
  2481.             case "404": { return "Element is write only"; break  }
  2482.             case "405": { return "Incorrect Data Type"; break  }
  2483.             default:    { return ""; break }
  2484.         }
  2485.         // just to be safe...
  2486.         return;
  2487.     }
  2488.    
  2489.     function LMSGetLastErrorMethod(){
  2490.         return this.ServerSco.lastError;
  2491.     }
  2492.    
  2493.     function LMSGetDiagnosticMethod(errorCode){
  2494.         if (errorCode==""){
  2495.             errorCode=this.ServerSco.lastError;
  2496.         }
  2497.         switch (errorCode)
  2498.         {
  2499.             case "0":   { return "No error. No errors were encountered. Successful API call."; break }
  2500.             case "101": { return "General exception. An unexpected error was encountered."; break  }
  2501.             case "201": { return "Invalid argument error. A call was made to a DataModel element that does not exist."; break }
  2502.             case "202": { return "Element cannot have children. A call was made to an Element that does not support _children"; break  }
  2503.             case "203": { return "Element is not an array.  Cannot have count. A call was made to an Element that does not support _count."; break  }
  2504.             case "301": { return "Not initialized. The SCO has not yet been initialized.  It needs to call LMSInitialize() first."; break  }
  2505.             case "401": { return "Not implemented error.  A call was made to a DataModel element that is not supported."; break  }
  2506.             case "402": { return "Invalid set value, element is a keyword.  Keyword values cannot be changed"; break  }
  2507.             case "403": { return "Element is read only.  A call was made to set the value of a read-only element."; break  }
  2508.             case "404": { return "Element is write only.  A call was made to get the value of a write-only element."; break  }
  2509.             case "405": { return "Incorrect Data Type.  The syntax of a call to change an element was incorrect."; break  }
  2510.             default:    { return ""; break }
  2511.         }
  2512.     }
  2513.    
  2514.     /*
  2515.     * --------------------------------------------------------------------------------------------------
  2516.     *   Datatype and vocabulary checking
  2517.     * --------------------------------------------------------------------------------------------------
  2518.     */
  2519.    
  2520.     /*
  2521.     * Method to check the datatype and vocabulary of an element
  2522.     * returns true or false...
  2523.     */
  2524.     function scoCheckDataTypeAndVocab (element, value, datatype){
  2525.         switch (datatype)
  2526.         {
  2527.             case "CMIBlank":   { return checkCMIBlank(value); break }
  2528.             case "CMIBoolean": { return checkCMIBoolean(value); break  }
  2529.             case "CMIDecimal": { return checkCMIDecimal(value); break }
  2530.             case "CMIFeedback": { return  checkCMIFeedback(element, value); break  }
  2531.             case "CMIIdentifier": { return  checkCMIIdentifier(value); break  }
  2532.             case "CMIInteger": { return checkCMIInteger(value); break  }
  2533.             case "CMISInteger": { return checkCMISInteger(element, value); break  }
  2534.             case "CMIString255": { return checkCMIString255(value); break  }
  2535.             case "CMIString4096": { return checkCMIString4096(value); break  }
  2536.             case "CMITime": { return checkCMITime(value); break  }
  2537.             case "CMITimespan": { return checkCMITimespan(value); break  }
  2538.             case "CMIVocabularyCredit": { return checkCMIVocabularyCredit(value); break  }
  2539.             case "CMIVocabularyStatus": { return checkCMIVocabularyStatus(element, value); break  }
  2540.             case "CMIVocabularyEntry": { return checkCMIVocabularyEntry(value); break  }
  2541.             case "CMIVocabularyMode": { return checkCMIVocabularyMode(value); break  }
  2542.             case "CMIVocabularyExit": { return checkCMIVocabularyExit(value); break  }
  2543.             case "CMIVocabularyTimeLimitAction": { return checkCMIVocabularyTimeLimitAction(value); break  }
  2544.             case "CMIVocabularyInteraction": { return checkCMIVocabularyInteraction(value); break  }
  2545.             case "CMIVocabularyResult": { return checkCMIVocabularyResult(value); break  }
  2546.             case "CMIDecimalOrCMIBlank": { return checkCMIDecimalOrCMIBlank(value); break  }
  2547.             default:    { return "true"; break }
  2548.         }
  2549.     }
  2550.    
  2551.     function checkCMIDecimalOrCMIBlank(value){
  2552.    
  2553.         var isBlank = checkCMIBlank(value);
  2554.         var isCMIDecimal = checkCMIDecimal(value);
  2555.         if (isBlank == "true" || isCMIDecimal == "true"){
  2556.             if (value > 100 || value < 0){
  2557.                 return "false";
  2558.             }
  2559.             else{
  2560.                 return "true";
  2561.             }
  2562.         }else{
  2563.             return "false";
  2564.         }
  2565.     }
  2566.    
  2567.     function checkCMIVocabularyResult(value){
  2568.         var ans = checkCMIDecimal(value);
  2569.         if (ans == "true"){
  2570.             return "true";
  2571.         }
  2572.         if (value == "correct" || value == "wrong" ||
  2573.             value == "unanticipated" || value == "neutral"){
  2574.             return "true";
  2575.         }
  2576.         else{
  2577.             return "false";
  2578.         }
  2579.     }
  2580.    
  2581.    
  2582.     function checkCMIVocabularyInteraction(value){
  2583.         if (value == "true-false" || value == "choice" ||
  2584.             value == "fill-in" || value == "matching" ||
  2585.             value == "performance" || value == "likert" ||
  2586.             value == "sequencing" || value == "numeric"){
  2587.             return "true";
  2588.         }
  2589.         else{
  2590.             return "false";
  2591.         }
  2592.     }
  2593.    
  2594.     function checkCMIVocabularyTimeLimitAction(value){
  2595.         if (value == "exit,message" || value == "exit,no message" ||
  2596.             value == "continue,message" || value == "continue,no message"){
  2597.             return "true";
  2598.         }
  2599.         else{
  2600.             return "false";
  2601.         }
  2602.     }
  2603.    
  2604.     function checkCMIVocabularyExit(value){
  2605.         if (value == "time-out" || value == "suspend" ||
  2606.             value == "logout" || value == ""){
  2607.             return "true";
  2608.         }
  2609.         else{
  2610.             return "false";
  2611.         }
  2612.     }
  2613.    
  2614.     function checkCMIVocabularyMode(value){
  2615.         if (value == "normal" || value == "review" || value == "browse"){
  2616.             return "true";
  2617.         }
  2618.         else{
  2619.             return "false";
  2620.         }
  2621.     }
  2622.    
  2623.     function checkCMIVocabularyEntry(value){
  2624.         if (value == "ab-initio" || value == "resume" || value == ""){
  2625.             return "true";
  2626.         }
  2627.         else{
  2628.             return "false";
  2629.         }
  2630.     }
  2631.    
  2632.     function checkCMIVocabularyStatus(element, value){
  2633.         // sco cannot set lesson_status to not attempted
  2634.         if (element == "cmi.core.lesson_status" && value == "not attempted"){
  2635.             return false;
  2636.         }
  2637.         if (value == "passed" || value == "completed" ||
  2638.             value == "failed" || value == "incomplete" ||
  2639.             value == "browsed" || value == "not attempted"){
  2640.             return "true";
  2641.         }
  2642.         else{
  2643.             return "false";
  2644.         }
  2645.     }
  2646.    
  2647.     function checkCMIVocabularyCredit(value){
  2648.         if (value == "credit" || value == "no-credit"){
  2649.             return "true";
  2650.         }
  2651.         else{
  2652.             return "false";
  2653.         }
  2654.     }
  2655.    
  2656.    
  2657.     function checkCMITimespan(value){
  2658.        // must have some colons...
  2659.        if (value.indexOf(":") == -1){
  2660.            return "false";
  2661.        }
  2662.        // must contain at least 2 colons, giving 3 array elements...
  2663.        var cmiArray = value.split(":");
  2664.        if (cmiArray.length < 3){
  2665.           return "false";
  2666.        }
  2667.        // hours must be 4,3 or 2 digits...
  2668.        if (cmiArray[0].length < 2 || cmiArray[0].length > 4  ){
  2669.           return "false";
  2670.        }
  2671.        // minutes must be 2 digits...
  2672.        if (cmiArray[1].length != 2){
  2673.           return "false";
  2674.        }
  2675.        // must be numbers...
  2676.        if (isNaN(cmiArray[0]) || isNaN(cmiArray[1]) || isNaN(cmiArray[2])){
  2677.           return "false";
  2678.        }
  2679.        // 24hr clock for hours...
  2680.        if (parseInt(cmiArray[0]) < 0){
  2681.           return "false";
  2682.        }
  2683.        // parse minutes
  2684.        // NOTE: Seems illegal to have 99 minutes, but ADL 1.2
  2685.        // SCORM Conformance Test Suite does this? I'll do the same...
  2686.        // if (parseInt(cmiArray[1]) < 0 || parseInt(cmiArray[1]) > 59){
  2687.        if (parseInt(cmiArray[1]) < 0){
  2688.           return "false";
  2689.        }
  2690.        // check for decimal place...
  2691.        if (cmiArray[2].indexOf(".") != -1){
  2692.            var cmiDecArray = cmiArray[2].split(".");
  2693.            // can only be 2 values here...
  2694.            if (cmiDecArray.length != 2){
  2695.                return "false";
  2696.            }
  2697.            // again they must be numbers...
  2698.            if (isNaN(cmiDecArray[0]) || isNaN(cmiDecArray[1])){
  2699.                return "false";
  2700.            }
  2701.            // only two digits allowed for seconds...
  2702.            if (cmiDecArray[0].length != 2){
  2703.                return "false";
  2704.            }
  2705.            // make sure there is less than 60 seconds here...
  2706.            if (parseInt(cmiDecArray[0]) > 59 ){
  2707.               return "false";
  2708.            }
  2709.            // only one or two digits allowed for milliseconds...
  2710.            if (cmiDecArray[1].length > 2){
  2711.                return "false";
  2712.            }
  2713.        }
  2714.        else{
  2715.            // no dots, so must be no milliseconds...
  2716.            // make sure length is 2
  2717.            if (cmiArray[2].length != 2){
  2718.                return "false";
  2719.            }
  2720.            // make sure there is less than 60 seconds here...
  2721.            if (parseInt(cmiArray[2]) > 59 ){
  2722.               return "false";
  2723.            }
  2724.        }
  2725.        // got up to here, then value okay...
  2726.        return "true";
  2727.     }
  2728.    
  2729.     function checkCMITime(value){
  2730.    
  2731.        // must have some colons...
  2732.        if (value.indexOf(":") == -1){
  2733.            return "false";
  2734.        }
  2735.        // must contain at least 2 colons, giving 3 array elements...
  2736.        var cmiArray = value.split(":");
  2737.        if (cmiArray.length < 3){
  2738.           return "false";
  2739.        }
  2740.        // hours & minutes must be 2 digits...
  2741.        if (cmiArray[0].length != 2 || cmiArray[1].length != 2){
  2742.           return "false";
  2743.        }
  2744.        // must be numbers...
  2745.        if (isNaN(cmiArray[0]) || isNaN(cmiArray[1]) || isNaN(cmiArray[2])){
  2746.           return "false";
  2747.        }
  2748.        // 24hr clock for hours...
  2749.        if (parseInt(cmiArray[0]) < 0 || parseInt(cmiArray[0]) > 23){
  2750.           return "false";
  2751.        }
  2752.        // parse minutes
  2753.        if (parseInt(cmiArray[1]) < 0 || parseInt(cmiArray[1]) > 59){
  2754.           return "false";
  2755.        }
  2756.        // check for decimal place...
  2757.        if (cmiArray[2].indexOf(".") != -1){
  2758.            var cmiDecArray = cmiArray[2].split(".");
  2759.            // can only be 2 values here...
  2760.            if (cmiDecArray.length != 2){
  2761.                return "false";
  2762.            }
  2763.            // again they must be numbers...
  2764.            if (isNaN(cmiDecArray[0]) || isNaN(cmiDecArray[1])){
  2765.                return "false";
  2766.            }
  2767.            // only two digits allowed for seconds...
  2768.            if (cmiDecArray[0].length != 2){
  2769.                return "false";
  2770.            }
  2771.            // make sure there is less than 60 seconds here...
  2772.            if (parseInt(cmiDecArray[0]) > 59 ){
  2773.               return "false";
  2774.            }
  2775.            // only one or two digits allowed for milliseconds...
  2776.            if (cmiDecArray[1].length > 2){
  2777.                return "false";
  2778.            }
  2779.        }
  2780.        else{
  2781.            // no dots, so must be no milliseconds...
  2782.            // make sure length is 2
  2783.            if (cmiArray[2].length != 2){
  2784.                return "false";
  2785.            }
  2786.            // make sure there is less than 60 seconds here...
  2787.            if (parseInt(cmiArray[2]) > 59 ){
  2788.               return "false";
  2789.            }
  2790.        }
  2791.        // got up to here, then value okay...
  2792.        return "true";
  2793.     }
  2794.    
  2795.    
  2796.     function checkCMIString4096(value){
  2797.         if (value.length <= 4096){
  2798.            return "true";
  2799.         }
  2800.         else{
  2801.            return "false";
  2802.         }
  2803.     }
  2804.    
  2805.     function checkCMIString255(value){
  2806.         if (value.length <= 255){
  2807.            return "true";
  2808.         }
  2809.         else{
  2810.            return "false";
  2811.         }
  2812.     }
  2813.    
  2814.     function checkCMISInteger(element, value){
  2815.         if(isNaN(value)){
  2816.             return "false";
  2817.         }
  2818.         else{
  2819.             var num = parseInt(value);
  2820.             if (num >= -32768 && num <= 32768){
  2821.                 if (element == "cmi.student_preference.audio"){
  2822.                     if (num < -1 || num > 100){
  2823.                         return "false";
  2824.                     }
  2825.                     else{
  2826.                         return "true";
  2827.                     }
  2828.                 }
  2829.                 else if (element == "cmi.student_preference.speed"){
  2830.                     if (num < -100 || num > 100){
  2831.                         return "false";
  2832.                     }
  2833.                     else{
  2834.                         return "true";
  2835.                     }
  2836.                 }
  2837.                 else if (element == "cmi.student_preference.text"){
  2838.                     if (num < -1 || num > 1){
  2839.                         return "false";
  2840.                     }
  2841.                     else{
  2842.                         return "true";
  2843.                     }
  2844.                 }
  2845.                 else{
  2846.                     return "true";
  2847.                 }
  2848.             }
  2849.             else{
  2850.                 return "false";
  2851.             }
  2852.         }
  2853.     }
  2854.    
  2855.     function checkCMIInteger(value){
  2856.         if(isNaN(value)){
  2857.             return "false";
  2858.         }
  2859.         else{
  2860.             var num = parseInt(value);
  2861.             if (num >= 0 && num <= 65536){
  2862.                 return "true";
  2863.             }
  2864.             else{
  2865.                 return "false";
  2866.             }
  2867.         }
  2868.     }
  2869.    
  2870.     function checkCMIIdentifier(value){
  2871.         var SPACE = ' ';
  2872.         var TAB = '\t';
  2873.         var CRETURN = '\r';
  2874.         var LINEFEED = '\n';
  2875.         if (value.indexOf(SPACE) == -1 && value.indexOf(TAB) == -1
  2876.          && value.indexOf(CRETURN) == -1 && value.indexOf(LINEFEED) == -1){
  2877.             if (value.length > 0 && value.length < 256){
  2878.                 return "true";
  2879.             }
  2880.             else{
  2881.                 return "false";
  2882.             }
  2883.         }
  2884.         else{
  2885.             return "false";
  2886.         }
  2887.     }
  2888.    
  2889.    
  2890.    
  2891.     function checkCMIFeedback(element, value){
  2892.         // allow user to edit var at top of page to disable this checking...
  2893.         if (looseChecking == "false"){
  2894.             // need to find the type (if its set)
  2895.             var cmiArray = element.split(".");
  2896.             // need to check cmiArray[2] to see if its a number
  2897.             if (isNaN(cmiArray[2])){
  2898.                 // this should be a number. However, Err on the side of caution...
  2899.                 return "false";
  2900.             }
  2901.             // make sure that this interaction already exists...
  2902.             var res = API.LMSGetValue("cmi.interactions._count");
  2903.             if (parseInt(cmiArray[2]) >= parseInt(res)){
  2904.                 // then this interaction does not exist.. However, Err on the side of caution...
  2905.                 return "false";
  2906.             }
  2907.             // Up to here? - then get the type
  2908.             var theType = "cmi.interactions.intArray("+cmiArray[2]+").type";
  2909.             elementObj = eval("API."+theType+";");
  2910.             if (elementObj == null){
  2911.                 return "false";
  2912.             }
  2913.             datatype = elementObj.cmivalue;
  2914.    
  2915.             if (datatype == null){
  2916.                 return "false";
  2917.             }
  2918.             // its not null, so it equals something, so...
  2919.             switch (datatype)
  2920.             {
  2921.                 case "true-false":   { return checkTrueFalse(value); break }
  2922.                 case "choice":   { return checkChoice(value); break }
  2923.                 case "fill-in":   { return checkFillIn(value); break }
  2924.                 case "numeric":   { return checkCMIDecimal(value); break }
  2925.                 case "likert":   { return checkLikert(value); break }
  2926.                 case "matching":   { return checkMatching(value); break }
  2927.                 case "performance":   { return checkCMIString255(value); break }
  2928.                 case "sequencing":   { return checkSequencing(value); break }
  2929.                 // if its not been set then we should return false.  That would mean
  2930.                 // that a cmi.interaction.n.type MUST have a value and cannot be empty
  2931.                 default:   { return "false"; break }
  2932.             }
  2933.         }
  2934.         else{
  2935.             return "true";
  2936.         }
  2937.    
  2938.     }
  2939.    
  2940.     function checkMatching(value){
  2941.       // check for n.n
  2942.       var TEST_VAL = /^[a-z,A-Z,0-9]{1}.{1}[a-z,A-Z,0-9]{1}$/;
  2943.       // check for n.n,n.n,n.n etc
  2944.       var TEST_VAL2 = /^[a-z,A-Z,0-9]{1}.{1}[a-z,A-Z,0-9]{1},{1}([a-z,A-Z,0-9]{1}.{1}[a-z,A-Z,0-9]{1},{1})*[a-z,A-Z,0-9]{1}.{1}[a-z,A-Z,0-9]{1}$/;
  2945.       // check for {n.n,n.n,n.n etc }
  2946.       // Bugfix Mozilla firebird didnt like this line below
  2947.       // var TEST_VAL3 = /^{[a-z,A-Z,0-9]{1}.{1}[a-z,A-Z,0-9]{1},{1}([a-z,A-Z,0-9]{1}.{1}[a-z,A-Z,0-9]{1},{1})*[a-z,A-Z,0-9]{1}.{1}[a-z,A-Z,0-9]{1}}$/;
  2948.       var TEST_VAL3 = /^[a-z,A-Z,0-9]{1}.{1}[a-z,A-Z,0-9]{1},{1}([a-z,A-Z,0-9]{1}.{1}[a-z,A-Z,0-9]{1},{1})*[a-z,A-Z,0-9]{1}.{1}[a-z,A-Z,0-9]{1}$/;
  2949.       if (TEST_VAL.test(value)) {
  2950.           return "true";
  2951.       }
  2952.       else if (TEST_VAL2.test(value)) {
  2953.           return "true";
  2954.       }
  2955.       else if (TEST_VAL3.test(value)) {
  2956.           return "true";
  2957.       }
  2958.       else{
  2959.           return "false";
  2960.       }
  2961.     }
  2962.    
  2963.    
  2964.     function checkSequencing(value){
  2965.    
  2966.       // test for single a-z 0-9
  2967.       var TEST_VAL = /^[a-z,A-Z,0-9]{1}$/;
  2968.    
  2969.       // test for format 1,2,3,a,b,c
  2970.       var TEST_VAL2 = /^[a-z,A-Z,0-9]{1},{1}([a-z,A-Z,0-9],)*[a-z,A-Z,0-9]{1}$/;
  2971.    
  2972.       if (TEST_VAL.test(value)) {
  2973.           return "true";
  2974.       }
  2975.       else if (TEST_VAL2.test(value)) {
  2976.           return "true";
  2977.       }
  2978.       else{
  2979.           return "false";
  2980.       }
  2981.     }
  2982.    
  2983.     function checkChoice(value){
  2984.       // test for single a-z 0-9
  2985.       var TEST_VAL = /^[a-z,A-Z,0-9]{1}$/;
  2986.    
  2987.       // test for format 1,2,3,a,b,c
  2988.       var TEST_VAL2 = /^[a-z,A-Z,0-9]{1},{1}([a-z,A-Z,0-9],)*[a-z,A-Z,0-9]{1}$/;
  2989.    
  2990.       // test for format {1,2,3,a,b,c}
  2991.       // Bugfix Mozilla firebird didnt like this line below
  2992.       //var TEST_VAL3 = /^{[a-z,A-Z,0-9]{1},{1}([a-z,A-Z,0-9],)*[a-z,A-Z,0-9]{1}}$/;
  2993.       var TEST_VAL3 = /^[a-z,A-Z,0-9]{1},{1}([a-z,A-Z,0-9],)*[a-z,A-Z,0-9]{1}$/;
  2994.      
  2995.       if (TEST_VAL.test(value)) {
  2996.           return "true";
  2997.       }
  2998.       else if (TEST_VAL2.test(value)) {
  2999.           return "true";
  3000.       }
  3001.       else if (TEST_VAL3.test(value)) {
  3002.           return "true";
  3003.       }
  3004.       else{
  3005.           return "false";
  3006.       }
  3007.     }
  3008.    
  3009.    
  3010.     function checkFillIn(value){
  3011.         return checkCMIString255(value);
  3012.     }
  3013.    
  3014.    
  3015.     function checkTrueFalse(value){
  3016.         if (value == "0" || value == "1" || value == "t" || value == "f" || value == "T" || value == "F"){
  3017.             return "true";
  3018.         }
  3019.         else{
  3020.             return "false";
  3021.         }
  3022.     }
  3023.    
  3024.    
  3025.     function checkLikert(value){
  3026.       if (value.length == 0){
  3027.           return "true";
  3028.       }
  3029.       if (value.length > 1){
  3030.           return "false";
  3031.       }
  3032.       var TEST_VAL = /^[a-z,A-Z,0-9]{1}$/;
  3033.       if (TEST_VAL.test(value)) {
  3034.           return "true";
  3035.       }
  3036.       else{
  3037.           return "false";
  3038.       }
  3039.     }
  3040.    
  3041.    
  3042.     function checkCMIDecimal(value){
  3043.        if (isNaN(value)){
  3044.             return "false";
  3045.        }
  3046.        else{
  3047.             return "true";
  3048.        }
  3049.     }
  3050.    
  3051.     function checkCMIBoolean(value){
  3052.        if (value == "true" || value == "false"){
  3053.             return "true";
  3054.        }
  3055.        else{
  3056.             return "false";
  3057.        }
  3058.     }
  3059.    
  3060.     function checkCMIBlank(value){
  3061.        if (value != ""){
  3062.            return "false";
  3063.        }
  3064.        else{
  3065.            return "true";
  3066.        }
  3067.     }
  3068.    
  3069.    
  3070.     /*
  3071.     * ----------------------------------------------------------------------------------------------------
  3072.     *
  3073.     *   The CMI Client side data models
  3074.     *
  3075.     * ----------------------------------------------------------------------------------------------------
  3076.     */
  3077.    
  3078.    
  3079.    
  3080.     function CMIModel (){
  3081.         this._version = new CMIComponent("_version", "3.4", "readonly", "");
  3082.         this.core = new CMICoreModel;
  3083.         this.suspend_data = new CMIComponent("suspend_data", "", "both", "CMIString4096");
  3084.         this.launch_data = new CMIComponent("launch_data","","readonly", "CMIString4096");
  3085.         this.comments = new CMIComponent("comments","","both", "CMIString4096");
  3086.         this.comments_from_lms = new CMIComponent("comments_from_lms","","readonly", "CMIString4096");
  3087.         this.objectives = new ObjectivesModel;
  3088.         this.student_data = new StudentDataModel;
  3089.         this.student_preference = new StudentPreferenceModel;
  3090.         this.interactions = new InteractionsModel;
  3091.     }
  3092.    
  3093.    
  3094.     function CMICoreModel(){
  3095.         this._children = new CMIComponent("_children", "student_id,student_name,lesson_location,credit,lesson_status,entry,score,total_time,lesson_mode,exit,session_time", "readonly", "CMIString255");
  3096.         this.student_id = new CMIComponent("student_id", "", "readonly", "CMIIdentifier");
  3097.         this.student_name = new CMIComponent("student_name", "", "readonly", "CMIString255");
  3098.         this.lesson_location = new CMIComponent("lesson_location", "", "both", "CMIString255");
  3099.         this.credit = new CMIComponent("credit", "", "readonly", "CMIVocabularyCredit");
  3100.         this.lesson_status = new CMIComponent("lesson_status", "", "both", "CMIVocabularyStatus");
  3101.         this.entry = new CMIComponent("entry","","readonly", "CMIVocabularyEntry");
  3102.         this.score = new CMIScore;
  3103.         this.total_time = new CMIComponent("total_time", "", "readonly", "CMITimespan");
  3104.         this.lesson_mode = new CMIComponent("lesson_mode", "", "readonly", "CMIVocabularyMode");
  3105.         this.exit = new CMIComponent("exit", "", "writeonly", "CMIVocabularyExit");
  3106.         this.session_time = new CMIComponent("session_time", "", "writeonly", "CMITimespan");
  3107.     }
  3108.    
  3109.    
  3110.     function CMIScore(){
  3111.         this._children = new  CMIComponent("_children", "raw,min,max", "readonly", "CMIString255");
  3112.         this.raw = new CMIComponent("raw", "", "both", "CMIDecimalOrCMIBlank");
  3113.         this.max = new CMIComponent("max", "", "both", "CMIDecimalOrCMIBlank");
  3114.         this.min = new CMIComponent("min", "", "both", "CMIDecimalOrCMIBlank");
  3115.     }
  3116.    
  3117.    
  3118.     function StudentPreferenceModel(){
  3119.         this._children = new CMIComponent("_children", "audio,language,speed,text", "readonly", "CMIString255");
  3120.         this.audio = new CMIComponent("audio", "0", "both", "CMISInteger");
  3121.         this.language = new CMIComponent("language", "", "both", "CMIString255");
  3122.         this.speed = new CMIComponent("speed", "0", "both", "CMISInteger");
  3123.         this.text = new CMIComponent("text", "0", "both", "CMISInteger");
  3124.     }
  3125.    
  3126.    
  3127.     function StudentDataModel(){
  3128.         this._children = new CMIComponent("_count", "mastery_score,max_time_allowed,time_limit_action", "readonly", "CMIString255");
  3129.         this.mastery_score = new CMIComponent("mastery_score", "", "readonly", "CMIDecimal");
  3130.         this.max_time_allowed = new CMIComponent("max_time_allowed", "", "readonly", "CMITimespan");
  3131.         this.time_limit_action = new CMIComponent("time_limit_action", "", "readonly", "CMIVocabularyTimeLimitAction");
  3132.     }
  3133.    
  3134.    
  3135.    
  3136.     /*
  3137.     *  The CMI objectives model
  3138.     */
  3139.    
  3140.     function ObjectivesModel(){
  3141.         this._children = new CMIComponent("_children", "id,score,status", "readonly", "CMIString255");
  3142.         this._count = new CMIComponent("_count", 0, "readonly", "CMIInteger");
  3143.         this.objArray = ObjectiveArrayModel;
  3144.         this.objArr = new Array();
  3145.     }
  3146.    
  3147.     function ObjectiveArrayModel(index){
  3148.         if(index>this._count.cmivalue-1){
  3149.             if (index == this._count.cmivalue){
  3150.                 // then create new one...
  3151.                 this.objArr[index] = new singleObjectiveModel();
  3152.                 this._count.cmivalue = this._count.cmivalue + 1;
  3153.                 return this.objArr[index];
  3154.             }
  3155.             else{
  3156.                 return "false";
  3157.             }
  3158.         }
  3159.         else{
  3160.             // we must be talking about this one so return object..
  3161.             return this.objArr[index];
  3162.         }
  3163.     }
  3164.    
  3165.    
  3166.     function singleObjectiveModel(){
  3167.         this.id = new CMIComponent("id", "", "both", "CMIIdentifier");
  3168.         this.score = new objectiveScoreModel;
  3169.         this.status = new CMIComponent("status", "", "both", "CMIVocabularyStatus");
  3170.     }
  3171.    
  3172.     function objectiveScoreModel(){
  3173.         this._children = new CMIComponent("_children", "raw,min,max", "readonly", "CMIString255");
  3174.         this.raw = new CMIComponent("raw", "", "both", "CMIDecimalOrCMIBlank");
  3175.         this.min = new CMIComponent("min", "", "both", "CMIDecimalOrCMIBlank");
  3176.         this.max = new CMIComponent("max", "", "both", "CMIDecimalOrCMIBlank");
  3177.     }
  3178.    
  3179.    
  3180.    
  3181.     /*
  3182.     *  The CMI interactions model
  3183.     */
  3184.    
  3185.     function InteractionsModel(){
  3186.         this._children = new CMIComponent("_children", "id,objectives,time,type,correct_responses,weighting,student_response,result,latency", "readonly", "CMIString255");
  3187.         this._count = new CMIComponent("_count", 0, "readonly", "CMIInteger");
  3188.         this.intArray = InteractionsArrayModel;
  3189.         this.intArr = new Array();
  3190.     }
  3191.    
  3192.    
  3193.     function InteractionsArrayModel(index){
  3194.    
  3195.         if(index>this._count.cmivalue-1){
  3196.             if (index == this._count.cmivalue){
  3197.                 // then create new one...
  3198.                 this.intArr[index] = new singleInteractionModel();
  3199.                 this._count.cmivalue = this._count.cmivalue + 1;
  3200.                 return this.intArr[index];
  3201.             }
  3202.             else{
  3203.                 return "false";
  3204.             }
  3205.         }
  3206.         else{
  3207.             // we must be talking about this one so return object..
  3208.             return this.intArr[index];
  3209.         }
  3210.     }
  3211.    
  3212.    
  3213.     function singleInteractionModel(){
  3214.         this.id = new CMIComponent("id", "", "writeonly", "CMIIdentifier");
  3215.         this.objectives = new ObjectivesInteractionModel;
  3216.         this.time = new CMIComponent("time", "", "writeonly", "CMITime");
  3217.         this.type = new CMIComponent("type", "", "writeonly", "CMIVocabularyInteraction");
  3218.         this.correct_responses = new CorrectResponsesInteractionModel;
  3219.         this.weighting = new CMIComponent("weighting", "", "writeonly", "CMIDecimal");
  3220.         this.student_response = new CMIComponent("student_response", "", "writeonly", "CMIFeedback");
  3221.         this.result = new CMIComponent("result", "", "writeonly", "CMIVocabularyResult");
  3222.         this.latency = new CMIComponent("latency", "", "writeonly", "CMITimespan");
  3223.     }
  3224.    
  3225.    
  3226.     function ObjectivesInteractionModel(){
  3227.         this._count = new CMIComponent("_count", 0, "readonly", "CMIInteger");
  3228.         this.objectivesInteractionArray = SingleObjectivesInteractionModel;
  3229.         this.objectivesInteractionArr = new Array();
  3230.     }
  3231.    
  3232.    
  3233.     function SingleObjectivesInteractionModel(index){
  3234.         if(index>this._count.cmivalue-1){
  3235.             if (index == this._count.cmivalue){
  3236.                 // then create new one...
  3237.                 this.objectivesInteractionArr[index] = new SingleItemObjectivesInteractionModel();
  3238.                 this._count.cmivalue = this._count.cmivalue + 1;
  3239.                 return this.objectivesInteractionArr[index];
  3240.             }
  3241.             else{
  3242.                 return "false";
  3243.             }
  3244.         }
  3245.         else{
  3246.             // we must be talking about this one so return object..
  3247.             return this.objectivesInteractionArr[index];
  3248.         }
  3249.     }
  3250.    
  3251.    
  3252.     function SingleItemObjectivesInteractionModel(){
  3253.         this.id = new CMIComponent("id", "", "writeonly", "CMIIdentifier");
  3254.     }
  3255.    
  3256.    
  3257.    
  3258.     function CorrectResponsesInteractionModel(){
  3259.         this._count = new CMIComponent("_count", 0, "readonly", "CMIInteger");
  3260.         this.correctResponsesInteractionArray = SingleCorrectResponsesInteractionModel;
  3261.         this.correctResponsesInteractionArr = new Array();
  3262.     }
  3263.    
  3264.    
  3265.     function SingleCorrectResponsesInteractionModel(index){
  3266.         if(index>this._count.cmivalue-1){
  3267.             if (index == this._count.cmivalue){
  3268.                 // then create new one...
  3269.                 this.correctResponsesInteractionArr[index] = new SingleItemCorrectResponsesInteractionModel();
  3270.                 this._count.cmivalue = this._count.cmivalue + 1;
  3271.                 return this.correctResponsesInteractionArr[index];
  3272.             }
  3273.             else{
  3274.                 return "false";
  3275.             }
  3276.         }
  3277.         else{
  3278.             // we must be talking about this one so return object..
  3279.             return this.correctResponsesInteractionArr[index];
  3280.         }
  3281.     }
  3282.    
  3283.    
  3284.     function SingleItemCorrectResponsesInteractionModel(){
  3285.         this.pattern = new CMIComponent("pattern", "", "writeonly", "CMIFeedback");
  3286.     }
  3287.    
  3288.     /*
  3289.     *
  3290.     *
  3291.     */
  3292.     function showCurrentModelState(infoOrForm){
  3293.    
  3294.         var divider = "";
  3295.         var titles = "";
  3296.         if (infoOrForm == "info"){
  3297.             divider = "\n";
  3298.                     equals = "=";
  3299.             titles = "Current client CMI Datamodel\n\n";
  3300.         }
  3301.         else{
  3302.                     equals = "~r@l@ad~";
  3303.             divider = "^r@l@ad^";
  3304.             titles = "";
  3305.         }
  3306.    
  3307.         a = "cmi.core.student_id" + equals + API.cmi.core.student_id.cmivalue + divider;
  3308.         b = "cmi.core.student_name" + equals + API.cmi.core.student_name.cmivalue + divider;
  3309.         c = "cmi.core.lesson_location" + equals + API.cmi.core.lesson_location.cmivalue + divider;
  3310.         d = "cmi.core.credit" + equals + API.cmi.core.credit.cmivalue + divider;
  3311.         e = "cmi.core.lesson_status" + equals + API.cmi.core.lesson_status.cmivalue + divider;
  3312.         f = "cmi.core.entry" + equals + API.cmi.core.entry.cmivalue + divider;
  3313.         g = "cmi.core.score.raw" + equals + API.cmi.core.score.raw.cmivalue + divider;
  3314.         h = "cmi.core.score.max" + equals + API.cmi.core.score.max.cmivalue + divider;
  3315.         i = "cmi.core.score.min" + equals + API.cmi.core.score.min.cmivalue + divider;
  3316.         j = "cmi.core.total_time" + equals + API.cmi.core.total_time.cmivalue + divider;
  3317.         k = "cmi.core.lesson_mode" + equals + API.cmi.core.lesson_mode.cmivalue + divider;
  3318.         l = "cmi.core.exit" + equals + API.cmi.core.exit.cmivalue + divider;
  3319.         m = "cmi.core.session_time" + equals + API.cmi.core.session_time.cmivalue + divider;
  3320.         n = "cmi.suspend_data" + equals + API.cmi.suspend_data.cmivalue + divider;
  3321.         o = "cmi.launch_data" + equals + API.cmi.launch_data.cmivalue + divider;
  3322.         p = "cmi.comments" + equals + API.cmi.comments.cmivalue + divider;
  3323.         q = "cmi.comments_from_lms" + equals + API.cmi.comments_from_lms.cmivalue + divider;
  3324.         r = "cmi.objectives._count" + equals + API.cmi.objectives._count.cmivalue + divider;
  3325.    
  3326.         var s = "";
  3327.         var objectivesCount = API.cmi.objectives._count.cmivalue;
  3328.         for (count=0; count < objectivesCount; count++){
  3329.             objHandle = API.cmi.objectives.objArray(count);
  3330.             idval = objHandle.id.cmivalue;
  3331.             scoreRaw = objHandle.score.raw.cmivalue;
  3332.             scoreMax = objHandle.score.max.cmivalue;
  3333.             scoreMin = objHandle.score.min.cmivalue;
  3334.                     statval = objHandle.status.cmivalue;
  3335.             s = s + "cmi.objectives." + count + ".id" + equals + idval + divider;
  3336.             s = s + "cmi.objectives." + count + ".score.raw" + equals + scoreRaw + divider;
  3337.             s = s + "cmi.objectives." + count + ".score.max" + equals + scoreMax + divider;
  3338.             s = s + "cmi.objectives." + count + ".score.min" + equals + scoreMin + divider;
  3339.                     s = s + "cmi.objectives." + count + ".status" + equals + statval + divider;
  3340.         }
  3341.    
  3342.    
  3343.         v = "cmi.student_data.mastery_score" + equals + API.cmi.student_data.mastery_score.cmivalue + divider;
  3344.         w = "cmi.student_data.max_time_allowed" + equals + API.cmi.student_data.max_time_allowed.cmivalue + divider;
  3345.         x = "cmi.student_data.time_limit_action" + equals + API.cmi.student_data.time_limit_action.cmivalue + divider;
  3346.    
  3347.         y = "cmi.student_preference.audio" + equals + API.cmi.student_preference.audio.cmivalue + divider;
  3348.         z = "cmi.student_preference.language" + equals + API.cmi.student_preference.language.cmivalue + divider;
  3349.         zz = "cmi.student_preference.speed" + equals + API.cmi.student_preference.speed.cmivalue + divider;
  3350.         zzz = "cmi.student_preference.text" + equals + API.cmi.student_preference.text.cmivalue + divider;
  3351.    
  3352.         t = "cmi.interactions._count" + equals + API.cmi.interactions._count.cmivalue + divider;
  3353.    
  3354.         var u = "";
  3355.         var interactionsCount = API.cmi.interactions._count.cmivalue
  3356.         for (intcount=0; intcount < interactionsCount; intcount++){
  3357.             intHandle = API.cmi.interactions.intArray(intcount);
  3358.    
  3359.             idval = intHandle.id.cmivalue;
  3360.             u = u + "cmi.interactions." + intcount + ".id" + equals + idval + divider;
  3361.    
  3362.             interObjCount = intHandle.objectives._count.cmivalue;
  3363.             u = u + "cmi.interactions." + intcount + ".objectives._count" + equals + interObjCount + divider;
  3364.    
  3365.             for (objcount=0; objcount < interObjCount; objcount++){
  3366.                  interactionObjectiveHandle = intHandle.objectives.objectivesInteractionArray(objcount);
  3367.                  objid = interactionObjectiveHandle.id.cmivalue;
  3368.                  u = u + "cmi.interactions." + intcount + ".objectives." + objcount + ".id" + equals + objid + divider;
  3369.             }
  3370.    
  3371.             srCount = intHandle.correct_responses._count.cmivalue;
  3372.             u = u + "cmi.interactions." + intcount + ".correct_responses._count" + equals + srCount + divider;
  3373.    
  3374.             for (objcount=0; objcount < srCount; objcount++){
  3375.                  interactionSRHandle = intHandle.correct_responses.correctResponsesInteractionArray(objcount);
  3376.                  patternid = interactionSRHandle.pattern.cmivalue;
  3377.                  u = u + "cmi.interactions." + intcount + ".correct_responses." + objcount + ".pattern" + equals + patternid + divider;
  3378.             }
  3379.    
  3380.    
  3381.             timeval = intHandle.time.cmivalue;
  3382.             u = u + "cmi.interactions." + intcount + ".time" + equals + timeval + divider;
  3383.    
  3384.             typeval = intHandle.type.cmivalue;
  3385.             u = u + "cmi.interactions." + intcount + ".type" + equals + typeval + divider;
  3386.    
  3387.             weightingval = intHandle.weighting.cmivalue;
  3388.             u = u + "cmi.interactions." + intcount + ".weighting" + equals + weightingval + divider;
  3389.    
  3390.             student_responseval = intHandle.student_response.cmivalue;
  3391.             u = u + "cmi.interactions." + intcount + ".student_response" + equals + student_responseval + divider;
  3392.    
  3393.             resultval = intHandle.result.cmivalue;
  3394.             u = u + "cmi.interactions." + intcount + ".result" + equals + resultval + divider;
  3395.    
  3396.             latencyval = intHandle.latency.cmivalue;
  3397.             u = u + "cmi.interactions." + intcount + ".latency" + equals + latencyval + divider;
  3398.         }
  3399.    
  3400.         var alertString = titles+a+b+c+d+e+f+g+h+i+j+k+l+m+n+o+p+q+r+s+v+w+x+y+z+zz+zzz+t+u;
  3401.         return alertString;
  3402.    
  3403.     }
  3404.    
  3405.     /*
  3406.     * a function used in debug mode to see the current cmi model
  3407.     */
  3408.     function viewModel(){
  3409.         return showCurrentModelState("info");
  3410.     }
  3411.    
  3412.     function xmlhttpPost(strURL,oggetto,valore,
  3413.                                 oggetto2,valore2,
  3414.                                 oggetto3,valore3,
  3415.                                 oggetto4,valore4,
  3416.                                 oggetto5,valore5,
  3417.                                 oggetto6,valore6,
  3418.                                 oggetto7,valore7,
  3419.                                 oggetto8,valore8,
  3420.                                 oggetto9,valore9,
  3421.                                 oggetto10,valore10)
  3422.     {
  3423.         if(oggetto == 'save'){
  3424.             document.getElementById('saving-load').innerHTML = 'LOADING...';
  3425.         }
  3426.        
  3427.         //Inizializzo l'oggetto xmlHttpReq
  3428.         var xmlHttpReq = false;
  3429.         var self = this;
  3430.         // qui valutiamo la tipologia di browser utilizzato per selezionare la tipologia di oggetto da creare.
  3431.         // Se sono in un browser Mozilla/Safari, utilizzo l'oggetto XMLHttpRequest per lo scambio di dati tra browser e server.
  3432.         if (window.XMLHttpRequest) {
  3433.             self.xmlHttpReq = new XMLHttpRequest();
  3434.         }
  3435.         // Se sono in un Browser di Microsoft (IE), utilizzo Microsoft.XMLHTTP
  3436.         //che rappresenta la classe di riferimento per questo browser
  3437.         else if (window.ActiveXObject) {
  3438.             self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
  3439.         }
  3440.         //Apro il canale di connessione per regolare il tipo di richiesta.
  3441.         //Passo come parametri il tipo di richiesta, url e se è o meno un operazione asincrona (isAsync)
  3442.         self.xmlHttpReq.open('POST', strURL+'?'
  3443.                                             +oggetto+'='+valore
  3444.                                             +'&'+oggetto2+'='+valore2
  3445.                                             +'&'+oggetto3+'='+valore3
  3446.                                             +'&'+oggetto4+'='+valore4
  3447.                                             +'&'+oggetto5+'='+valore5
  3448.                                             +'&'+oggetto6+'='+valore6
  3449.                                             +'&'+oggetto7+'='+valore7
  3450.                                             +'&'+oggetto8+'='+valore8
  3451.                                             +'&'+oggetto9+'='+valore9
  3452.                                             +'&'+oggetto10+'='+valore10
  3453.                                             , true);
  3454.         //setto l'header dell'oggetto
  3455.         self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
  3456.         //Passo alla richiesta i valori del form in modo da generare l'output desiderato
  3457.         self.xmlHttpReq.send();
  3458.         //Valuto lo stato della richiesta
  3459.         self.xmlHttpReq.onreadystatechange = function()
  3460.         {
  3461.             //Gli stai di una richiesta possono essere 5 * 0 - UNINITIALIZED * 1 - LOADING * 2 - LOADED * 3 - INTERACTIVE * 4 - COMPLETE
  3462.             //Se lo stato è completo
  3463.             if (self.xmlHttpReq.readyState == 4) {
  3464.                 //Aggiorno la pagina con la risposta ritornata dalla precendete richiesta dal web server.Quando la richiesta è terminata il responso della richiesta è disponibie come responseText.
  3465.                 var stringa = self.xmlHttpReq.responseText;
  3466.                 var str = stringa.split('|*|');
  3467.                
  3468.                 //alert(stringa);
  3469.                
  3470.                 if(oggetto == 'save'){
  3471.                     if(stringa == ''|| stringa == 'OK'){
  3472.                         document.getElementById('saving-load').innerHTML = 'SAVED';
  3473.                     }else{
  3474.                         alert(stringa);
  3475.                         alert('Errore di salvataggio per temporanea interruzione di rete.\nQuesto passaggio non verrà memorizzato');
  3476.                     }
  3477.                 }
  3478.             }
  3479.         }
  3480.     }
  3481.    
  3482.     //---------------------------------
  3483.     var ore = 0;
  3484.     var minuti = 0;
  3485.     var secondi = 0;
  3486.     var stop = true;
  3487.    
  3488.     function startCrono()
  3489.     {
  3490.         if(stop == true)
  3491.         {
  3492.             stop = false;  
  3493.             setInterval("crono()", 1000);
  3494.         }  
  3495.     }
  3496.    
  3497.     function crono()
  3498.     {  
  3499.         if(stop == false)
  3500.         {
  3501.             if(secondi > 59)
  3502.             {  
  3503.                 secondi = 0;  
  3504.                 minuti++;  
  3505.             }
  3506.             if(minuti > 59)
  3507.             {  
  3508.                 minuti = 0;  
  3509.                 ore++;
  3510.             }
  3511.             secondi++;
  3512.             showCrono();
  3513.         }
  3514.     }
  3515.    
  3516.     function showCrono()
  3517.     {  
  3518.         var hh = '';
  3519.         var mm = '';
  3520.         var ss = '';
  3521.        
  3522.         if(ore < 10){
  3523.             hh = "0"+ore;
  3524.         }else{
  3525.             hh = ""+ore;
  3526.         }
  3527.        
  3528.         if(minuti < 10){
  3529.             mm = "0"+minuti;
  3530.         }else{
  3531.             mm = ""+minuti;
  3532.         }
  3533.        
  3534.         if(secondi < 10){
  3535.             ss = "0"+secondi;
  3536.         }else{
  3537.             ss = ""+secondi;
  3538.         }
  3539.         var time = ''+hh+':'+mm+':'+ss;
  3540.         document.getElementById("cronometro").innerHTML = time;
  3541.         //saveTime(time);
  3542.     }
  3543.    
  3544.     function saveTime(time)
  3545.     {
  3546.         xmlhttpPost('http://eni-learning.com/php-custom/ajax/save-scorm.php','save','save',
  3547.                                                         'id_u','29448',
  3548.                                                         'id_l','6',
  3549.                                                         'id_sc_e','41',
  3550.                                                         'name','cmi.core.session_time_custom',
  3551.                                                         'value',time);                                                                                 
  3552.     }
  3553.    
  3554.     function stopCrono()
  3555.     {  
  3556.          stop = true;  
  3557.     }
  3558.    
  3559.     function azzeraCrono()
  3560.     {  
  3561.         if(stop == false)
  3562.         {  
  3563.             stop = true;  
  3564.         }  
  3565.         ore = minuti = secondi;  
  3566.         showCrono();  
  3567.     }
  3568.    
  3569.     </script>
  3570. </head>
  3571.  
  3572. <body>
  3573.    
  3574.         <!--<p style="text-align:center;margin:0;margin-top:-20px;margin-bottom:0;padding:0">
  3575.             <input type="button" class="button medium alt-button primary" value="< TORNA AL MENU DEL CORSO" onclick="window.open('player','_self');">
  3576.         </p>-->
  3577.                
  3578.         <div id="container" style="margin:0;padding:0;">
  3579.             <!--<div class="align-right version">v<script>document.write(_VERSION);</script></div>-->
  3580.            
  3581.             <div id="links" style="display:none;">
  3582.                 <b><a href="javascript:void(0);" onclick="$('debug').innerHTML=''; Utils.clearCookieData();Utils.launchSCO(); return false;">Launch SCO</a></b> |
  3583.                 <a href="javascript:void(0);" onclick="Utils.clearCookieData(); return false;">Clear Storage</a> |
  3584.                 <a href="javascript:void(0);" onclick="$('debug').innerHTML=''; return false;">Clear Event Log</a> |
  3585.                 <a href="javascript:void(0);" onclick="document.location=document.location.href;return false;">Refresh Page</a>
  3586.             </div>
  3587.            
  3588.             <div style="position:relative;left:5%;width:90%;">
  3589.                 <!--<fieldset>
  3590.                     <legend>Options <b>( <a href="javascript:void(0);" onclick="Utils.toggleDisplay('optionSet'); return false;">Toggle</a> )</b></legend>-->
  3591.                     <div id="optionSet">
  3592.                        
  3593.                         <div style="display:none;">
  3594.                             <div class="tblRowInstructions">Enter the name of the storage to use for this session (or to clear using the option above):</div>
  3595.                             <div class="tblRow">
  3596.                                 <div class="tblRowHeader">Storage Name:</div>
  3597.                                 <input type="text" id="cookieNameAlt" size="50">
  3598.                                 <a href="javascript:void(0);" onclick="Utils.genNewSessionName(); return false;" class="actionLink">Generate New Name</a>
  3599.                             </div>
  3600.                            
  3601.                             <div class="tblRowInstructions">Enter the full/relative path/filename for the SCO's launch file. The default is currently &quot;<script>document.write(launchFile);</script>&quot;. Populated automatically if IMS manifest is present:</div>
  3602.                         </div>
  3603.                        
  3604.                         <div class="tblRow" style="display:none;">
  3605.                             <select style="background-color:#ccc" onChange="window.open('http://eni-learning.com/player/?id_sc='+this.value,'_self')">
  3606.                                 <option value="">seleziona...</option>
  3607.                                                                     <option value="93"
  3608.                                      >
  3609.                                     "S-drammatizziamo il colloquio di lavoro"                                    </option>
  3610.                                                                     <option value="94"
  3611.                                      >
  3612.                                     "S-drammatizziamo il colloquio di lavoro"                                    </option>
  3613.                                                                     <option value="112"
  3614.                                      >
  3615.                                     Artisti a confronto sui problemi della conservazione                                    </option>
  3616.                                                                     <option value="65"
  3617.                                      >
  3618.                                     “Eni in a day”: un lungo ed emozionante viaggio in Eni                                    </option>
  3619.                                                                     <option value="48"
  3620.                                      >
  3621.                                     Come si misura la sicurezza                                    </option>
  3622.                                                                     <option value="10"
  3623.                                      >
  3624.                                     Come siamo organizzati                                    </option>
  3625.                                                                     <option value="45"
  3626.                                      >
  3627.                                     Concetti di sicurezza: rischio, pericolo e conseguenza                                    </option>
  3628.                                                                     <option value="54"
  3629.                                      >
  3630.                                     Conclusioni                                    </option>
  3631.                                                                     <option value="58"
  3632.                                      >
  3633.                                     Congo - Progetto Integrato Hinda. Dallo sviluppo infrastrutturale allo sviluppo umano                                    </option>
  3634.                                                                     <option value="71"
  3635.                                      >
  3636.                                     Cos'è l'energia                                    </option>
  3637.                                                                     <option value="87"
  3638.                                      >
  3639.                                     Energia e geopolitica                                    </option>
  3640.                                                                     <option value="72"
  3641.                                      >
  3642.                                     Energie rinnovabili                                    </option>
  3643.                                                                     <option value="84"
  3644.                                      >
  3645.                                     Energy supply: OIL. An introduction to the Oil and Gas Industry                                    </option>
  3646.                                                                     <option value="69"
  3647.                                      >
  3648.                                     Energy: what is it?                                    </option>
  3649.                                                                     <option value="43"
  3650.                                      >
  3651.                                     Eni strategy                                    </option>
  3652.                                                                     <option value="73"
  3653.                                      >
  3654.                                     Gli idrocarburi                                    </option>
  3655.                                                                     <option value="96"
  3656.                                      >
  3657.                                     I cambiamenti climatici                                    </option>
  3658.                                                                     <option value="53"
  3659.                                      >
  3660.                                     I dispositivi di protezione individuali                                    </option>
  3661.                                                                     <option value="64"
  3662.                                      >
  3663.                                     I mestieri della sicurezza                                    </option>
  3664.                                                                     <option value="41"
  3665.                                     selected >
  3666.                                     Il Codice Etico                                    </option>
  3667.                                                                     <option value="74"
  3668.                                      >
  3669.                                     Il prezzo del greggio                                    </option>
  3670.                                                                     <option value="95"
  3671.                                      >
  3672.                                     Il processo di selezione e il colloquio di lavoro                                    </option>
  3673.                                                                     <option value="111"
  3674.                                      >
  3675.                                     Il restauro dell'arte contemporanea: tra la materia e la metodologia                                    </option>
  3676.                                                                     <option value="75"
  3677.                                      >
  3678.                                     Il trasporto dell'energia                                    </option>
  3679.                                                                     <option value="83"
  3680.                                      >
  3681.                                     Introduction to Energy Sources and Energy Balances                                    </option>
  3682.                                                                     <option value="44"
  3683.                                      >
  3684.                                     Introduzione alla sicurezza                                    </option>
  3685.                                                                     <option value="89"
  3686.                                      >
  3687.                                     La divulgazione dell'informazione scientifica                                    </option>
  3688.                                                                     <option value="88"
  3689.                                      >
  3690.                                     La formazione continua e le competenze trasversali                                    </option>
  3691.                                                                     <option value="47"
  3692.                                      >
  3693.                                     La normativa vigente in materia di salute e sicurezza sul lavoro                                    </option>
  3694.                                                                     <option value="86"
  3695.                                      >
  3696.                                     La normativa vigente in materia di salute e sicurezza sul lavoro                                    </option>
  3697.                                                                     <option value="51"
  3698.                                      >
  3699.                                     La nostra storia                                     </option>
  3700.                                                                     <option value="113"
  3701.                                      >
  3702.                                     La Quadriennale di arte contemporanea 2016                                    </option>
  3703.                                                                     <option value="56"
  3704.                                      >
  3705.                                     La ricerca in Eni                                    </option>
  3706.                                                                     <option value="40"
  3707.                                      >
  3708.                                     La sicurezza in Eni                                    </option>
  3709.                                                                     <option value="57"
  3710.                                      >
  3711.                                     La sostenibilità in Eni                                    </option>
  3712.                                                                     <option value="59"
  3713.                                      >
  3714.                                     La storia di Amran                                    </option>
  3715.                                                                     <option value="37"
  3716.                                      >
  3717.                                     Le attività di approvvigionamento, fornitura, compravendita e trasporto di olio, gas e altri prodotti petroliferi                                    </option>
  3718.                                                                     <option value="32"
  3719.                                      >
  3720.                                     Le attività di ricerca, perforazione e produzione                                    </option>
  3721.                                                                     <option value="36"
  3722.                                      >
  3723.                                     Le attività legate alla raffinazione, distribuzione e commercializzazione dei prodotti petroliferi                                    </option>
  3724.                                                                     <option value="9"
  3725.                                      >
  3726.                                     Le attività legate alla vendita di gas, luce e servizi                                    </option>
  3727.                                                                     <option value="16"
  3728.                                      >
  3729.                                     Le nostre professionalità                                    </option>
  3730.                                                                     <option value="79"
  3731.                                      >
  3732.                                     Le strategie della ricerca                                    </option>
  3733.                                                                     <option value="76"
  3734.                                      >
  3735.                                     Motivazione intrinseca: l'utilizzo delle competenze per il raggiungimento dei risultati                                    </option>
  3736.                                                                     <option value="66"
  3737.                                      >
  3738.                                     Nigeria - Green River Project. Sviluppo socio-economico sostenibile                                    </option>
  3739.                                                                     <option value="97"
  3740.                                      >
  3741.                                     nuova 1                                    </option>
  3742.                                                                     <option value="98"
  3743.                                      >
  3744.                                     nuova 2                                    </option>
  3745.                                                                     <option value="102"
  3746.                                      >
  3747.                                     nuova 2                                    </option>
  3748.                                                                     <option value="99"
  3749.                                      >
  3750.                                     nuova 3                                    </option>
  3751.                                                                     <option value="103"
  3752.                                      >
  3753.                                     nuova 3                                    </option>
  3754.                                                                     <option value="104"
  3755.                                      >
  3756.                                     nuova 3                                    </option>
  3757.                                                                     <option value="105"
  3758.                                      >
  3759.                                     nuova 3                                    </option>
  3760.                                                                     <option value="106"
  3761.                                      >
  3762.                                     nuova 3                                    </option>
  3763.                                                                     <option value="107"
  3764.                                      >
  3765.                                     nuova 3                                    </option>
  3766.                                                                     <option value="70"
  3767.                                      >
  3768.                                     Oduroh                                    </option>
  3769.                                                                     <option value="110"
  3770.                                      >
  3771.                                     Progettare un evento culturale: Eni Q16                                    </option>
  3772.                                                                     <option value="67"
  3773.                                      >
  3774.                                     Scenari energetici                                    </option>
  3775.                                                                     <option value="100"
  3776.                                      >
  3777.                                     Sulla teoria del restauro: tra arte antica e arte contemporanea                                    </option>
  3778.                                                                     <option value="101"
  3779.                                      >
  3780.                                     Sulla teoria del restauro: tra arte antica e arte contemporanea                                    </option>
  3781.                                                                     <option value="82"
  3782.                                      >
  3783.                                     Test Finale                                    </option>
  3784.                                                                     <option value="92"
  3785.                                      >
  3786.                                     Test Finale                                    </option>
  3787.                                                                     <option value="39"
  3788.                                      >
  3789.                                     Test valutativo di fine modulo                                    </option>
  3790.                                                                     <option value="68"
  3791.                                      >
  3792.                                     Test valutativo di fine modulo                                    </option>
  3793.                                                                     <option value="80"
  3794.                                      >
  3795.                                     Test valutativo di fine modulo                                    </option>
  3796.                                                                     <option value="91"
  3797.                                      >
  3798.                                     Test valutativo di fine modulo                                    </option>
  3799.                                                                     <option value="77"
  3800.                                      >
  3801.                                     The quest: energy, security and the remaking of the modern world                                    </option>
  3802.                                                                     <option value="90"
  3803.                                      >
  3804.                                     Vitamine per le idee                                    </option>
  3805.                                                                     <option value="20"
  3806.                                      >
  3807.                                     x                                    </option>
  3808.                                                                     <option value="21"
  3809.                                      >
  3810.                                     x                                    </option>
  3811.                                                                     <option value="23"
  3812.                                      >
  3813.                                     x                                    </option>
  3814.                                                            
  3815.                             </select>
  3816.                                                         <input type="hidden" id="launchFileAlt" value="http://eni-learning.com/php-custom/upload/files/---6---01-02-il-codice-etico/index.html">
  3817.                             <select style="background-color:#ccc" onChange="window.open('http://eni-learning.com/player/?id_sc=41&id_sc_e='+this.value,'_self')">
  3818.                                 <option value="">seleziona...</option>
  3819.                                                                     <option value="41"
  3820.                                     selected >
  3821.                                                                             </option>
  3822.                                                            
  3823.                             </select>
  3824.                             <script>//$('debug').innerHTML='';Utils.clearCookieData();</script>
  3825.                             <b><a href="javascript:void(0);" onclick="Utils.launchSCO(); return false;">Launch SCO</a></b>
  3826.                         </div>
  3827.                        
  3828.                         <!-- ------------------------------------------------------------------ -->
  3829.                         <div  >
  3830.                              
  3831.                             <a name="init"></a>
  3832.                             <div style="clear:both;width:100%">
  3833.                                 <div style="float:left;width:70%;">
  3834.                                     <h2>Il Codice Etico</h2>
  3835.                                 </div>
  3836.                                 <div style="float:right;">
  3837.                                     <input type="button" class="button medium alt-button primary" value="< TORNA AL MENU DEL CORSO" onclick="window.open('http://eni-learning.com/corso','_self');">
  3838.                                 </div>    
  3839.                                 <iframe id="ifr-scorm" name="ifr-scorm" src="" width="100%" height="650" style="background:url(http://eni-learning.com/php-custom/img/preloader_transparent.gif) center 32px no-repeat;background-size:64px;border:1px solid #fc0;" frameborder="0"></iframe>
  3840.                         </div>
  3841.                         <div id="saving-load" style="padding:10px;background-color:#ccc;display:none;">...</div>
  3842.                         <!-- ------------------------------------------------------------------ -->
  3843.                        
  3844.                         <div style="display:none;">
  3845.                            
  3846.                             <div class="tblRowInstructions">Override the default window options (Default values can be changed in the source):</div>
  3847.                             <div class="tblRow"><div class="tblRowHeader">Width:</div><input type="text" id="winW" size="10"></div>
  3848.                             <div class="tblRow"><div class="tblRowHeader">Height:</div><input type="text" id="winH" size="10"></div>
  3849.                            
  3850.                             <div class="tblRow">
  3851.                                 <div class="tblRowHeader">Features:</div>
  3852.                                 <div class="inlineOption">
  3853.                                     <label for="wToolbarOption">Toolbar</label>
  3854.                                     <input type="checkbox" id="wToolbarOption" onclick="Utils.toggleWindowOption('wToolbar',this);">
  3855.                                 </div>
  3856.                                 <div class="inlineOption">
  3857.                                     <label for="wTitlebarOption">Titlebar</label>
  3858.                                     <input type="checkbox" id="wTitlebarOption" onclick="Utils.toggleWindowOption('wTitlebar',this);">
  3859.                                 </div>
  3860.                                 <div class="inlineOption">
  3861.                                     <label for="wLocationOption">Location</label>
  3862.                                     <input type="checkbox" id="wLocationOption" onclick="Utils.toggleWindowOption('wLocation',this);">
  3863.                                 </div>
  3864.                                 <div class="inlineOption">
  3865.                                     <label for="wStatusOption">Statusbar</label>
  3866.                                     <input type="checkbox" id="wStatusOption" onclick="Utils.toggleWindowOption('wStatus',this);">
  3867.                                 </div>
  3868.                                 <div class="inlineOption">
  3869.                                     <label for="wScrollbarsOption">Scrollbars</label>
  3870.                                     <input type="checkbox" id="wScrollbarsOption" onclick="Utils.toggleWindowOption('wScrollbars',this);">
  3871.                                 </div>
  3872.                                 <div class="inlineOption">
  3873.                                     <label for="wMenubarOption">Menubar</label>
  3874.                                     <input type="checkbox" id="wMenubarOption" onclick="Utils.toggleWindowOption('wMenubar',this);">
  3875.                                 </div>
  3876.                                 <div class="inlineOption">
  3877.                                     <label for="wResizableOption">Resizable</label>
  3878.                                     <input type="checkbox" id="wResizableOption" onclick="Utils.toggleWindowOption('wResizable',this);">
  3879.                                 </div>
  3880.                    
  3881.                                 <div class="optionGroup">
  3882.                                     <a href="#"  onclick="Utils.enableAllWindowOptions();return false;">Select All</a> | <a href="#" onclick="Utils.disableAllWindowOptions();return false;">Deselect All</a>
  3883.                                 </div>
  3884.                             </div>
  3885.                            
  3886.                             <div class="tblRowInstructions">SimpleAPI behavioral settings:</div>
  3887.                             <div class="tblRow">
  3888.                                 <input type="checkbox" id="closeOnFinishOption" onclick="Utils.toggleCloseOnFinishOption(this.checked);">
  3889.                                 <label for="closeOnFinishOption">Close SCO on LMSFinish</label>
  3890.                             </div>
  3891.                             <div class="tblRow">
  3892.                                 <input type="checkbox" id="toggleEmbeddedOption" onclick="Utils.toggleEmbeddedParam(this.checked);">
  3893.                                 <label for="toggleEmbeddedOption">Launch with custom search string appended to launch file: </label>
  3894.                                 <input type="text" id="searchString" size="50">
  3895.                             </div>
  3896.                             <div class="tblRow">
  3897.                                 <input type="checkbox" id="toggleCustomKeyValueOption" onclick="Utils.toggleCustomKeyValueOption(this.checked);">
  3898.                                 <label for="toggleCustomKeyValueOption">Launch with custom key/value pair injected into API object: </label>
  3899.                                 <input type="text" id="customApiKey" size="30"> = <input type="text" id="customApiValue" size="30">
  3900.                             </div>
  3901.                         </div>
  3902.                     </div>
  3903.                 <!--</fieldset>-->
  3904.             </div>
  3905.                  
  3906.             <div style="display:none;" >
  3907.                 <fieldset>
  3908.                     <legend>CONTENUTI</legend>
  3909.                     <div id="manifest" style="font-size:10px;overflow:scroll;width:100%;height:300px;">
  3910.                     <br>/var/www/html/php-custom/upload/files/---6---01-02-il-codice-etico/imsmanifest.xml<br>il file /var/www/html/php-custom/upload/files/---6---01-02-il-codice-etico/imsmanifest.xml esiste<strong>metadata (1)</strong><ul><li><a href="http://eni-learning.com/php-custom/upload/files/---6---01-02-il-codice-etico/">ADL SCORM</a></li></ul><strong>organizations (1)</strong><ul><li><a href="http://eni-learning.com/php-custom/upload/files/---6---01-02-il-codice-etico/">
  3911.      
  3912.      
  3913.     </a><ul><li><a href="http://eni-learning.com/php-custom/upload/files/---6---01-02-il-codice-etico/">ENI</a><ul><li><a href="#">Lezione Video</a><a href="#">sco-1</a></li></ul></li></ul></li></ul><strong>resources (1)</strong><ul><li><a href="http://eni-learning.com/php-custom/upload/files/---6---01-02-il-codice-etico/">
  3914.      
  3915.     </a><ul><li>sco-1 -  - <a href="javascript:void(0);" onclick="document.getElementById('launchFileAlt').value = 'http://eni-learning.com/php-custom/upload/files/---6---01-02-il-codice-etico/index.html'; Utils.launchSCO(); return false;"><strong>index.html</strong></a></li></ul></li></ul>                    </div>
  3916.                 </fieldset>
  3917.                 <fieldset>
  3918.                     <legend>Event Log <b>( <a href="javascript:void(0);" onclick="Utils.toggleDisplay('debug'); return false;">Toggle</a> | <a href="javascript:void(0);" onclick="Utils.dumpAPI(); return false;">Dump Current API Object</a> )</b></legend>
  3919.                     <div id="debug" style="font-size:10px;overflow:scroll;width:100%;height:300px;"></div>
  3920.                 </fieldset>
  3921.             </div>
  3922.         </div>
  3923.        
  3924.         <div id="cronometro" style="text-align:center;display:none;">00:00:00</div>
  3925.         <script>
  3926.             startCrono();
  3927.         </script>
  3928.     </body>
  3929. </html>
  3930.  
  3931.  
  3932. <div id="login" class="mfp-hide mfp-content-inner lightbox-white" style="max-width:400px;padding:20px">
  3933.     <!doctype html>
  3934. <html>
  3935. <head>
  3936.     <meta charset="utf-8">
  3937.     <title>Documento senza titolo</title>
  3938.             <script src="http://eni-learning.com/php-custom/language/it.js" type="text/javascript"></script>
  3939.         <script>
  3940.         var path_principale = 'http://eni-learning.com/';
  3941.         var path_totale = 'http://eni-learning.com/php-custom/';
  3942.     </script>
  3943.     <script src="http://eni-learning.com/php-custom/js/actions-login.js"></script>
  3944. </head>
  3945.  
  3946. <body>
  3947.         <div style="margin-top:25%;padding:50px;width:100%;height:50%;background-color:rgba(255,255,255,0.5);font-size:24px;">
  3948.             <!--<img src="img/icon-community.png" height="64" alt=""/>-->
  3949.             <p style="color:#000;">Ciao <strong>1811-05</strong> | <a style="color:#fff;font-weight:bold;" href="http://eni-learning.com/php-custom/logout.php?url=eni-learning.com/player/?id_l=6&id_sc=41">Esci</a><br>
  3950.             <input type="submit" class="" style="height:50px;font-size:18px;width:100%;color:#000;font-weight:bold;" value="VAI AL CORSO" onClick="window.open('http://eni-learning.com/corso','_self')"/>
  3951.             </p>
  3952.         </div>
  3953.                
  3954.         <script>
  3955.             var html = '<img id="avatar-img" class="img-big" src="http://eni-learning.com/php-custom/img/icon-community.png" style="height:16px;">';
  3956.             html += '&nbsp;&nbsp;<strong style="font-size:14px;">1811-05</strong>&nbsp;&nbsp;';
  3957.                         html += '|&nbsp;&nbsp;<a href="http://eni-learning.com/php-custom/logout.php?url=eni-learning.com/player/?id_l=6&id_sc=41"><u>esci</u></a>';
  3958.             document.getElementById('menu-top-bar-menu').innerHTML = html;
  3959.         </script>
  3960.        
  3961.    
  3962. </body>
  3963. </html>
  3964. </div><!-- Lightbox-login -->
  3965.  
  3966. <script>
  3967. jQuery(document).ready(function($) {
  3968.  
  3969.      
  3970.       $('a[href="#login"]').click(function(e){
  3971.          // Close openend lightboxes
  3972.          var delay = 0;
  3973.          
  3974.          if($.magnificPopup.open){
  3975.             $.magnificPopup.close();
  3976.             delay = 300;
  3977.          }
  3978.  
  3979.          // Start lightbox
  3980.          setTimeout(function(){
  3981.             $.magnificPopup.open({
  3982.                   midClick: true,
  3983.                   removalDelay: 300,
  3984.                   items: {
  3985.                     src: '#login',
  3986.                     type: 'inline'
  3987.                   }
  3988.             });
  3989.           }, delay);
  3990.  
  3991.         e.preventDefault();
  3992.       });
  3993. });
  3994. </script>
  3995.  
  3996.  
  3997.  
  3998. <div id="login-guest" class="mfp-hide mfp-content-inner lightbox-white" style="max-width:400px;padding:20px">
  3999.     <!doctype html>
  4000. <html>
  4001. <head>
  4002.     <meta charset="utf-8">
  4003.     <title>Documento senza titolo</title>
  4004.             <script src="http://eni-learning.com/php-custom/language/it.js" type="text/javascript"></script>
  4005.         <script>
  4006.         var path_principale = 'http://eni-learning.com/';
  4007.         var path_totale = 'http://eni-learning.com/php-custom/';
  4008.     </script>
  4009.     <script src="http://eni-learning.com/php-custom/js/actions-login.js"></script>
  4010. </head>
  4011.  
  4012. <body>
  4013.    
  4014.     <div style="padding:20px;width:100%;height:100%;background-color:rgba(255,255,255,0.5);">
  4015.         <form name="form_login" method="post" onSubmit="login('eni-learning.com/player/?id_l=6&id_sc=41'); return false; return false; ">
  4016.             <p span style="font-size:36px;font-weight:bold;color:#000">INIZIA IL CORSO</p>
  4017.             <p style="font-size:22px;color:#000">Accedi subito alle tue lezioni</p>
  4018.             <input id="user" name="user" type="text" placeholder="username" value="" style="height:50px;font-size:18px;"/><br />
  4019.             <input id="pass" name="pass" type="password" placeholder="password" value="" style="height:50px;font-size:18px;"/><br />
  4020.             <input type="submit" class="" style="height:50px;font-size:18px;width:100%;color:#000;font-weight:bold;" name="invia" value="ACCEDI ALLE LEZIONI"/>
  4021.         </form>
  4022.         <div id="mess"></div>
  4023.     </div>
  4024.     <!--<a href="</a>-->
  4025.    
  4026.     <script src="http://eni-learning.com/php-custom/js/placeholders.min.js"></script>
  4027.  
  4028. </body>
  4029. </html>
  4030. </div><!-- Lightbox-login-guest -->
  4031.  
  4032. <script>
  4033. jQuery(document).ready(function($) {
  4034.  
  4035.      
  4036.       $('a[href="#login-guest"]').click(function(e){
  4037.          // Close openend lightboxes
  4038.          var delay = 0;
  4039.          
  4040.          if($.magnificPopup.open){
  4041.             $.magnificPopup.close();
  4042.             delay = 300;
  4043.          }
  4044.  
  4045.          // Start lightbox
  4046.          setTimeout(function(){
  4047.             $.magnificPopup.open({
  4048.                   midClick: true,
  4049.                   removalDelay: 300,
  4050.                   items: {
  4051.                     src: '#login-guest',
  4052.                     type: 'inline'
  4053.                   }
  4054.             });
  4055.           }, delay);
  4056.  
  4057.         e.preventDefault();
  4058.       });
  4059. });
  4060. </script>
  4061.  
  4062.            
  4063.            
  4064. </div><!-- #content -->
  4065. </div><!-- .row  -->
  4066. </div><!-- .page-wrapper -->
  4067.  
  4068.  
  4069.  
  4070. </div><!-- #main-content -->
  4071.  
  4072. <footer class="footer-wrapper" role="contentinfo"> 
  4073.  
  4074. <!-- FOOTER 1 -->
  4075.  
  4076.  
  4077. <!-- FOOTER 2 -->
  4078.  
  4079.  
  4080. <div class="absolute-footer dark" style="background-color:#535151">
  4081. <div class="row">
  4082.     <div class="large-12 columns">
  4083.         <div class="center">
  4084.                     <div class="copyright-footer">Copyright<sup>©</sup>2016 - </strong>Eni S.p.A. - P.IVA 00905811006 </strong>| <a href='http://eni-learning.com/termini-e-condizioni/'>Termini e Condizioni</a> | <a href='http://eni-learning.com/privacy-policy/'>Privacy policy</a> | <a href='http://eni-learning.com/cookie-policy/'>Cookie policy</a></div>
  4085.         </div><!-- .left -->
  4086.         <div class="right">
  4087.                         </div>
  4088.     </div><!-- .large-12 -->
  4089. </div><!-- .row-->
  4090. </div><!-- .absolute-footer -->
  4091. </footer><!-- .footer-wrapper -->
  4092. </div><!-- #wrapper -->
  4093.  
  4094. <!-- back to top -->
  4095. <a href="#top" id="top-link"><span class="icon-angle-up"></span></a>
  4096.  
  4097.  
  4098. <div id="cookie-law-info-bar"><span>Questo sito utilizza i cookie per migliorare la tua esperienza di navigazione e i nostri servizi. Continuando ad utilizzare questo sito si acconsente all'utilizzo dei cookie.<a href="#" id="cookie_action_close_header"  class="medium cli-plugin-button cli-plugin-main-button" >Accetto</a> <a href="http://eni-learning.com/cookie-policy/" id="CONSTANT_OPEN_URL" target="_blank"  class="cli-plugin-main-link"  >Privacy policy</a></span></div><div id="cookie-law-info-again"><span id="cookie_hdr_showagain">Privacy & Cookies Policy</span></div>       
  4099.         <script type="text/javascript">
  4100.             //<![CDATA[
  4101.             jQuery(document).ready(function() {
  4102.                 cli_show_cookiebar({
  4103.                     settings: '{"animate_speed_hide":"500","animate_speed_show":"500","background":"#000000","border":"#444","border_on":false,"button_1_button_colour":"#f2d100","button_1_button_hover":"#c2a700","button_1_link_colour":"#000000","button_1_as_button":true,"button_2_button_colour":"#000000","button_2_button_hover":"#000000","button_2_link_colour":"#f2d100","button_2_as_button":false,"font_family":"Trebuchet MS, sans-serif","header_fix":false,"notify_animate_hide":true,"notify_animate_show":false,"notify_div_id":"#cookie-law-info-bar","notify_position_horizontal":"right","notify_position_vertical":"bottom","scroll_close":false,"scroll_close_reload":false,"showagain_tab":true,"showagain_background":"#fff","showagain_border":"#000","showagain_div_id":"#cookie-law-info-again","showagain_x_position":"100px","text":"#ffffff","show_once_yn":false,"show_once":"10000"}'
  4104.                 });
  4105.             });
  4106.             //]]>
  4107.         </script>
  4108.        
  4109.        
  4110. <!-- Mobile Popup -->
  4111. <div id="jPanelMenu" class="mfp-hide">
  4112.     <div class="mobile-sidebar">
  4113.        
  4114.         <ul class="mobile-main-menu">
  4115.        
  4116.         <li class="menu-item menu-item-type-post_type menu-item-object-page menu-item-714"><a href="http://eni-learning.com/progetto/">Progetto</a></li>
  4117. <li class="menu-item menu-item-type-post_type menu-item-object-page menu-item-733"><a href="http://eni-learning.com/contenuti/">Contenuti</a></li>
  4118. <li class="menu-item menu-item-type-post_type menu-item-object-page menu-item-737"><a href="http://eni-learning.com/corso/">Corso</a></li>
  4119. <li class="menu-item menu-item-type-post_type menu-item-object-page menu-item-959"><a href="http://eni-learning.com/faq/">Faq</a></li>
  4120. <li class="menu-item menu-item-type-post_type menu-item-object-page menu-item-715"><a href="http://eni-learning.com/contatti/">Contatti</a></li>
  4121.  
  4122.                 </ul>
  4123.  
  4124.                 <ul class="top-bar-mob">
  4125.                                      
  4126.              
  4127.            
  4128.         </ul>
  4129.        
  4130.        
  4131.                 <ul class="html-blocks">
  4132.             <li class="html-block">
  4133.                              </li>
  4134.         </ul>
  4135.             </div><!-- inner -->
  4136. </div><!-- #mobile-menu -->
  4137.  
  4138. <script type='text/javascript'>
  4139. /* <![CDATA[ */
  4140. var wc_add_to_cart_params = {"ajax_url":"\/wp-admin\/admin-ajax.php","wc_ajax_url":"\/player\/?id_l=6&id_sc=41&wc-ajax=%%endpoint%%","i18n_view_cart":"Vedi il carrello","cart_url":"http:\/\/eni-learning.com","is_cart":"","cart_redirect_after_add":"no"};
  4141. /* ]]> */
  4142. </script>
  4143. <script type='text/javascript' src='//eni-learning.com/wp-content/plugins/woocommerce/assets/js/frontend/add-to-cart.min.js?ver=2.6.13'></script>
  4144. <script type='text/javascript' src='//eni-learning.com/wp-content/plugins/woocommerce/assets/js/jquery-blockui/jquery.blockUI.min.js?ver=2.70'></script>
  4145. <script type='text/javascript'>
  4146. /* <![CDATA[ */
  4147. var woocommerce_params = {"ajax_url":"\/wp-admin\/admin-ajax.php","wc_ajax_url":"\/player\/?id_l=6&id_sc=41&wc-ajax=%%endpoint%%"};
  4148. /* ]]> */
  4149. </script>
  4150. <script type='text/javascript' src='//eni-learning.com/wp-content/plugins/woocommerce/assets/js/frontend/woocommerce.min.js?ver=2.6.13'></script>
  4151. <script type='text/javascript' src='//eni-learning.com/wp-content/plugins/woocommerce/assets/js/jquery-cookie/jquery.cookie.min.js?ver=1.4.1'></script>
  4152. <script type='text/javascript'>
  4153. /* <![CDATA[ */
  4154. var wc_cart_fragments_params = {"ajax_url":"\/wp-admin\/admin-ajax.php","wc_ajax_url":"\/player\/?id_l=6&id_sc=41&wc-ajax=%%endpoint%%","fragment_name":"wc_fragments"};
  4155. /* ]]> */
  4156. </script>
  4157. <script type='text/javascript' src='//eni-learning.com/wp-content/plugins/woocommerce/assets/js/frontend/cart-fragments.min.js?ver=2.6.13'></script>
  4158. <script type='text/javascript' src='http://eni-learning.com/wp-content/themes/flatsome/js/modernizr.js?ver=2.8.5'></script>
  4159. <script type='text/javascript' src='http://eni-learning.com/wp-content/themes/flatsome/js/flatsome-plugins.js?ver=2.8.5'></script>
  4160. <script type='text/javascript'>
  4161. /* <![CDATA[ */
  4162. var ajaxURL = {"ajaxurl":"http:\/\/eni-learning.com\/wp-admin\/admin-ajax.php"};
  4163. /* ]]> */
  4164. </script>
  4165. <script type='text/javascript' src='http://eni-learning.com/wp-content/themes/flatsome/js/flatsome-theme.js?ver=2.8.5'></script>
  4166. <script type='text/javascript' src='http://eni-learning.com/wp-content/themes/flatsome/js/flatsome-woocommerce.js?ver=2.8.5'></script>
  4167. <script type='text/javascript' src='http://eni-learning.com/wp-includes/js/wp-embed.min.js?ver=4.4.2'></script>
  4168.  
  4169. </body>
  4170. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement