From: <se...@us...> - 2008-05-06 09:48:44
|
Revision: 91 http://acmcontester.svn.sourceforge.net/acmcontester/?rev=91&view=rev Author: sem62 Date: 2008-05-06 02:48:50 -0700 (Tue, 06 May 2008) Log Message: ----------- Moved resources files Added Paths: ----------- WebEditor/resources/ WebEditor/resources/api.js WebEditor/resources/images/ WebEditor/resources/index.html WebEditor/service/ WebEditor/template/ WebEditor/template/SummaryPageModel.html WebEditor/template/global/SummaryPage.js Removed Paths: ------------- WebEditor/resources/index.html WebEditor/src/resources/ WebEditor/src/service/ WebEditor/src/template/ WebEditor/template/SummaryPageModel.html WebEditor/template/global/SummaryPage.js Copied: WebEditor/resources (from rev 74, WebEditor/src/resources) Copied: WebEditor/resources/api.js (from rev 90, WebEditor/src/resources/api.js) =================================================================== --- WebEditor/resources/api.js (rev 0) +++ WebEditor/resources/api.js 2008-05-06 09:48:50 UTC (rev 91) @@ -0,0 +1,63 @@ +function Initialize(param) +{ + return document.player.Initialize(param); +} + +function Terminate(param) +{ + return document.player.Terminate(param); +} + +function SetValue(name,value) +{ + return document.player.SetValue(name, value); +} +function GetValue(name) +{ + return document.player.GetValue(name); +} +function Commit(param) +{ + var returnVal = document.player.Commit(param); + var status = GetValue("cmi.core.lesson_status"); + if (status=="passed" || status=="failed") + navigation.location.reload(); + return returnVal; +} +function GetLastError() +{ + return document.player.GetLastError(); +} +function GetErrorString(code) +{ + return document.player.GetErrorString(code); +} +function GetDiagnostic(param) +{ + return document.player.GetDiagnostic(param); +} +function GetVersion() +{ + return "1.0 "; +} + +var API = new Object(); //previous version support +API.Initialize = Initialize; +API.Terminate = Terminate; +API.SetValue = SetValue; +API.GetValue = GetValue; +API.Commit = Commit; +API.GetLastError = GetLastError; +API.GetErrorString = GetErrorString; +API.GetDiagnostic = GetDiagnostic; + +var API_1484_11 = new Object(); //SCORM 2004 support +API_1484_11.Initialize = Initialize; +API_1484_11.Terminate = Terminate; +API_1484_11.SetValue = SetValue; +API_1484_11.GetValue = GetValue; +API_1484_11.Commit = Commit; +API_1484_11.GetLastError = GetLastError; +API_1484_11.GetErrorString = GetErrorString; +API_1484_11.GetDiagnostic = GetDiagnostic; +API_1484_11.version = GetVersion; Copied: WebEditor/resources/images (from rev 75, WebEditor/src/resources/images) Deleted: WebEditor/resources/index.html =================================================================== --- WebEditor/src/resources/index.html 2008-05-02 16:39:58 UTC (rev 74) +++ WebEditor/resources/index.html 2008-05-06 09:48:50 UTC (rev 91) @@ -1,53 +0,0 @@ -<html><head> - - <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> - <link rel="stylesheet" href="main.css" type="text/css"> - - <title>FireFly SCORM 2004 Course Player</title> -<script type="text/javascript" src="api.js"></script> -<script type="text/javascript" src="navigation.js"></script> - -</head> -<body topmargin="0" leftmargin="0" onUnload="exit_clicked(false);" bgcolor="#EBFAFE" link="#ff0000" marginheight="0" marginwidth="0" text="#ffffff" vlink="#505050"> - -<table border="0" cellpadding="0" cellspacing="0" height="100%" width="100%"> - <tbody><tr height="20"> - <td><img src="images/left_elipse.jpg"/></td><td bgcolor=#6A9AE2> <img src="images/FireFly.gif"><div class="header">Education System</div> </td> - <td colspan="5" align="right" bgcolor=#6A9AE2 valign="bottom"> - <img src="images/close.jpg" onClick="exit_clicked(true);" alt="Close"> - </td> - <td><image src="images/right_elipse.jpg"/></td> - </tr><tr height="*"> - <td></td> - <td width="150"> - <applet mayscript="" name="player" archive="webeditor.jar,RTEValidators.jar,FFManifest.jar, dom4j.jar" code=edu.lnu.FireFly.WebEditor.WebEditor.class width="100%" height="100%"> - </applet> - </td> - <td colspan="5" style="padding-left: 5px; padding-right: 3px; width: 100%;" width="*"> - <iframe name="ContentFrame" marginwidth="0" marginheight="0" frameborder="1" height="100%" scrolling="auto" width="100%"></iframe> - </td> - <td></td> - </tr><tr height="30" valign="center"> - <td><image src="images/left_elipse.jpg"/></td> - <td width="150" bgcolor=#6A9AE2> </td> - <td width="100" bgcolor=#6A9AE2></td> - <form name="navForm" action=""></form> - <td width="50" bgcolor=#6A9AE2> - <input style="display: none;" name="prevBtn" src="images/prev.jpg" onClick="previous()" type="image"> - <input name="prevBtn_disabled" style="display: block;" src="images/prev_disabled.jpg" onClick="return false;" type="image"></td> - <td bgcolor=#6A9AE2 style="padding-left: 10px; padding-right: 10px;" width="70"> - <td bgcolor=#6A9AE2 width="50"> - <input style="display: none;" name="nextBtn" src="images/next.jpg" onClick="next()" type="image"> - <input name="nextBtn_disabled" style="display: block;" src="images/next_disabled.jpg" onClick="return false;" type="image"> - </td> - <td bgcolor=#6A9AE2 width="100%"> <span id=TimeLeft name=TimeLeft> </span></td> - <td><image src="images/right_elipse.jpg"/></td> - - </tr> - - - -</tbody> -</table> -</body> -</html> \ No newline at end of file Copied: WebEditor/resources/index.html (from rev 89, WebEditor/src/resources/index.html) =================================================================== --- WebEditor/resources/index.html (rev 0) +++ WebEditor/resources/index.html 2008-05-06 09:48:50 UTC (rev 91) @@ -0,0 +1,125 @@ +<html><head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> + <title>Learning system :: Editor of courses</title> + <script type="text/javascript" src="api.js"></script> + <script type="text/javascript" src="navigation.js"></script> + + <style> +.left-corn { + width: 20px; + height: 39px; + background-color: #f5fab8; + background-image: url(images/left-corn.gif); + background-repeat: no-repeat; +} + +.right-corn { + width: 20px; + height: 39px; + background-color: #f5fab8; + background-image: url(images/right-corn.gif); + background-repeat: no-repeat; +} +.capmain { + font-family: Verdana, Tahoma, Arial, sans-serif; + font-size: 11px; + font-weight: bold; + color: #555; + width: 100%; + height: 39px; + background-color: #f1fa07; + background-image: url(images/cellpic.gif); + border-bottom: 1px solid #e1e1e1; + padding: 2px 4px 4px 4px; +} +.border { + border-left: 1px ridge #579c48; + border-right: 1px ridge #579c48; + border-bottom: 1px ridge #579c48; +} + +.main-body { + font-size: 11px; + color: #333; + background-color: #fdfced; + padding: 4px 4px 5px 4px; +} +.scapmain { + font-family: Verdana, Tahoma, Arial, sans-serif; + font-size: 10px; + font-weight: bold; + width: 100%; + height: 39px; + color: #777; + background-color: #b0dbbe; + background-image: url(images/cellpic2.gif); + border-bottom: 1px solid #e1e1e1; + padding: 4px; +} + </style> + +</head> + +<body onUnload="exit_clicked(false);" bgcolor='#215E21'> + <table width=100% height=100% border="0" bgcolor='#f5fab8'> + <tr height='1px'><td> + <table cellpadding='0' cellspacing='0' width='100%'> + <tr> + <td align='center' class='capmain'>Web course editor</td> + </tr> + </table> + <tr><td> + <table border="0" cellpadding="0" cellspacing="0" height="100%" width="100%"> + <tbody> + <tr height="*"> + <td width="250"> + <table cellpadding='0' cellspacing='0' height='97%' width='100%' class='border'> + <tr height='1px'> + <td> + <table cellpadding='0' cellspacing='0' width='100%'> + <tr> + <td class='scapmain'>Course structure</td> + </tr> + </table> + </td> + </tr> + <tr height='*'> + <td class='side-body'> + <applet mayscript="" name="player" archive="webeditor.jar,RTEValidators.jar,FFManifest.jar, dom4j.jar" code=edu.lnu.FireFly.WebEditor.WebEditor.class width="100%" height="100%"> + <PARAM NAME="courseLocation" VALUE="http://127.0.0.1/sem/course/"> + <PARAM NAME="serviceLocation" VALUE="http://127.0.0.1/sem/WebEditor/service/"> + <PARAM NAME="templateLocation" VALUE="http://127.0.0.1/sem/WebEditor/template"> + </applet> + </td> + </tr> + </table> + </td> + + <td colspan="5" style="padding-left: 5px; padding-right: 3px;" width="*"> + <table cellpadding='0' cellspacing='0' width='100%' height='97%'> + <tr height='1px'><td> + <table cellpadding='0' cellspacing='0' width='100%'> + <tr> + <td class='left-corn'><img src='images/blank.gif' width='23' height='39' alt='' style='display:block'></td> + <td class='capmain'>Content</td> + <td class='right-corn'><img src='images/blank.gif' width='23' height='39' alt='' style='display:block'></td> + </tr> + </table> + <tr height='*'><td> + <table align='center' cellpadding='0' cellspacing='0' width='95%' class='border' height='100%'> + <tr> + <td class='main-body'> + <iframe name="ContentFrame" frameborder="0" height="100%" scrolling="auto" width="100%"> + </iframe> + </td> + </tr> + </table> + </table> + </td> + </tr> + </tbody> + </table> + </table> +</body> + +</html> \ No newline at end of file Copied: WebEditor/service (from rev 89, WebEditor/src/service) Copied: WebEditor/template (from rev 71, WebEditor/src/template) Deleted: WebEditor/template/SummaryPageModel.html =================================================================== --- WebEditor/src/template/SummaryPageModel.html 2008-05-02 09:54:59 UTC (rev 71) +++ WebEditor/template/SummaryPageModel.html 2008-05-06 09:48:50 UTC (rev 91) @@ -1,17 +0,0 @@ -<html> -<head> - <title>title</title> - <meta http-equiv="Content-Type" content="text/html; charset=utf8" /> - <script type="text/javascript" src="global/APIWrapper.js"></script> - <script type="text/javascript" src="global/SummaryPage.js"></script> -</head> - -<body onload="Initialize();" onunload="Terminate();"> - <div id="page_content"> - <script type="text/javascript"> - <!--content start--> - <!--content end--> - </script> - </div> -</body> -</html> \ No newline at end of file Copied: WebEditor/template/SummaryPageModel.html (from rev 79, WebEditor/src/template/SummaryPageModel.html) =================================================================== --- WebEditor/template/SummaryPageModel.html (rev 0) +++ WebEditor/template/SummaryPageModel.html 2008-05-06 09:48:50 UTC (rev 91) @@ -0,0 +1,56 @@ +<html> +<head> + <title>title</title> + <meta http-equiv="Content-Type" content="text/html; charset=utf8" /> + <script type="text/javascript" src="global/APIWrapper.js"></script> + <script type="text/javascript" src="global/SummaryPage.js"></script> + +<style> +.tbl-border { + color: #555; + background-color: #bbb; +} + +.tbl { + font-size: 11px; + color: #555; + background-color: #fdfced; + padding: 4px; +} + +.tbl1 { + font-size: 11px; + background-color: #fdfced; + padding: 4px; +} + +.tbl2 { + font-size: 11px; + background-color: #fbf8ca; + padding: 4px; +} + +</style> +</head> + +<body onload="Initialize();" onunload="Terminate();"> + <div id="page_content"> + <Center><h1><!--title start--> + <!--title end--></Center></h1> + + <table align='center' cellpadding='0' cellspacing='1' width='85%' class='tbl-border'> + <tr> + <td align='center' width='35' class='tbl2' style='white-space:nowrap'><b>#</b></td> + <td align='center' width='*' class='tbl2' style='white-space:nowrap'><b>Item title</b></td> + <td align='center' width='70' class='tbl2' style='white-space:nowrap'><b>Min</b></td> + <td align='center' width='70' class='tbl2' style='white-space:nowrap'><b>Max</b></td> + <td align='center' width='70' class='tbl2' style='white-space:nowrap'><b>Raw score</b></td> + <td align='center' width='70' class='tbl2' style='white-space:nowrap'><b>%</b></td> + </tr> + + <!--content start--> + <!--content end--> + </table> + </div> +</body> +</html> \ No newline at end of file Deleted: WebEditor/template/global/SummaryPage.js =================================================================== Copied: WebEditor/template/global/SummaryPage.js (from rev 79, WebEditor/src/template/global/SummaryPage.js) =================================================================== --- WebEditor/template/global/SummaryPage.js (rev 0) +++ WebEditor/template/global/SummaryPage.js 2008-05-06 09:48:50 UTC (rev 91) @@ -0,0 +1,58 @@ +var deep = 0; +var rowNum = 0; + +function out(s){ + document.write(s); +} + +function ins(title, min, max, raw){ + var percents = 100*(raw-min)/(max-min) + " %"; + rowNum++; + + var td = "<td class='tbl"; + td += 1 - (rowNum % 2) + 1; + td += "'>"; + + document.write("<TR>" + td + rowNum); + document.write(td + title); + document.write(td + min); + document.write(td + max); + document.write(td + raw); + document.write(td + percents); +} + +function openBlock(title, model, id){ + title = "<b>" + title + "</b>"; + add(title, model, id); + deep++; +} + +function closeBlock(title){ + deep--; +} + + +function add(title, modelName, id){ + for (i=0; i < deep; i++){ + title = " " + title; + } + + ins(title, getScore(id, "min"), getScore(id, "max"), getScore(id, "raw")); +} + +function getObjectiveIndex(id){ + var count = GetValue("cmi.objectives._count"); + for (i = 0; i < count; i++){ + var curr = GetValue("cmi.objectives." + i + ".id"); + if (curr == id){ + return i; + } + } + return -1; +} + +function getScore(objectiveID, field){ + var index = getObjectiveIndex(objectiveID); + var res = GetValue("cmi.objectives." + index + ".score." + field); + return res != null ? res : 0; +} \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |