You can subscribe to this list here.
| 2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(128) |
Jun
(97) |
Jul
(13) |
Aug
(40) |
Sep
(50) |
Oct
(27) |
Nov
(7) |
Dec
(15) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2009 |
Jan
(18) |
Feb
(47) |
Mar
(7) |
Apr
|
May
|
Jun
|
Jul
(32) |
Aug
|
Sep
(14) |
Oct
(22) |
Nov
|
Dec
|
|
From: <br...@us...> - 2008-05-04 16:30:45
|
Revision: 81
http://acmcontester.svn.sourceforge.net/acmcontester/?rev=81&view=rev
Author: brus07
Date: 2008-05-04 09:30:48 -0700 (Sun, 04 May 2008)
Log Message:
-----------
Deleted *.dcu files
Removed Paths:
-------------
ACMServer/branches/Version_2/Poserednyk/AcmLib.dcu
ACMServer/branches/Version_2/Poserednyk/AcmLibForHome.dcu
ACMServer/branches/Version_2/Poserednyk/AdditionalUnit.dcu
ACMServer/branches/Version_2/Poserednyk/MainUnit.dcu
ACMServer/branches/Version_2/Server/CompilationUnit.dcu
ACMServer/branches/Version_2/Server/MainUnit.dcu
ACMServer/branches/Version_2/Server/TestingUnit.dcu
Deleted: ACMServer/branches/Version_2/Poserednyk/AcmLib.dcu
===================================================================
(Binary files differ)
Deleted: ACMServer/branches/Version_2/Poserednyk/AcmLibForHome.dcu
===================================================================
(Binary files differ)
Deleted: ACMServer/branches/Version_2/Poserednyk/AdditionalUnit.dcu
===================================================================
(Binary files differ)
Deleted: ACMServer/branches/Version_2/Poserednyk/MainUnit.dcu
===================================================================
(Binary files differ)
Deleted: ACMServer/branches/Version_2/Server/CompilationUnit.dcu
===================================================================
(Binary files differ)
Deleted: ACMServer/branches/Version_2/Server/MainUnit.dcu
===================================================================
(Binary files differ)
Deleted: ACMServer/branches/Version_2/Server/TestingUnit.dcu
===================================================================
(Binary files differ)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <br...@us...> - 2008-05-04 16:26:51
|
Revision: 80
http://acmcontester.svn.sourceforge.net/acmcontester/?rev=80&view=rev
Author: brus07
Date: 2008-05-04 09:26:57 -0700 (Sun, 04 May 2008)
Log Message:
-----------
made a copy
Added Paths:
-----------
ACMServer/branches/Version_2/
Copied: ACMServer/branches/Version_2 (from rev 79, ACMServer/tags/Version_2)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <se...@us...> - 2008-05-03 08:54:02
|
Revision: 79
http://acmcontester.svn.sourceforge.net/acmcontester/?rev=79&view=rev
Author: sem62
Date: 2008-05-03 01:54:06 -0700 (Sat, 03 May 2008)
Log Message:
-----------
Summary page working properly. Need do some modification into SummaryPage.js
Modified Paths:
--------------
WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/ItemModel.java
WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/SummaryPageModel/SummaryPageModel.java
WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/Template.java
WebEditor/src/template/SummaryPageModel.html
WebEditor/src/template/global/SummaryPage.js
Modified: WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/ItemModel.java
===================================================================
--- WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/ItemModel.java 2008-05-02 23:09:45 UTC (rev 78)
+++ WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/ItemModel.java 2008-05-03 08:54:06 UTC (rev 79)
@@ -7,6 +7,7 @@
import java.util.HashMap;
import java.util.UUID;
+import edu.lnu.FireFly.FFManifest.Organization;
import edu.lnu.FireFly.FFManifest.TreeItem;
import edu.lnu.FireFly.FFManifest.item.Item;
import edu.lnu.FireFly.FFManifest.resource.Resource;
@@ -148,4 +149,16 @@
public abstract boolean getShowOnSummaryPageMenuVisible();
public abstract boolean getShowSummaryPageMenuVisible();
+
+ public final String getIdentifier(TreeItem anItem) {
+ if (anItem.getClass() == Item.class){
+ return ((Item)anItem).identifier;
+ }
+
+ if (anItem.getClass() == Organization.class){
+ return ((Organization)anItem).identifier;
+ }
+
+ return null;
+ }
}
Modified: WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/SummaryPageModel/SummaryPageModel.java
===================================================================
--- WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/SummaryPageModel/SummaryPageModel.java 2008-05-02 23:09:45 UTC (rev 78)
+++ WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/SummaryPageModel/SummaryPageModel.java 2008-05-03 08:54:06 UTC (rev 79)
@@ -44,17 +44,18 @@
}
@Override
- public boolean updateItemResource(TreeItem anItem, boolean updateSummaryPages) {
+ public boolean updateItemResource(TreeItem anItem,
+ boolean updateSummaryPages) {
Resource resource = WebEditor.instance.getManifest().resources
.findResourceByIdentifier(((Item) anItem).identifierref);
Template template = new Template(resource.getFullHref(), this);
String content = "<script type=\"text/javascript\">"
- + getSummaryPageContent(anItem.getParent())
- + "</script>";
+ + getSummaryPageContent(anItem.getParent()) + "</script>";
template.setProperty("content", content);
+ template.setProperty("title", anItem.getTitle());
template.updateResource();
@@ -72,11 +73,14 @@
private String getSummaryPageContent(TreeItem parent) {
int childsCount = parent.getChildCount();
- String res = "openBlock(\"" + parent.getTitle() + "\");\n";
+ ItemModel model = ItemModels.getModelFromItem(parent);
+ String res = "openBlock(\"" + parent.getTitle() + "\", \""
+ + model.getModelName() + "\", \""
+ + model.getIdentifier(parent) + "\");\n";
for (int i = 0; i < childsCount; i++) {
TreeItem item = parent.getChild(i);
- ItemModel model = ItemModels.getModelFromItem(item);
+ model = ItemModels.getModelFromItem(item);
if (model.getShowOnSummaryPage(item)) {
res += getSummaryPageContentItem(item);
@@ -97,7 +101,8 @@
if (model.getClass() == SimpleQuestionModel.class
|| model.getClass() == LectureModel.class) {
- return "add(\"" + anItem.getTitle() + "\", \"" + model.getModelName() + "\", \""
+ return "add(\"" + anItem.getTitle() + "\", \""
+ + model.getModelName() + "\", \""
+ ((Item) anItem).identifier + "\");\n";
}
Modified: WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/Template.java
===================================================================
--- WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/Template.java 2008-05-02 23:09:45 UTC (rev 78)
+++ WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/Template.java 2008-05-03 08:54:06 UTC (rev 79)
@@ -20,8 +20,9 @@
public void setProperty(String name, String value) {
propertiests.put(name, value);
}
-
- protected String insertPropertyIntoResource(String res, String name, String value){
+
+ protected String insertPropertyIntoResource(String res, String name,
+ String value) {
try {
String startTag = ("<!--" + name + " start-->").toLowerCase();
String endTag = ("<!--" + name + " end-->").toLowerCase();
@@ -50,14 +51,27 @@
}
public boolean updateResource() {
+ boolean copied = WebEditorServiceClient.copyFromTemplate(model
+ .getClass().getSimpleName()
+ + ".html", fileName);
+
+ if (!copied){
+ return false;
+ }
+
String res = WebEditorServiceClient.getFileContent(fileName);
-
+
Iterator<String> iter = propertiests.keySet().iterator();
- while (iter.hasNext()){
+ while (iter.hasNext()) {
String name = iter.next();
res = insertPropertyIntoResource(res, name, propertiests.get(name));
+
+ if (res == null){
+ System.out.print("Property \"" + name + "\" isn't present.\n");
+ return false;
+ }
}
-
+
WebEditorServiceClient.setFileContent(fileName, res);
return true;
Modified: WebEditor/src/template/SummaryPageModel.html
===================================================================
--- WebEditor/src/template/SummaryPageModel.html 2008-05-02 23:09:45 UTC (rev 78)
+++ WebEditor/src/template/SummaryPageModel.html 2008-05-03 08:54:06 UTC (rev 79)
@@ -35,6 +35,9 @@
<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>
Modified: WebEditor/src/template/global/SummaryPage.js
===================================================================
--- WebEditor/src/template/global/SummaryPage.js 2008-05-02 23:09:45 UTC (rev 78)
+++ WebEditor/src/template/global/SummaryPage.js 2008-05-03 08:54:06 UTC (rev 79)
@@ -21,7 +21,9 @@
document.write(td + percents);
}
-function openBlock(title){
+function openBlock(title, model, id){
+ title = "<b>" + title + "</b>";
+ add(title, model, id);
deep++;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <se...@us...> - 2008-05-02 23:10:07
|
Revision: 78
http://acmcontester.svn.sourceforge.net/acmcontester/?rev=78&view=rev
Author: sem62
Date: 2008-05-02 16:09:45 -0700 (Fri, 02 May 2008)
Log Message:
-----------
Fixed bug: objectives list in Summary page was not correct.
Summary page is ready for 90 %.
Modified Paths:
--------------
WebEditor/src/edu/lnu/FireFly/WebEditor/Data/SummaryPageManager.java
WebEditor/src/template/SummaryPageModel.html
WebEditor/src/template/global/SummaryPage.js
Modified: WebEditor/src/edu/lnu/FireFly/WebEditor/Data/SummaryPageManager.java
===================================================================
--- WebEditor/src/edu/lnu/FireFly/WebEditor/Data/SummaryPageManager.java 2008-05-02 22:35:58 UTC (rev 77)
+++ WebEditor/src/edu/lnu/FireFly/WebEditor/Data/SummaryPageManager.java 2008-05-02 23:09:45 UTC (rev 78)
@@ -114,6 +114,7 @@
ItemModel childModel = ItemModels.getModelFromItem(child);
if (childModel.getShowOnSummaryPage(child)) {
+ result.add(getItemId(child));
result.addAll(getShowingItemsIds(child));
}
}
Modified: WebEditor/src/template/SummaryPageModel.html
===================================================================
--- WebEditor/src/template/SummaryPageModel.html 2008-05-02 22:35:58 UTC (rev 77)
+++ WebEditor/src/template/SummaryPageModel.html 2008-05-02 23:09:45 UTC (rev 78)
@@ -4,12 +4,50 @@
<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">
+ <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
Modified: WebEditor/src/template/global/SummaryPage.js
===================================================================
--- WebEditor/src/template/global/SummaryPage.js 2008-05-02 22:35:58 UTC (rev 77)
+++ WebEditor/src/template/global/SummaryPage.js 2008-05-02 23:09:45 UTC (rev 78)
@@ -1,3 +1,6 @@
+var deep = 0;
+var rowNum = 0;
+
function out(s){
document.write(s);
}
@@ -2,29 +5,49 @@
+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){
- out("Opened block with title = "+title+"<br>\n");
+ deep++;
}
function closeBlock(title){
- out("Closed block with title = "+title+"<br>\n");
+ deep--;
}
function add(title, modelName, id){
- out(title + ". item id = " + id + "(" + modelName + ")<br>\n");
- out("score is: ");
- out(getScore(id));
- out("<br>\n");
+ 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++)
- if (GetValue("cmi.objectives." + i + ".id") == id)
+ for (i = 0; i < count; i++){
+ var curr = GetValue("cmi.objectives." + i + ".id");
+ if (curr == id){
return i;
+ }
+ }
return -1;
}
-function getScore(objectiveID){
- var index = getObjectiveIndex(objectiveID);
- var res = GetValue("cmi.objectives." + index + ".score.scaled");
+function getScore(objectiveID, field){
+ var index = getObjectiveIndex(objectiveID);
+ var res = GetValue("cmi.objectives." + index + ".score." + field);
return res != null ? res : 0;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <se...@us...> - 2008-05-02 22:35:52
|
Revision: 77
http://acmcontester.svn.sourceforge.net/acmcontester/?rev=77&view=rev
Author: sem62
Date: 2008-05-02 15:35:58 -0700 (Fri, 02 May 2008)
Log Message:
-----------
Fixed bugs:
* Objectives list mapped in SummaryPage's manifest item;
* return false at getShowOnSummaryPage into SummaryPageModel (It's can't be shown into Summary page).
Modified Paths:
--------------
WebEditor/src/edu/lnu/FireFly/WebEditor/Data/SummaryPageManager.java
WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/ItemModel.java
Modified: WebEditor/src/edu/lnu/FireFly/WebEditor/Data/SummaryPageManager.java
===================================================================
--- WebEditor/src/edu/lnu/FireFly/WebEditor/Data/SummaryPageManager.java 2008-05-02 19:12:29 UTC (rev 76)
+++ WebEditor/src/edu/lnu/FireFly/WebEditor/Data/SummaryPageManager.java 2008-05-02 22:35:58 UTC (rev 77)
@@ -109,15 +109,12 @@
result.add(getItemId(item));
}
- for (int j = 0; i < item.getChildCount(); i++) {
+ for (int j = 0; j < item.getChildCount(); j++) {
TreeItem child = item.getChild(j);
- ItemModel chapterModel = ItemModels.getModelFromItem(child);
+ ItemModel childModel = ItemModels.getModelFromItem(child);
- if (chapterModel.getClass() == ChapterModel.class) {
- if (((ChapterModel) chapterModel)
- .getShowOnSummaryPage(child)) {
- result.addAll(getShowingItemsIds(child));
- }
+ if (childModel.getShowOnSummaryPage(child)) {
+ result.addAll(getShowingItemsIds(child));
}
}
}
Modified: WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/ItemModel.java
===================================================================
--- WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/ItemModel.java 2008-05-02 19:12:29 UTC (rev 76)
+++ WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/ItemModel.java 2008-05-02 22:35:58 UTC (rev 77)
@@ -11,6 +11,7 @@
import edu.lnu.FireFly.FFManifest.item.Item;
import edu.lnu.FireFly.FFManifest.resource.Resource;
import edu.lnu.FireFly.WebEditor.WebEditor;
+import edu.lnu.FireFly.WebEditor.ItemModels.SummaryPageModel.SummaryPageModel;
import edu.lnu.FireFly.WebEditor.WSClients.WebEditorServiceClient;
public abstract class ItemModel {
@@ -25,6 +26,10 @@
protected boolean isContainerItem = false;
public final boolean getShowOnSummaryPage(TreeItem anItem) {
+ if (this.getClass() == SummaryPageModel.class){
+ return false;
+ }
+
ItemData itemData = getItemData(anItem);
if (itemData == null) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <se...@us...> - 2008-05-02 19:12:32
|
Revision: 76
http://acmcontester.svn.sourceforge.net/acmcontester/?rev=76&view=rev
Author: sem62
Date: 2008-05-02 12:12:29 -0700 (Fri, 02 May 2008)
Log Message:
-----------
Fixed bug:
After pressing F5, all ItemModel's registered against.
Modified Paths:
--------------
WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/ItemModels.java
WebEditor/src/edu/lnu/FireFly/WebEditor/WebEditor.java
Modified: WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/ItemModels.java
===================================================================
--- WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/ItemModels.java 2008-05-02 19:04:07 UTC (rev 75)
+++ WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/ItemModels.java 2008-05-02 19:12:29 UTC (rev 76)
@@ -8,19 +8,19 @@
public class ItemModels {
protected static ArrayList<ItemModel> registeredModels = new ArrayList<ItemModel>();
- public static void RegisterModel(ItemModel model) {
+ public static void registerModel(ItemModel model) {
if (!registeredModels.contains(model)) {
registeredModels.add(model);
}
}
- public static void UnRegisterModel(ItemModel model) {
+ public static void unRegisterModel(ItemModel model) {
if (registeredModels.contains(model)) {
registeredModels.remove(model);
}
}
- public static boolean IsModelRegistered(ItemModel model) {
+ public static boolean isModelRegistered(ItemModel model) {
return registeredModels.contains(model);
}
@@ -54,4 +54,8 @@
}
}
}
+
+ public static void clear() {
+ registeredModels.clear();
+ }
}
Modified: WebEditor/src/edu/lnu/FireFly/WebEditor/WebEditor.java
===================================================================
--- WebEditor/src/edu/lnu/FireFly/WebEditor/WebEditor.java 2008-05-02 19:04:07 UTC (rev 75)
+++ WebEditor/src/edu/lnu/FireFly/WebEditor/WebEditor.java 2008-05-02 19:12:29 UTC (rev 76)
@@ -87,11 +87,12 @@
instance = this;
initMenu();
- ItemModels.RegisterModel(new LectureModel());
- ItemModels.RegisterModel(new SimpleQuestionModel());
- ItemModels.RegisterModel(new ChapterModel());
- ItemModels.RegisterModel(new OrganizationModel());
- ItemModels.RegisterModel(new SummaryPageModel());
+ ItemModels.clear();
+ ItemModels.registerModel(new LectureModel());
+ ItemModels.registerModel(new SimpleQuestionModel());
+ ItemModels.registerModel(new ChapterModel());
+ ItemModels.registerModel(new OrganizationModel());
+ ItemModels.registerModel(new SummaryPageModel());
CreateNewCourse();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <se...@us...> - 2008-05-02 19:04:24
|
Revision: 75
http://acmcontester.svn.sourceforge.net/acmcontester/?rev=75&view=rev
Author: sem62
Date: 2008-05-02 12:04:07 -0700 (Fri, 02 May 2008)
Log Message:
-----------
Apply ACM Contester master design.
Modified Paths:
--------------
WebEditor/src/resources/index.html
Added Paths:
-----------
WebEditor/src/resources/images/
WebEditor/src/resources/images/FireFly.gif
WebEditor/src/resources/images/blank.gif
WebEditor/src/resources/images/browsed.gif
WebEditor/src/resources/images/cellpic.gif
WebEditor/src/resources/images/cellpic2.gif
WebEditor/src/resources/images/close.gif
WebEditor/src/resources/images/close.jpg
WebEditor/src/resources/images/closebook.gif
WebEditor/src/resources/images/completed.gif
WebEditor/src/resources/images/failed.gif
WebEditor/src/resources/images/incomplete.gif
WebEditor/src/resources/images/left-corn.gif
WebEditor/src/resources/images/left_elipse.jpg
WebEditor/src/resources/images/next.gif
WebEditor/src/resources/images/next.jpg
WebEditor/src/resources/images/next_disabled.gif
WebEditor/src/resources/images/next_disabled.jpg
WebEditor/src/resources/images/notattempted.gif
WebEditor/src/resources/images/openbook.gif
WebEditor/src/resources/images/passed.gif
WebEditor/src/resources/images/prev.gif
WebEditor/src/resources/images/prev.jpg
WebEditor/src/resources/images/prev_disabled.gif
WebEditor/src/resources/images/prev_disabled.jpg
WebEditor/src/resources/images/right-corn.gif
WebEditor/src/resources/images/right_elipse.jpg
WebEditor/src/resources/images/start.bmp
WebEditor/src/resources/images/start.gif
WebEditor/src/resources/images/start.jpg
WebEditor/src/resources/images/start2.jpg
WebEditor/src/resources/images/start_disabled.gif
WebEditor/src/resources/images/start_disabled.jpg
WebEditor/src/resources/images/unknown.gif
Added: WebEditor/src/resources/images/FireFly.gif
===================================================================
(Binary files differ)
Property changes on: WebEditor/src/resources/images/FireFly.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: WebEditor/src/resources/images/blank.gif
===================================================================
(Binary files differ)
Property changes on: WebEditor/src/resources/images/blank.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: WebEditor/src/resources/images/browsed.gif
===================================================================
(Binary files differ)
Property changes on: WebEditor/src/resources/images/browsed.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: WebEditor/src/resources/images/cellpic.gif
===================================================================
(Binary files differ)
Property changes on: WebEditor/src/resources/images/cellpic.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: WebEditor/src/resources/images/cellpic2.gif
===================================================================
(Binary files differ)
Property changes on: WebEditor/src/resources/images/cellpic2.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: WebEditor/src/resources/images/close.gif
===================================================================
(Binary files differ)
Property changes on: WebEditor/src/resources/images/close.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: WebEditor/src/resources/images/close.jpg
===================================================================
(Binary files differ)
Property changes on: WebEditor/src/resources/images/close.jpg
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: WebEditor/src/resources/images/closebook.gif
===================================================================
(Binary files differ)
Property changes on: WebEditor/src/resources/images/closebook.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: WebEditor/src/resources/images/completed.gif
===================================================================
(Binary files differ)
Property changes on: WebEditor/src/resources/images/completed.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: WebEditor/src/resources/images/failed.gif
===================================================================
(Binary files differ)
Property changes on: WebEditor/src/resources/images/failed.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: WebEditor/src/resources/images/incomplete.gif
===================================================================
(Binary files differ)
Property changes on: WebEditor/src/resources/images/incomplete.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: WebEditor/src/resources/images/left-corn.gif
===================================================================
(Binary files differ)
Property changes on: WebEditor/src/resources/images/left-corn.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: WebEditor/src/resources/images/left_elipse.jpg
===================================================================
(Binary files differ)
Property changes on: WebEditor/src/resources/images/left_elipse.jpg
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: WebEditor/src/resources/images/next.gif
===================================================================
(Binary files differ)
Property changes on: WebEditor/src/resources/images/next.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: WebEditor/src/resources/images/next.jpg
===================================================================
(Binary files differ)
Property changes on: WebEditor/src/resources/images/next.jpg
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: WebEditor/src/resources/images/next_disabled.gif
===================================================================
(Binary files differ)
Property changes on: WebEditor/src/resources/images/next_disabled.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: WebEditor/src/resources/images/next_disabled.jpg
===================================================================
(Binary files differ)
Property changes on: WebEditor/src/resources/images/next_disabled.jpg
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: WebEditor/src/resources/images/notattempted.gif
===================================================================
(Binary files differ)
Property changes on: WebEditor/src/resources/images/notattempted.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: WebEditor/src/resources/images/openbook.gif
===================================================================
(Binary files differ)
Property changes on: WebEditor/src/resources/images/openbook.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: WebEditor/src/resources/images/passed.gif
===================================================================
(Binary files differ)
Property changes on: WebEditor/src/resources/images/passed.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: WebEditor/src/resources/images/prev.gif
===================================================================
(Binary files differ)
Property changes on: WebEditor/src/resources/images/prev.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: WebEditor/src/resources/images/prev.jpg
===================================================================
(Binary files differ)
Property changes on: WebEditor/src/resources/images/prev.jpg
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: WebEditor/src/resources/images/prev_disabled.gif
===================================================================
(Binary files differ)
Property changes on: WebEditor/src/resources/images/prev_disabled.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: WebEditor/src/resources/images/prev_disabled.jpg
===================================================================
(Binary files differ)
Property changes on: WebEditor/src/resources/images/prev_disabled.jpg
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: WebEditor/src/resources/images/right-corn.gif
===================================================================
(Binary files differ)
Property changes on: WebEditor/src/resources/images/right-corn.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: WebEditor/src/resources/images/right_elipse.jpg
===================================================================
(Binary files differ)
Property changes on: WebEditor/src/resources/images/right_elipse.jpg
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: WebEditor/src/resources/images/start.bmp
===================================================================
(Binary files differ)
Property changes on: WebEditor/src/resources/images/start.bmp
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: WebEditor/src/resources/images/start.gif
===================================================================
(Binary files differ)
Property changes on: WebEditor/src/resources/images/start.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: WebEditor/src/resources/images/start.jpg
===================================================================
(Binary files differ)
Property changes on: WebEditor/src/resources/images/start.jpg
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: WebEditor/src/resources/images/start2.jpg
===================================================================
(Binary files differ)
Property changes on: WebEditor/src/resources/images/start2.jpg
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: WebEditor/src/resources/images/start_disabled.gif
===================================================================
(Binary files differ)
Property changes on: WebEditor/src/resources/images/start_disabled.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: WebEditor/src/resources/images/start_disabled.jpg
===================================================================
(Binary files differ)
Property changes on: WebEditor/src/resources/images/start_disabled.jpg
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: WebEditor/src/resources/images/unknown.gif
===================================================================
(Binary files differ)
Property changes on: WebEditor/src/resources/images/unknown.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: WebEditor/src/resources/index.html
===================================================================
--- WebEditor/src/resources/index.html 2008-05-02 16:39:58 UTC (rev 74)
+++ WebEditor/src/resources/index.html 2008-05-02 19:04:07 UTC (rev 75)
@@ -1,53 +1,122 @@
<html><head>
-
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
- <link rel="stylesheet" href="main.css" type="text/css">
+ <title>Learning system :: Editor of courses</title>
+ <script type="text/javascript" src="api.js"></script>
+ <script type="text/javascript" src="navigation.js"></script>
- <title>FireFly SCORM 2004 Course Player</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 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 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%">
+ </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
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <se...@us...> - 2008-05-02 16:39:59
|
Revision: 74
http://acmcontester.svn.sourceforge.net/acmcontester/?rev=74&view=rev
Author: sem62
Date: 2008-05-02 09:39:58 -0700 (Fri, 02 May 2008)
Log Message:
-----------
Initial commit of resources.
Added Paths:
-----------
WebEditor/src/resources/
WebEditor/src/resources/attemptCountLimit.html
WebEditor/src/resources/chooseMsg.html
WebEditor/src/resources/empty.html
WebEditor/src/resources/index.html
WebEditor/src/resources/terminateSCO.html
WebEditor/src/resources/welcome.html
Added: WebEditor/src/resources/attemptCountLimit.html
===================================================================
--- WebEditor/src/resources/attemptCountLimit.html (rev 0)
+++ WebEditor/src/resources/attemptCountLimit.html 2008-05-02 16:39:58 UTC (rev 74)
@@ -0,0 +1,9 @@
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+ <link rel='stylesheet' href='main.css' type='text/css'>
+</head>
+<body>
+Кількість спроб обмежена і Ви уже їх використали.
+</body>
+</html>
Added: WebEditor/src/resources/chooseMsg.html
===================================================================
--- WebEditor/src/resources/chooseMsg.html (rev 0)
+++ WebEditor/src/resources/chooseMsg.html 2008-05-02 16:39:58 UTC (rev 74)
@@ -0,0 +1,9 @@
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+ <link rel='stylesheet' href='main.css' type='text/css'>
+</head>
+<body>
+Виберіть один із підпунктів в дереві ліворуч.
+</body>
+</html>
\ No newline at end of file
Added: WebEditor/src/resources/empty.html
===================================================================
Added: WebEditor/src/resources/index.html
===================================================================
--- WebEditor/src/resources/index.html (rev 0)
+++ WebEditor/src/resources/index.html 2008-05-02 16:39:58 UTC (rev 74)
@@ -0,0 +1,53 @@
+<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
Added: WebEditor/src/resources/terminateSCO.html
===================================================================
--- WebEditor/src/resources/terminateSCO.html (rev 0)
+++ WebEditor/src/resources/terminateSCO.html 2008-05-02 16:39:58 UTC (rev 74)
@@ -0,0 +1,14 @@
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+ <link rel='stylesheet' href='main.css' type='text/css'>
+</head>
+<body onload="javascript:run();">
+<script language="JScript">
+ function run(){
+ window.parent.document.player.showCurrentItem();
+ }
+</script>
+
+</body>
+</html>
\ No newline at end of file
Added: WebEditor/src/resources/welcome.html
===================================================================
--- WebEditor/src/resources/welcome.html (rev 0)
+++ WebEditor/src/resources/welcome.html 2008-05-02 16:39:58 UTC (rev 74)
@@ -0,0 +1,9 @@
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+ <link rel='stylesheet' href='main.css' type='text/css'>
+</head>
+<center>Вітаємо.<BR>
+Представляємо Вам революційну систему!!!.<BR>
+Ви можете набути нових знань та перевірити старі.</center>
+</html>
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <se...@us...> - 2008-05-02 16:15:54
|
Revision: 73
http://acmcontester.svn.sourceforge.net/acmcontester/?rev=73&view=rev
Author: sem62
Date: 2008-05-02 09:15:52 -0700 (Fri, 02 May 2008)
Log Message:
-----------
Summary page mechanism working now.
Need design summary page (SummaryPage.js).
Modified Paths:
--------------
WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/ResourcedItemModel.java
WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/SimpleQuestion/SimpleQuestionData.java
WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/SummaryPageModel/SummaryPageModel.java
WebEditor/src/template/SummaryPageModel.html
WebEditor/src/template/global/SummaryPage.js
Modified: WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/ResourcedItemModel.java
===================================================================
--- WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/ResourcedItemModel.java 2008-05-02 11:23:52 UTC (rev 72)
+++ WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/ResourcedItemModel.java 2008-05-02 16:15:52 UTC (rev 73)
@@ -29,6 +29,7 @@
return;
}
+ synchronizeItemWithResource(item);
updateItemResource(item, true);
ConfigureItem(item);
Modified: WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/SimpleQuestion/SimpleQuestionData.java
===================================================================
--- WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/SimpleQuestion/SimpleQuestionData.java 2008-05-02 11:23:52 UTC (rev 72)
+++ WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/SimpleQuestion/SimpleQuestionData.java 2008-05-02 16:15:52 UTC (rev 73)
@@ -4,8 +4,8 @@
public class SimpleQuestionData extends ItemData {
private SimpleQuestionAnswersDataModel answers = new SimpleQuestionAnswersDataModel();
- private String caption;
- private String question;
+ private String caption = "";
+ private String question = "";
public SimpleQuestionAnswersDataModel getAnswers() {
return answers;
Modified: WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/SummaryPageModel/SummaryPageModel.java
===================================================================
--- WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/SummaryPageModel/SummaryPageModel.java 2008-05-02 11:23:52 UTC (rev 72)
+++ WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/SummaryPageModel/SummaryPageModel.java 2008-05-02 16:15:52 UTC (rev 73)
@@ -50,7 +50,9 @@
Template template = new Template(resource.getFullHref(), this);
- String content = getSummaryPageContent(anItem.getParent());
+ String content = "<script type=\"text/javascript\">"
+ + getSummaryPageContent(anItem.getParent())
+ + "</script>";
template.setProperty("content", content);
@@ -95,7 +97,7 @@
if (model.getClass() == SimpleQuestionModel.class
|| model.getClass() == LectureModel.class) {
- return "add(\"" + model.getModelName() + "\", \""
+ return "add(\"" + anItem.getTitle() + "\", \"" + model.getModelName() + "\", \""
+ ((Item) anItem).identifier + "\");\n";
}
Modified: WebEditor/src/template/SummaryPageModel.html
===================================================================
--- WebEditor/src/template/SummaryPageModel.html 2008-05-02 11:23:52 UTC (rev 72)
+++ WebEditor/src/template/SummaryPageModel.html 2008-05-02 16:15:52 UTC (rev 73)
@@ -8,10 +8,8 @@
<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
Modified: WebEditor/src/template/global/SummaryPage.js
===================================================================
--- WebEditor/src/template/global/SummaryPage.js 2008-05-02 11:23:52 UTC (rev 72)
+++ WebEditor/src/template/global/SummaryPage.js 2008-05-02 16:15:52 UTC (rev 73)
@@ -0,0 +1,33 @@
+function out(s){
+ document.write(s);
+}
+
+function openBlock(title){
+ out("Opened block with title = "+title+"<br>\n");
+}
+
+function closeBlock(title){
+ out("Closed block with title = "+title+"<br>\n");
+}
+
+
+function add(title, modelName, id){
+ out(title + ". item id = " + id + "(" + modelName + ")<br>\n");
+ out("score is: ");
+ out(getScore(id));
+ out("<br>\n");
+}
+
+function getObjectiveIndex(id){
+ var count = GetValue("cmi.objectives._count");
+ for (i = 0; i < count; i++)
+ if (GetValue("cmi.objectives." + i + ".id") == id)
+ return i;
+ return -1;
+}
+
+function getScore(objectiveID){
+ var index = getObjectiveIndex(objectiveID);
+ var res = GetValue("cmi.objectives." + index + ".score.scaled");
+ 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.
|
|
From: <se...@us...> - 2008-05-02 11:23:44
|
Revision: 72
http://acmcontester.svn.sourceforge.net/acmcontester/?rev=72&view=rev
Author: sem62
Date: 2008-05-02 04:23:52 -0700 (Fri, 02 May 2008)
Log Message:
-----------
Fixed bugs:
* Null itemData for ChapterModel.
* Updating summary pages with h>2 in a course tree.
Modified Paths:
--------------
WebEditor/src/edu/lnu/FireFly/WebEditor/Data/ManifestFactory.java
WebEditor/src/edu/lnu/FireFly/WebEditor/Data/SummaryPageManager.java
WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/ChapterModel.java
WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/ItemModel.java
WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/Lecture/LectureModel.java
WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/ResourcedItemModel.java
WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/SimpleQuestion/SimpleQuestionModel.java
WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/SummaryPageModel/SummaryPageModel.java
Modified: WebEditor/src/edu/lnu/FireFly/WebEditor/Data/ManifestFactory.java
===================================================================
--- WebEditor/src/edu/lnu/FireFly/WebEditor/Data/ManifestFactory.java 2008-05-02 09:54:59 UTC (rev 71)
+++ WebEditor/src/edu/lnu/FireFly/WebEditor/Data/ManifestFactory.java 2008-05-02 11:23:52 UTC (rev 72)
@@ -35,7 +35,7 @@
return null;
}
- model.InitializeDataForItem(root, new ChapterItemData());
+ model.initializeDataForItem(root, new ChapterItemData());
model.updateItemResource(root, false);
return manifest;
Modified: WebEditor/src/edu/lnu/FireFly/WebEditor/Data/SummaryPageManager.java
===================================================================
--- WebEditor/src/edu/lnu/FireFly/WebEditor/Data/SummaryPageManager.java 2008-05-02 09:54:59 UTC (rev 71)
+++ WebEditor/src/edu/lnu/FireFly/WebEditor/Data/SummaryPageManager.java 2008-05-02 11:23:52 UTC (rev 72)
@@ -9,6 +9,7 @@
import edu.lnu.FireFly.FFManifest.item.sequencing.Sequencing;
import edu.lnu.FireFly.FFManifest.item.sequencing.objectives.MapInfo;
import edu.lnu.FireFly.FFManifest.item.sequencing.objectives.Objective;
+import edu.lnu.FireFly.FFManifest.item.sequencing.objectives.Objectives;
import edu.lnu.FireFly.FFManifest.parser.TestDocException;
import edu.lnu.FireFly.WebEditor.GUI.TreeDataModel;
import edu.lnu.FireFly.WebEditor.ItemModels.ChapterModel;
@@ -44,6 +45,16 @@
public void updateSummaryPages(TreeItem root) throws TestDocException {
pushDownSummaryPage(root);
+ for (int i = 0; i < root.getChildCount(); i++) {
+ TreeItem item = root.getChild(i);
+ ItemModel model = ItemModels.getModelFromItem(item);
+
+ if (model.getClass() == OrganizationModel.class
+ || model.getClass() == ChapterModel.class) {
+ updateSummaryPages(item);
+ }
+ }
+
boolean showSummaryPage = isShowSummaryPageForItem(root);
if (showSummaryPage) {
@@ -61,22 +72,33 @@
private void insertAllNeededObjectivesIntoSummaryPage(TreeItem root) {
Item summaryPage = (Item) root.getChild(root.getChildCount() - 1);
-
+
ArrayList<String> objectiveIds = getShowingItemsIds(root);
-
- summaryPage.sequencing.objectives.objective = new ArrayList<Objective>();
- for (int i=0; i < objectiveIds.size(); i++){
+ Objectives objectives = getObjectivesInstance(summaryPage);
+ objectives.objective = new ArrayList<Objective>();
+
+ for (int i = 0; i < objectiveIds.size(); i++) {
String objectiveId = objectiveIds.get(i);
Objective objective = ManifestFactory.createObjective();
-
+
objective.objectiveID = objectiveId;
objective.mapInfo.add(ManifestFactory.createMapInfo(objectiveId));
-
+
summaryPage.sequencing.objectives.objective.add(objective);
}
}
+ private Objectives getObjectivesInstance(Item summaryPage) {
+ Sequencing sequencing = getSequencingInstance(summaryPage);
+
+ if (sequencing.objectives == null) {
+ sequencing.objectives = ManifestFactory.createObjectives();
+ }
+
+ return sequencing.objectives;
+ }
+
private ArrayList<String> getShowingItemsIds(TreeItem root) {
ArrayList<String> result = new ArrayList<String>();
@@ -92,7 +114,8 @@
ItemModel chapterModel = ItemModels.getModelFromItem(child);
if (chapterModel.getClass() == ChapterModel.class) {
- if (((ChapterModel) chapterModel).getShowOnSummaryPage(child)) {
+ if (((ChapterModel) chapterModel)
+ .getShowOnSummaryPage(child)) {
result.addAll(getShowingItemsIds(child));
}
}
Modified: WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/ChapterModel.java
===================================================================
--- WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/ChapterModel.java 2008-05-02 09:54:59 UTC (rev 71)
+++ WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/ChapterModel.java 2008-05-02 11:23:52 UTC (rev 72)
@@ -17,11 +17,21 @@
public class ChapterModel extends ResourcedItemModel {
@Override
+ protected void initializeDataForItem(Item anItem) {
+ initializeDataForItem(anItem, new ChapterItemData());
+ }
+
+ @Override
public boolean getLimitConditionsMenuVisible() {
return false;
}
@Override
+ public void addItem(TreeItem parent) {
+ super.addItem(parent);
+ }
+
+ @Override
public boolean getShowOnSummaryPageMenuVisible() {
return true;
}
@@ -113,7 +123,7 @@
if (itemData == null) {
ItemData data = new ChapterItemData();
- InitializeDataForItem(anItem, data);
+ initializeDataForItem(anItem, data);
itemData = (ChapterItemData) getItemData(anItem);
}
@@ -125,7 +135,7 @@
@Override
public boolean synchronizeItemWithResource(TreeItem anItem) {
- InitializeDataForItem(anItem, new ChapterItemData());
+ initializeDataForItem(anItem, new ChapterItemData());
String identifier = "";
if (anItem.getClass() == Item.class) {
Modified: WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/ItemModel.java
===================================================================
--- WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/ItemModel.java 2008-05-02 09:54:59 UTC (rev 71)
+++ WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/ItemModel.java 2008-05-02 11:23:52 UTC (rev 72)
@@ -8,6 +8,7 @@
import java.util.UUID;
import edu.lnu.FireFly.FFManifest.TreeItem;
+import edu.lnu.FireFly.FFManifest.item.Item;
import edu.lnu.FireFly.FFManifest.resource.Resource;
import edu.lnu.FireFly.WebEditor.WebEditor;
import edu.lnu.FireFly.WebEditor.WSClients.WebEditorServiceClient;
@@ -17,7 +18,7 @@
protected String modelName = "Abstract model";
- public void InitializeDataForItem(TreeItem anItem, ItemData data) {
+ public void initializeDataForItem(TreeItem anItem, ItemData data) {
questionsData.put(anItem, data);
}
@@ -36,6 +37,8 @@
return itemData.getShowOnSummaryPage();
}
+ protected abstract void initializeDataForItem(Item anItem);
+
public final void setShowOnSummaryPage(TreeItem anItem, boolean aValue) {
ItemData itemData = getItemData(anItem);
Modified: WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/Lecture/LectureModel.java
===================================================================
--- WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/Lecture/LectureModel.java 2008-05-02 09:54:59 UTC (rev 71)
+++ WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/Lecture/LectureModel.java 2008-05-02 11:23:52 UTC (rev 72)
@@ -20,6 +20,11 @@
public class LectureModel extends ResourcedItemModel {
@Override
+ protected void initializeDataForItem(Item anItem) {
+ initializeDataForItem(anItem, new LectureData());
+ }
+
+ @Override
public boolean getShowSummaryPageMenuVisible() {
return false;
}
@@ -40,7 +45,7 @@
@Override
public boolean synchronizeItemWithResource(TreeItem anItem) {
- InitializeDataForItem(anItem, new LectureData());
+ initializeDataForItem(anItem, new LectureData());
Resource resource = WebEditor.instance.getManifest().resources
.findResourceByIdentifier(((Item)anItem).identifierref);
Modified: WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/ResourcedItemModel.java
===================================================================
--- WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/ResourcedItemModel.java 2008-05-02 09:54:59 UTC (rev 71)
+++ WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/ResourcedItemModel.java 2008-05-02 11:23:52 UTC (rev 72)
@@ -4,7 +4,6 @@
import edu.lnu.FireFly.FFManifest.TreeItem;
import edu.lnu.FireFly.FFManifest.item.Item;
-import edu.lnu.FireFly.WebEditor.Data.SummaryPageManager;
import edu.lnu.FireFly.WebEditor.GUI.TreeDataModel;
public abstract class ResourcedItemModel extends ItemModel {
@@ -20,6 +19,8 @@
item.identifierref = createNewResource();
+ initializeDataForItem(item);
+
try {
parent.addChild(item);
TreeDataModel.getInstance().treeNodesInserted(item);
@@ -28,10 +29,8 @@
return;
}
- synchronizeItemWithResource(item);
+ updateItemResource(item, true);
- SummaryPageManager.getInstance().updateSummaryPages();
-
ConfigureItem(item);
}
Modified: WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/SimpleQuestion/SimpleQuestionModel.java
===================================================================
--- WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/SimpleQuestion/SimpleQuestionModel.java 2008-05-02 09:54:59 UTC (rev 71)
+++ WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/SimpleQuestion/SimpleQuestionModel.java 2008-05-02 11:23:52 UTC (rev 72)
@@ -22,6 +22,11 @@
public class SimpleQuestionModel extends ResourcedItemModel {
@Override
+ protected void initializeDataForItem(Item anItem) {
+ initializeDataForItem(anItem, new SimpleQuestionData());
+ }
+
+ @Override
public boolean getLimitConditionsMenuVisible() {
return true;
}
@@ -104,7 +109,7 @@
SAXReader reader = new SAXReader();
- InitializeDataForItem(anItem, new SimpleQuestionData());
+ initializeDataForItem(anItem, new SimpleQuestionData());
Document doc = null;
try {
Modified: WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/SummaryPageModel/SummaryPageModel.java
===================================================================
--- WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/SummaryPageModel/SummaryPageModel.java 2008-05-02 09:54:59 UTC (rev 71)
+++ WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/SummaryPageModel/SummaryPageModel.java 2008-05-02 11:23:52 UTC (rev 72)
@@ -19,6 +19,11 @@
public class SummaryPageModel extends ResourcedItemModel {
@Override
+ protected void initializeDataForItem(Item anItem) {
+ initializeDataForItem(anItem, new SummaryPageData());
+ }
+
+ @Override
public boolean getLimitConditionsMenuVisible() {
return false;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <se...@us...> - 2008-05-02 09:54:54
|
Revision: 71
http://acmcontester.svn.sourceforge.net/acmcontester/?rev=71&view=rev
Author: sem62
Date: 2008-05-02 02:54:59 -0700 (Fri, 02 May 2008)
Log Message:
-----------
Initial import of template
Added Paths:
-----------
WebEditor/src/template/
WebEditor/src/template/LectureModel.conf
WebEditor/src/template/LectureModel.html
WebEditor/src/template/SimpleQuestionModel.conf
WebEditor/src/template/SimpleQuestionModel.html
WebEditor/src/template/SummaryPageModel.html
WebEditor/src/template/global/
WebEditor/src/template/global/APIWrapper.js
WebEditor/src/template/global/SummaryPage.js
WebEditor/src/template/global/main.css
WebEditor/src/template/global/simpleQ.js
Added: WebEditor/src/template/LectureModel.conf
===================================================================
--- WebEditor/src/template/LectureModel.conf (rev 0)
+++ WebEditor/src/template/LectureModel.conf 2008-05-02 09:54:59 UTC (rev 71)
@@ -0,0 +1,5 @@
+<?xml version = "1.0" ?>
+<LectureModel>
+ <caption>New caption</caption>
+ <content>New content.</content>
+</LectureModel>
Added: WebEditor/src/template/LectureModel.html
===================================================================
--- WebEditor/src/template/LectureModel.html (rev 0)
+++ WebEditor/src/template/LectureModel.html 2008-05-02 09:54:59 UTC (rev 71)
@@ -0,0 +1,16 @@
+<html>
+<head>
+ <title>title</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf8" />
+ <script type="text/javascript" src="global/APIWrapper.js"></script>
+</head>
+
+<body onload="Initialize();" onunload="Terminate();">
+ <div id="lecture_caption">
+ <!--caption start-->New caption<!--caption end-->
+ </div>
+ <div id="lecture_content">
+ <!--content start--><!--content end-->
+ </div>
+</body>
+</html>
\ No newline at end of file
Added: WebEditor/src/template/SimpleQuestionModel.conf
===================================================================
--- WebEditor/src/template/SimpleQuestionModel.conf (rev 0)
+++ WebEditor/src/template/SimpleQuestionModel.conf 2008-05-02 09:54:59 UTC (rev 71)
@@ -0,0 +1,9 @@
+<?xml version = "1.0" ?>
+<SimpleQuestionModel>
+ <caption>New caption</caption>
+ <question>Answer "Yes" to question, please.</question>
+ <answers singleVariant="false">
+ <answer point="0">Yes</answer>
+ <answer point="1">No</answer>
+ </answers>
+</SimpleQuestionModel>
Added: WebEditor/src/template/SimpleQuestionModel.html
===================================================================
--- WebEditor/src/template/SimpleQuestionModel.html (rev 0)
+++ WebEditor/src/template/SimpleQuestionModel.html 2008-05-02 09:54:59 UTC (rev 71)
@@ -0,0 +1,27 @@
+<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/simpleQ.js"></script>
+</head>
+
+<body onload="Initialize();" onunload="Terminate();">
+ <div id="simpleQ_caption">
+ <!--caption start-->New caption<!--caption end-->
+ </div>
+ <div id="simpleQ_question">
+ <!--question start-->Answer "Yes" to question, please.<!--question end-->
+ </div>
+ <form onsubmit="return checkAnswer(this);">
+ <div id="simpleQ_answers">
+ <script language="javascript">
+ <!--answers start-->
+ <!--answers end-->
+ show();
+ </script>
+ </div>
+ <input type=submit value="Next">
+ </form>
+</body>
+</html>
\ No newline at end of file
Added: WebEditor/src/template/SummaryPageModel.html
===================================================================
--- WebEditor/src/template/SummaryPageModel.html (rev 0)
+++ WebEditor/src/template/SummaryPageModel.html 2008-05-02 09:54:59 UTC (rev 71)
@@ -0,0 +1,17 @@
+<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
Added: WebEditor/src/template/global/APIWrapper.js
===================================================================
--- WebEditor/src/template/global/APIWrapper.js (rev 0)
+++ WebEditor/src/template/global/APIWrapper.js 2008-05-02 09:54:59 UTC (rev 71)
@@ -0,0 +1,458 @@
+/*******************************************************************************
+**
+** Advanced Distributed Learning Co-Laboratory (ADL Co-Lab) grants you
+** ("Licensee") a non-exclusive, royalty free, license to use and redistribute
+** this software in source and binary code form, provided that i) this copyright
+** notice and license appear on all copies of the software; and ii) Licensee
+** does not utilize the software in a manner which is disparaging to ADL Co-Lab.
+**
+** This software is provided "AS IS," without a warranty of any kind. ALL
+** EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY
+** IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR
+** NON-INFRINGEMENT, ARE HEREBY EXCLUDED. ADL Co-Lab AND ITS LICENSORS SHALL
+** NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING,
+** MODIFYING OR DISTRIBUTING THE SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL
+** ADL Co-Lab OR ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA,
+** OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+** DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING
+** OUT OF THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF ADL Co-Lab HAS BEEN
+** ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+**
+*******************************************************************************/
+
+/*******************************************************************************
+**
+** This file is being presented to Content Developers, Content Programmers and
+** Instructional Designers to demonstrate one way to abstract API calls from the
+** actual content to allow for uniformity and reuse of content fragments.
+**
+** The purpose in wrapping the calls to the API is to (1) provide a
+** consistent means of finding the LMS API adapter within the window
+** hierarchy, (2) to ensure that the method calls are called correctly by the
+** SCO and (3) to make possible changes to the actual API Specifications and
+** Standards easier to implement/change quickly.
+**
+** This is just one possible example for implementing the API guidelines for
+** runtime communication between an LMS and executable content components.
+** There are many other possible implementations.
+**
+*******************************************************************************/
+
+// local variable definitions used for finding the API
+var apiHandle = null;
+var findAPITries = 0;
+var noAPIFound = "false";
+
+// local variable used to keep from calling Terminate() more than once
+var terminated = "false";
+
+// local variable used by the content developer to debug
+// This should be set to true during development to find errors. However,
+// This should be set to false prior to deployment.
+var _debug = false;
+
+/*******************************************************************************
+**
+** This function looks for an object named API in parent and opener windows
+**
+** Inputs: Object - The Window Object
+**
+** Return: Object - If the API object is found, it's returned, otherwise null
+** is returned
+**
+*******************************************************************************/
+function findAPI( win )
+{
+ while ( (win.API_1484_11 == null) &&
+ (win.parent != null) &&
+ (win.parent != win) )
+ {
+ findAPITries++;
+
+ if ( findAPITries > 500 )
+ {
+ alert( "Error finding API -- too deeply nested." );
+ return null;
+ }
+
+ win = win.parent;
+ }
+
+ return win.API_1484_11;
+}
+
+/*******************************************************************************
+**
+** This function looks for an object named API, first in the current window's
+** frame hierarchy and then, if necessary, in the current window's opener window
+** hierarchy (if there is an opener window).
+**
+** Inputs: none
+**
+** Return: Object - If the API object is found, it's returned, otherwise null
+** is returned
+**
+*******************************************************************************/
+function getAPI()
+{
+ var theAPI = findAPI( window );
+
+ if ( (theAPI == null) &&
+ (window.opener != null) &&
+ (typeof(window.opener) != "undefined") )
+ {
+ theAPI = findAPI( window.opener );
+ }
+
+ if (theAPI == null)
+ {
+ alert( "Unable to locate the LMS's API Implementation.\n" +
+ "Communication with the LMS will not occur." );
+
+ noAPIFound = "true";
+ }
+
+ return theAPI
+}
+
+/*******************************************************************************
+**
+** Returns the handle to API object if it was previously set, otherwise it
+** returns null
+**
+** Inputs: None
+**
+** Return: Object - The value contained by the apiHandle variable.
+**
+*******************************************************************************/
+function getAPIHandle()
+{
+ if ( apiHandle == null )
+ {
+ if ( noAPIFound == "false" )
+ {
+ apiHandle = getAPI();
+ }
+ }
+
+ return apiHandle;
+}
+
+/*******************************************************************************
+**
+** This function is used to tell the LMS to initiate the communication session.
+**
+** Inputs: None
+**
+** Return: String - "true" if the initialization was successful, or
+** "false" if the initialization failed.
+**
+*******************************************************************************/
+function initializeCommunication()
+{
+ var api = getAPIHandle();
+
+ if ( api == null )
+ {
+ return "false";
+ }
+ else
+ {
+ var result = api.Initialize("");
+
+ if ( result != "true" )
+ {
+ var errCode = retrieveLastErrorCode();
+
+ displayErrorInfo( errCode );
+
+ // may want to do some error handling
+ }
+ }
+
+ return result;
+}
+
+/*******************************************************************************
+**
+** This function is used to tell the LMS to terminate the communication session
+**
+** Inputs: None
+**
+** Return: String - "true" if successful or
+** "false" if failed.
+**
+*******************************************************************************/
+function terminateCommunication()
+{
+ var api = getAPIHandle();
+
+ if ( api == null )
+ {
+ return "false";
+ }
+ else
+ {
+ // call Terminate only if it was not previously called
+ if ( terminated != "true" )
+ {
+ // call the Terminate function that should be implemented by
+ // the API
+ var result = api.Terminate("");
+
+ if ( result != "true" )
+ {
+ var errCode = retrieveLastErrorCode();
+
+ displayErrorInfo( errCode );
+
+ // may want to do some error handling
+ }
+ else // terminate was successful
+ {
+ terminated = "true";
+ }
+ }
+ }
+
+ return result;
+}
+
+/*******************************************************************************
+**
+** This function requests information from the LMS.
+**
+** Inputs: String - Name of the data model defined category or element
+** (e.g. cmi.core.learner_id)
+**
+** Return: String - The value presently assigned to the specified data model
+** element.
+**
+*******************************************************************************/
+function retrieveDataValue( name )
+{
+ // do not call a set after finish was called
+ if ( terminated != "true" )
+ {
+ var api = getAPIHandle();
+
+ if ( api == null )
+ {
+ return "";
+ }
+ else
+ {
+ var value = api.GetValue( name );
+
+ var errCode = api.GetLastError();
+
+ if ( errCode != "0" )
+ {
+ var errCode = retrieveLastErrorCode();
+
+ displayErrorInfo( errCode );
+ }
+ else
+ {
+ return value;
+ }
+ }
+ }
+
+ return;
+}
+
+/*******************************************************************************
+**
+** This function is used to tell the LMS to assign the value to the named data
+** model element.
+**
+** Inputs: String - Name of the data model defined category or element value
+**
+** String - The value that the named element or category will be
+** assigned
+**
+** Return: String - "true" if successful or
+** "false" if failed.
+**
+*******************************************************************************/
+function storeDataValue( name, value )
+{
+ // do not call a set after finish was called
+ if ( terminated != "true" )
+ {
+ var api = getAPIHandle();
+
+ if ( api == null )
+ {
+ return;
+ }
+ else
+ {
+ var result = api.SetValue( name, value );
+
+ if ( result != "true" )
+ {
+ var errCode = retrieveLastErrorCode();
+
+ displayErrorInfo( errCode );
+
+ // may want to do some error handling
+ }
+ }
+ }
+
+ return;
+}
+
+/*******************************************************************************
+**
+** This function requests the error code for the current error state from the
+** LMS.
+**
+** Inputs: None
+**
+** Return: String - The last error code.
+**
+*******************************************************************************/
+function retrieveLastErrorCode()
+{
+ // It is permitted to call GetLastError() after Terminate()
+
+ var api = getAPIHandle();
+
+ if ( api == null )
+ {
+ return "";
+ }
+ else
+ {
+ return api.GetLastError();
+ }
+}
+
+/*******************************************************************************
+**
+** This function requests a textual description of the current error state from
+** the LMS
+**
+** Inputs: String - The error code.
+**
+** Return: String - Textual description of the given error state.
+**
+*******************************************************************************/
+function retrieveErrorInfo( errCode )
+{
+ // It is permitted to call GetLastError() after Terminate()
+
+ var api = getAPIHandle();
+
+ if ( api == null )
+ {
+ return "";
+ }
+ else
+ {
+
+ return api.GetErrorString( errCode );
+ }
+}
+
+/*******************************************************************************
+**
+** This function requests additional diagnostic information about the given
+** error code. This information is LMS specific, but can help a developer find
+** errors in the SCO.
+**
+** Inputs: String - The error code.
+**
+** Return: String - Additional diagnostic information about the given error
+** code
+**
+*******************************************************************************/
+function retrieveDiagnosticInfo( error )
+{
+ // It is permitted to call GetLastError() after Terminate()
+
+ var api = getAPIHandle();
+
+ if ( api == null )
+ {
+ return "";
+ }
+ else
+ {
+ return api.GetDiagnostic( error );
+ }
+}
+
+/*******************************************************************************
+**
+** This function requests that the LMS persist all data to this point in the
+** session.
+**
+** Inputs: None
+**
+** Return: None
+**
+*******************************************************************************/
+function persistData()
+{
+ // do not call a set after Terminate() was called
+ if ( terminated != "true" )
+ {
+ var api = getAPIHandle();
+
+ if ( api == null )
+ {
+ return "";
+ }
+ else
+ {
+ return api.Commit();
+ }
+ }
+ else
+ {
+ return "";
+ }
+}
+
+/*******************************************************************************
+**
+** Display the last error code, error description and diagnostic information.
+**
+** Inputs: String - The error code
+**
+** Return: None
+**
+*******************************************************************************/
+function displayErrorInfo( errCode )
+{
+ if ( _debug )
+ {
+ var errString = retrieveErrorInfo( errCode );
+ var errDiagnostic = retrieveDiagnosticInfo( errCode );
+
+ alert( "ERROR: " + errCode + " - " + errString + "\n" +
+ "DIAGNOSTIC: " + errDiagnostic );
+ }
+}
+
+function Terminate()
+{
+ terminateCommunication();
+}
+
+function Initialize()
+{
+ initializeCommunication();
+}
+
+function SetValue(p1, p2){
+ storeDataValue(p1, p2);
+}
+
+function GetValue(p1){
+ return retrieveDataValue(p1);
+}
Added: WebEditor/src/template/global/SummaryPage.js
===================================================================
Added: WebEditor/src/template/global/main.css
===================================================================
--- WebEditor/src/template/global/main.css (rev 0)
+++ WebEditor/src/template/global/main.css 2008-05-02 09:54:59 UTC (rev 71)
@@ -0,0 +1,18 @@
+body {
+ font-family:Verdana,Tahoma,Arial,Sans-Serif;
+ font-size:11px;
+ background-color: #DAF3FF;
+ padding:10px 20px 20px 10px;
+ scrollbar-3dlight-color:#C4C4B8;
+ scrollbar-arrow-color:#6A6A53;
+ scrollbar-darkshadow-color:#8A8A73;
+ scrollbar-face-color:#D9D9D0;
+ scrollbar-highlight-color:#FFFFFF;
+ scrollbar-shadow-color:#8A8A73;
+ scrollbar-track-color:#EFEFEF
+}
+
+.head{
+ font-size: 36px;
+ text-decoration: bold, underline;
+}
Added: WebEditor/src/template/global/simpleQ.js
===================================================================
--- WebEditor/src/template/global/simpleQ.js (rev 0)
+++ WebEditor/src/template/global/simpleQ.js 2008-05-02 09:54:59 UTC (rev 71)
@@ -0,0 +1,142 @@
+var singleAnswer=false;
+var answers=new Array();
+function setSingleVariant(singleVariant){
+ singleAnswer = singleVariant;
+}
+function addAnswer(_text, _point){
+ var answer = {
+ point: _point,
+ text: _text,
+ id: "answer" + answers.length
+ };
+ answers.push(answer);
+};
+function show(){
+ var i;
+ var interactions = GetValue("cmi.interactions._count");
+ var pref = "cmi.interactions." + interactions + ".";
+ if (singleAnswer){
+ SetValue(pref + "type", "choice");
+ } else {
+ SetValue(pref + "type", "other");
+ }
+
+ for (i=0; i < answers.length; i++){
+ if (singleAnswer){
+ document.write("<input type='radio' name='answer' id='" + answers[i].id + "' value='" + answers[i].id + "'>");
+ } else {
+ document.write("<input type='checkbox' id='" + answers[i].id + "'>");
+ }
+ document.write(answers[i].text);
+ document.write("<BR>");
+
+ SetValue(pref + "correct_responses." + i + ".pattern", "\"" + answers[i].id + "\"");
+ SetValue(pref + "correct_responses." + i + ".weighting", "\"" + answers[i].point + "\"");
+ }
+}
+function getMaxScore(){
+ if (singleAnswer){
+ var i;
+ var max = answers[0].point;
+ for (i=1; i < answers.length; i++){
+ if (answers[i].point > max){
+ max = answers[i].point;
+ }
+ }
+ } else {
+ var i;
+ var max = 0;
+ for (i=0; i < answers.length; i++){
+ if (answers[i].point > 0){
+ max += answers[i].point;
+ }
+ }
+ }
+ return max;
+}
+function getMinScore(){
+ if (singleAnswer){
+ var i;
+ var min = answers[0].point;
+ for (i=1; i < answers.length; i++){
+ if (answers[i].point < min){
+ min = answers[i].point;
+ }
+ }
+ } else {
+ var i;
+ var min = 0;
+ for (i=0; i < answers.length; i++){
+ if (answers[i].point < 0){
+ min += answers[i].point;
+ }
+ }
+ }
+ return min;
+}
+function getRawScore(){
+ var i;
+ var res=0;
+ for (i=0; i < answers.length; i++){
+ var ans = document.getElementById(answers[i].id);
+ if (ans.checked){
+ res += answers[i].point;
+ }
+ }
+
+ return res;
+}
+function checkAnswer(frm){
+ SetValue("cmi.complation_status", "complated");
+ SetValue("cmi.exit", "normal");
+
+ var max = getMaxScore();
+ var min = getMinScore();
+ var raw = getRawScore()
+ var scaled = ((raw - min)/(max - min))*2 - 1;
+
+ SetValue("cmi.score.min", min);
+ SetValue("cmi.score.max", max);
+ SetValue("cmi.score.raw", raw);
+ SetValue("cmi.score.scaled", scaled);
+ SetValue("cmi.success_status", (raw==max)?"complate":"incomplate");
+
+ SetValue("cmi.objectives.0.score.min", min);
+ SetValue("cmi.objectives.0.score.max", max);
+ SetValue("cmi.objectives.0.score.raw", raw);
+ SetValue("cmi.objectives.0.score.scaled", scaled);
+
+ var pref = "cmi.interactions." + (GetValue("cmi.interactions._count") - 1);
+ if (singleAnswer){
+ var i;
+ for (i=0; i < answers.length; i++){
+ var ans = document.getElementById(answers[i].id);
+ if (ans.checked){
+ SetValue(pref + ".learner_response", "\"" + answers[i].id + "\"");
+
+ break;
+ }
+ }
+ } else {
+ var i;
+ var checkedCount = 0;
+ var res = "";
+ for (i=0; i < answers.length; i++){
+ var ans = document.getElementById(answers[i].id);
+ if (ans.checked){
+ checkedCount++;
+ if (checkedCount > 1){
+ res += "[,]";
+ }
+ res += answers[i].id;
+ }
+ }
+ SetValue(pref + ".learner_response", "\"" + res + "\"");
+ }
+
+ SetValue(pref + ".result", "\"" + scaled + "\"");
+
+ Terminate();
+
+ return false;
+}
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <se...@us...> - 2008-05-02 09:52:35
|
Revision: 70
http://acmcontester.svn.sourceforge.net/acmcontester/?rev=70&view=rev
Author: sem62
Date: 2008-05-02 02:52:38 -0700 (Fri, 02 May 2008)
Log Message:
-----------
Added objectives to summary pages. Now only need modify templates.
Modified Paths:
--------------
WebEditor/src/edu/lnu/FireFly/WebEditor/Data/ManifestFactory.java
WebEditor/src/edu/lnu/FireFly/WebEditor/Data/SummaryPageManager.java
Modified: WebEditor/src/edu/lnu/FireFly/WebEditor/Data/ManifestFactory.java
===================================================================
--- WebEditor/src/edu/lnu/FireFly/WebEditor/Data/ManifestFactory.java 2008-05-01 23:25:19 UTC (rev 69)
+++ WebEditor/src/edu/lnu/FireFly/WebEditor/Data/ManifestFactory.java 2008-05-02 09:52:38 UTC (rev 70)
@@ -75,4 +75,12 @@
public static MapInfo createMapInfo() {
return new MapInfo();
}
+
+ public static MapInfo createMapInfo(String targetObjectiveID) {
+ MapInfo mapInfo = new MapInfo();
+
+ mapInfo.targetObjectiveID = targetObjectiveID;
+
+ return mapInfo;
+ }
}
Modified: WebEditor/src/edu/lnu/FireFly/WebEditor/Data/SummaryPageManager.java
===================================================================
--- WebEditor/src/edu/lnu/FireFly/WebEditor/Data/SummaryPageManager.java 2008-05-01 23:25:19 UTC (rev 69)
+++ WebEditor/src/edu/lnu/FireFly/WebEditor/Data/SummaryPageManager.java 2008-05-02 09:52:38 UTC (rev 70)
@@ -1,11 +1,14 @@
package edu.lnu.FireFly.WebEditor.Data;
+import java.util.ArrayList;
+
import edu.lnu.FireFly.FFManifest.Manifest;
import edu.lnu.FireFly.FFManifest.Organization;
import edu.lnu.FireFly.FFManifest.TreeItem;
import edu.lnu.FireFly.FFManifest.item.Item;
import edu.lnu.FireFly.FFManifest.item.sequencing.Sequencing;
import edu.lnu.FireFly.FFManifest.item.sequencing.objectives.MapInfo;
+import edu.lnu.FireFly.FFManifest.item.sequencing.objectives.Objective;
import edu.lnu.FireFly.FFManifest.parser.TestDocException;
import edu.lnu.FireFly.WebEditor.GUI.TreeDataModel;
import edu.lnu.FireFly.WebEditor.ItemModels.ChapterModel;
@@ -47,16 +50,62 @@
createSummaryPageIfNotExists(root);
Item summaryPage = (Item) root.getChild(root.getChildCount() - 1);
ItemModel model = ItemModels.getModelFromItem(summaryPage);
+
+ insertAllNeededObjectivesIntoSummaryPage(root);
+
((SummaryPageModel) model).updateItemResource(summaryPage, true);
} else {
deleteSummaryPageIfExists(root);
}
}
+ private void insertAllNeededObjectivesIntoSummaryPage(TreeItem root) {
+ Item summaryPage = (Item) root.getChild(root.getChildCount() - 1);
+
+ ArrayList<String> objectiveIds = getShowingItemsIds(root);
+
+ summaryPage.sequencing.objectives.objective = new ArrayList<Objective>();
+
+ for (int i=0; i < objectiveIds.size(); i++){
+ String objectiveId = objectiveIds.get(i);
+ Objective objective = ManifestFactory.createObjective();
+
+ objective.objectiveID = objectiveId;
+ objective.mapInfo.add(ManifestFactory.createMapInfo(objectiveId));
+
+ summaryPage.sequencing.objectives.objective.add(objective);
+ }
+ }
+
+ private ArrayList<String> getShowingItemsIds(TreeItem root) {
+ ArrayList<String> result = new ArrayList<String>();
+
+ for (int i = 0; i < root.getChildCount(); i++) {
+ TreeItem item = root.getChild(i);
+ ItemModel model = ItemModels.getModelFromItem(item);
+ if (model.getShowOnSummaryPage(item)) {
+ result.add(getItemId(item));
+ }
+
+ for (int j = 0; i < item.getChildCount(); i++) {
+ TreeItem child = item.getChild(j);
+ ItemModel chapterModel = ItemModels.getModelFromItem(child);
+
+ if (chapterModel.getClass() == ChapterModel.class) {
+ if (((ChapterModel) chapterModel).getShowOnSummaryPage(child)) {
+ result.addAll(getShowingItemsIds(child));
+ }
+ }
+ }
+ }
+
+ return result;
+ }
+
private void recursivlyUpdateObjectives(TreeItem root) {
updateItemObjectives(root);
-
- for (int i=0; i < root.getChildCount(); i++){
+
+ for (int i = 0; i < root.getChildCount(); i++) {
recursivlyUpdateObjectives(root.getChild(i));
}
}
@@ -103,7 +152,7 @@
showSummaryPage = model.getShowSummaryPage(root);
} else {
throw new TestDocException(
- "Root element must be a chapter or an organization");
+ "Root element must be a chapter or an organization");
}
return showSummaryPage;
@@ -171,8 +220,7 @@
if (anItem.getClass() == Item.class) {
if (((Item) anItem).sequencing == null) {
- ((Item) anItem).sequencing = ManifestFactory
- .createSequencing();
+ ((Item) anItem).sequencing = ManifestFactory.createSequencing();
}
sequencing = ((Item) anItem).sequencing;
@@ -183,32 +231,34 @@
private void updateItemObjectives(TreeItem anItem) {
Sequencing sequencing = getSequencingInstance(anItem);
- if (sequencing.objectives == null){
+ if (sequencing.objectives == null) {
sequencing.objectives = ManifestFactory.createObjectives();
}
-
- sequencing.objectives.primaryObjective = ManifestFactory.createObjective();
+
+ sequencing.objectives.primaryObjective = ManifestFactory
+ .createObjective();
sequencing.objectives.primaryObjective.objectiveID = getItemId(anItem);
sequencing.objectives.primaryObjective.satisfiedByMeasure = true;
-
+
MapInfo mapInfo = ManifestFactory.createMapInfo();
mapInfo.writeNormalizedMeasure = true;
mapInfo.writeSatisfiedStatus = true;
mapInfo.targetObjectiveID = sequencing.objectives.primaryObjective.objectiveID;
-
- sequencing.objectives.primaryObjective.mapInfo = ManifestFactory.createMapInfos();
+
+ sequencing.objectives.primaryObjective.mapInfo = ManifestFactory
+ .createMapInfos();
sequencing.objectives.primaryObjective.mapInfo.add(mapInfo);
}
-
+
private String getItemId(TreeItem anItem) {
- if (anItem.getClass() == Item.class){
- return ((Item)anItem).identifier;
+ if (anItem.getClass() == Item.class) {
+ return ((Item) anItem).identifier;
}
-
- if (anItem.getClass() == Organization.class){
- return ((Organization)anItem).identifier;
+
+ if (anItem.getClass() == Organization.class) {
+ return ((Organization) anItem).identifier;
}
-
+
return null;
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <br...@us...> - 2008-05-01 23:25:12
|
Revision: 69
http://acmcontester.svn.sourceforge.net/acmcontester/?rev=69&view=rev
Author: brus07
Date: 2008-05-01 16:25:19 -0700 (Thu, 01 May 2008)
Log Message:
-----------
Test
Modified Paths:
--------------
ACMServer/trunk/AcmContester.suo
Modified: ACMServer/trunk/AcmContester.suo
===================================================================
(Binary files differ)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: ACM C. <web...@ac...> - 2008-05-01 23:14:46
|
---------- Пересланное сообщение ---------- От: ACM Contester <web...@ac...> Дата: 2 мая 2008 г. 1:27 Тема: Перший лист для проби Кому: acm...@li... Перший лист для проби. Тексттт. -- "ACM Контестер - рух вперед" http://acm.lviv.ua -- "ACM Контестер - рух вперед" http://acm.lviv.ua |
|
From: ACM C. <web...@ac...> - 2008-05-01 22:58:19
|
---------- Пересланное сообщение ---------- От: ACM Contester <web...@ac...> Дата: 2 мая 2008 г. 1:27 Тема: Перший лист для проби Кому: acm...@li... Перший лист для проби. Тексттт. -- "ACM Контестер - рух вперед" http://acm.lviv.ua -- "ACM Контестер - рух вперед" http://acm.lviv.ua |
|
From: Руслан Б. <br...@ma...> - 2008-05-01 22:37:37
|
Тест, перший лист. Текстт. Test, first mail. Textt. Авто@Mail.Ru: Все девушки Пекинского автосалона http://r.mail.ru/cln3686/auto.mail.ru |
|
From: ACM C. <web...@ac...> - 2008-05-01 22:27:19
|
Перший лист для проби. Тексттт. -- "ACM Контестер - рух вперед" http://acm.lviv.ua |