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: <se...@us...> - 2008-05-08 20:56:53
|
Revision: 107
http://acmcontester.svn.sourceforge.net/acmcontester/?rev=107&view=rev
Author: sem62
Date: 2008-05-08 13:56:59 -0700 (Thu, 08 May 2008)
Log Message:
-----------
Fully working LecturePropertyDialog.
Modified Paths:
--------------
WebEditor/src/edu/lnu/FireFly/WebEditor/AppletWithWYSIWYGEditor.java
WebEditor/src/edu/lnu/FireFly/WebEditor/GUI/Dialogs/LecturePropertiestsDlg.java
WebEditor/src/edu/lnu/FireFly/WebEditor/GUI/Dialogs/PropertyDlg.java
Modified: WebEditor/src/edu/lnu/FireFly/WebEditor/AppletWithWYSIWYGEditor.java
===================================================================
--- WebEditor/src/edu/lnu/FireFly/WebEditor/AppletWithWYSIWYGEditor.java 2008-05-08 20:11:53 UTC (rev 106)
+++ WebEditor/src/edu/lnu/FireFly/WebEditor/AppletWithWYSIWYGEditor.java 2008-05-08 20:56:59 UTC (rev 107)
@@ -1,16 +1,16 @@
package edu.lnu.FireFly.WebEditor;
-import javax.swing.JTextField;
+import javax.swing.text.JTextComponent;
import netscape.javascript.JSObject;
import edu.lnu.FireFly.WebEditor.GUI.Dialogs.PropertyDlg;
public class AppletWithWYSIWYGEditor extends AppletWithApiHandle{
private boolean htmlEditing = false;
- private JTextField textField = null;
+ private JTextComponent textField = null;
private PropertyDlg editingDlg = null;
- public void htmlEdit(JTextField captionTextField2, PropertyDlg dlg) {
+ public void htmlEdit(JTextComponent captionTextField2, PropertyDlg dlg) {
JSObject win = JSObject.getWindow(this);
Object[] params = new String[1];
params[0] = captionTextField2.getText();
Modified: WebEditor/src/edu/lnu/FireFly/WebEditor/GUI/Dialogs/LecturePropertiestsDlg.java
===================================================================
--- WebEditor/src/edu/lnu/FireFly/WebEditor/GUI/Dialogs/LecturePropertiestsDlg.java 2008-05-08 20:11:53 UTC (rev 106)
+++ WebEditor/src/edu/lnu/FireFly/WebEditor/GUI/Dialogs/LecturePropertiestsDlg.java 2008-05-08 20:56:59 UTC (rev 107)
@@ -24,7 +24,7 @@
captionTextField.setText(titleTextField.getText());
}
captionTextField.setEnabled(!sameAsTitleCheckbox.isSelected());
- editContentInHtmlBtn.setEnabled(captionTextField.isEnabled());
+ editCaptionInHtmlBtn.setEnabled(captionTextField.isEnabled());
}
}
@@ -35,10 +35,10 @@
private javax.swing.JCheckBox sameAsTitleCheckbox;
+ private javax.swing.JButton editCaptionInHtmlBtn;
private javax.swing.JButton editContentInHtmlBtn;
private javax.swing.JEditorPane contentEditorPane;
- private javax.swing.JLabel titleLabel;
private javax.swing.JPanel titlePanel;
private javax.swing.JPanel captionPanel;
private javax.swing.JPanel contentPanel;
@@ -57,19 +57,23 @@
public void actionPerformed(ActionEvent arg0) {
super.actionPerformed(arg0);
- if (arg0.getSource() == editContentInHtmlBtn) {
+ if (arg0.getSource() == editCaptionInHtmlBtn) {
editTextFieldInHtmlEditor(captionTextField);
}
+
+ if (arg0.getSource() == editContentInHtmlBtn) {
+ editTextFieldInHtmlEditor(contentEditorPane);
+ }
}
private void initComponents() {
setTitle("Propertiests...");
titlePanel = new javax.swing.JPanel();
- titleLabel = new javax.swing.JLabel();
titleTextField = new javax.swing.JTextField();
captionPanel = new javax.swing.JPanel();
captionTextField = new javax.swing.JTextField();
sameAsTitleCheckbox = new javax.swing.JCheckBox();
+ editCaptionInHtmlBtn = new javax.swing.JButton();
editContentInHtmlBtn = new javax.swing.JButton();
contentPanel = new javax.swing.JPanel();
jScrollPane1 = new javax.swing.JScrollPane();
@@ -77,15 +81,19 @@
okButton = new javax.swing.JButton();
cancelButton = new javax.swing.JButton();
+ editCaptionInHtmlBtn.addActionListener(this);
editContentInHtmlBtn.addActionListener(this);
okButton.addActionListener(this);
cancelButton.addActionListener(this);
sameAsTitleCheckbox.addChangeListener(this);
+
+ editContentInHtmlBtn.setText("HTML Editor");
+ setResizable(false);
+
setDefaultCloseOperation(javax.swing.WindowConstants.HIDE_ON_CLOSE);
titlePanel.setBorder(javax.swing.BorderFactory
.createTitledBorder("Title"));
- titleLabel.setText("Title");
javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(
titlePanel);
@@ -93,31 +101,22 @@
jPanel1Layout.setHorizontalGroup(jPanel1Layout.createParallelGroup(
javax.swing.GroupLayout.Alignment.LEADING).addComponent(
titleTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 412,
- Short.MAX_VALUE).addGroup(
- jPanel1Layout.createSequentialGroup().addComponent(titleLabel)
- .addContainerGap()));
- jPanel1Layout
- .setVerticalGroup(jPanel1Layout
- .createParallelGroup(
- javax.swing.GroupLayout.Alignment.LEADING)
- .addGroup(
- jPanel1Layout
- .createSequentialGroup()
- .addComponent(titleLabel)
- .addPreferredGap(
- javax.swing.LayoutStyle.ComponentPlacement.RELATED)
- .addComponent(
- titleTextField,
- javax.swing.GroupLayout.PREFERRED_SIZE,
- javax.swing.GroupLayout.DEFAULT_SIZE,
- javax.swing.GroupLayout.PREFERRED_SIZE)));
+ Short.MAX_VALUE));
+ jPanel1Layout.setVerticalGroup(jPanel1Layout.createParallelGroup(
+ javax.swing.GroupLayout.Alignment.LEADING).addGroup(
+ jPanel1Layout.createSequentialGroup().addPreferredGap(
+ javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addComponent(titleTextField,
+ javax.swing.GroupLayout.PREFERRED_SIZE,
+ javax.swing.GroupLayout.DEFAULT_SIZE,
+ javax.swing.GroupLayout.PREFERRED_SIZE)));
captionPanel.setBorder(javax.swing.BorderFactory
.createTitledBorder("Caption"));
sameAsTitleCheckbox.setText("Same as title");
- editContentInHtmlBtn.setText("...");
+ editCaptionInHtmlBtn.setText("...");
javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(
captionPanel);
@@ -132,7 +131,7 @@
captionTextField, javax.swing.GroupLayout.DEFAULT_SIZE,
361, Short.MAX_VALUE).addPreferredGap(
javax.swing.LayoutStyle.ComponentPlacement.RELATED)
- .addComponent(editContentInHtmlBtn, 30, 30, 30)));
+ .addComponent(editCaptionInHtmlBtn, 30, 30, 30)));
jPanel2Layout
.setVerticalGroup(jPanel2Layout
.createParallelGroup(
@@ -151,7 +150,7 @@
.createParallelGroup(
javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(
- editContentInHtmlBtn,
+ editCaptionInHtmlBtn,
20, 20, 20)
.addComponent(
captionTextField,
@@ -167,13 +166,27 @@
javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(
contentPanel);
contentPanel.setLayout(jPanel3Layout);
- jPanel3Layout.setHorizontalGroup(jPanel3Layout.createParallelGroup(
- javax.swing.GroupLayout.Alignment.LEADING).addComponent(
- jScrollPane1));
- jPanel3Layout.setVerticalGroup(jPanel3Layout.createParallelGroup(
- javax.swing.GroupLayout.Alignment.LEADING).addComponent(
- jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 174,
- javax.swing.GroupLayout.PREFERRED_SIZE));
+ jPanel3Layout.setHorizontalGroup(
+ jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup()
+ .addContainerGap()
+ .addComponent(editContentInHtmlBtn))
+ .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 486, Short.MAX_VALUE)
+ );
+ jPanel3Layout.setVerticalGroup(
+ jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup()
+ .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 145, Short.MAX_VALUE)
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addComponent(editContentInHtmlBtn, 20, 20, 20))
+ );
+// jPanel3Layout.setHorizontalGroup(jPanel3Layout.createParallelGroup(
+// javax.swing.GroupLayout.Alignment.LEADING).addComponent(
+// jScrollPane1));
+// jPanel3Layout.setVerticalGroup(jPanel3Layout.createParallelGroup(
+// javax.swing.GroupLayout.Alignment.LEADING).addComponent(
+// jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 174,
+// javax.swing.GroupLayout.PREFERRED_SIZE));
okButton.setText("Ok");
@@ -194,11 +207,6 @@
layout
.createParallelGroup(
javax.swing.GroupLayout.Alignment.LEADING)
- .addComponent(
- contentPanel,
- javax.swing.GroupLayout.DEFAULT_SIZE,
- javax.swing.GroupLayout.DEFAULT_SIZE,
- Short.MAX_VALUE)
.addGroup(
layout
.createSequentialGroup()
@@ -216,16 +224,20 @@
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE)
+ .addComponent(
+ contentPanel,
+ javax.swing.GroupLayout.DEFAULT_SIZE,
+ javax.swing.GroupLayout.DEFAULT_SIZE,
+ Short.MAX_VALUE)
.addGroup(
javax.swing.GroupLayout.Alignment.TRAILING,
layout
.createSequentialGroup()
- .addComponent(
- cancelButton)
+ .addComponent(cancelButton, 80, 80, 80)
.addPreferredGap(
javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(
- okButton)
+ okButton, 80, 80, 80)
.addPreferredGap(
javax.swing.LayoutStyle.ComponentPlacement.RELATED)))
.addContainerGap()))));
@@ -262,9 +274,8 @@
layout
.createParallelGroup(
javax.swing.GroupLayout.Alignment.BASELINE)
- .addComponent(
- cancelButton)
- .addComponent(okButton))
+ .addComponent(cancelButton, 20, 20, 20)
+ .addComponent(okButton, 20, 20, 20))
.addContainerGap()));
pack();
@@ -289,16 +300,16 @@
LectureModel model = new LectureModel();
String title = manifestItem.getTitle();
- String caption = ((LectureData) model
- .getItemData(manifestItem)).getCaption();
-
+ String caption = ((LectureData) model.getItemData(manifestItem))
+ .getCaption();
+
dlg.sameAsTitleCheckbox.setSelected(title.equals(caption));
dlg.titleTextField.setText(title);
dlg.titleTextField.selectAll();
dlg.captionTextField.setText(caption);
-
+
dlg.contentEditorPane.setText(((LectureData) model
.getItemData(manifestItem)).getContent());
}
Modified: WebEditor/src/edu/lnu/FireFly/WebEditor/GUI/Dialogs/PropertyDlg.java
===================================================================
--- WebEditor/src/edu/lnu/FireFly/WebEditor/GUI/Dialogs/PropertyDlg.java 2008-05-08 20:11:53 UTC (rev 106)
+++ WebEditor/src/edu/lnu/FireFly/WebEditor/GUI/Dialogs/PropertyDlg.java 2008-05-08 20:56:59 UTC (rev 107)
@@ -4,7 +4,7 @@
import java.awt.event.ActionListener;
import javax.swing.JDialog;
-import javax.swing.JTextField;
+import javax.swing.text.JTextComponent;
import edu.lnu.FireFly.FFManifest.TreeItem;
import edu.lnu.FireFly.WebEditor.WebEditor;
@@ -15,8 +15,8 @@
*/
private static final long serialVersionUID = -6002603750731392120L;
- protected void editTextFieldInHtmlEditor(JTextField captionTextField2) {
- WebEditor.instance.htmlEdit(captionTextField2, this);
+ protected void editTextFieldInHtmlEditor(JTextComponent textComponent) {
+ WebEditor.instance.htmlEdit(textComponent, this);
}
@Override
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <se...@us...> - 2008-05-08 19:14:25
|
Revision: 105
http://acmcontester.svn.sourceforge.net/acmcontester/?rev=105&view=rev
Author: sem62
Date: 2008-05-08 12:14:26 -0700 (Thu, 08 May 2008)
Log Message:
-----------
Lock property dialog while editing in WYSIWYG editor.
Modified Paths:
--------------
WebEditor/src/edu/lnu/FireFly/WebEditor/AppletWithWYSIWYGEditor.java
Modified: WebEditor/src/edu/lnu/FireFly/WebEditor/AppletWithWYSIWYGEditor.java
===================================================================
--- WebEditor/src/edu/lnu/FireFly/WebEditor/AppletWithWYSIWYGEditor.java 2008-05-08 19:02:32 UTC (rev 104)
+++ WebEditor/src/edu/lnu/FireFly/WebEditor/AppletWithWYSIWYGEditor.java 2008-05-08 19:14:26 UTC (rev 105)
@@ -8,6 +8,7 @@
public class AppletWithWYSIWYGEditor extends AppletWithApiHandle{
private boolean htmlEditing = false;
private JTextField textField = null;
+ private PropertyDlg editingDlg = null;
public void htmlEdit(JTextField captionTextField2, PropertyDlg dlg) {
JSObject win = JSObject.getWindow(this);
@@ -18,7 +19,9 @@
htmlEditing = true;
textField = captionTextField2;
+ editingDlg = dlg;
+ editingDlg.setEnabled(false);
win.call("showEditor", params);
}
@@ -33,6 +36,7 @@
textField.setText(newHTML);
htmlEditing = false;
+ editingDlg.setEnabled(true);
}
/**
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <se...@us...> - 2008-05-08 19:02:54
|
Revision: 104
http://acmcontester.svn.sourceforge.net/acmcontester/?rev=104&view=rev
Author: sem62
Date: 2008-05-08 12:02:32 -0700 (Thu, 08 May 2008)
Log Message:
-----------
Inserting already existing text into WYSIWYG editor at opening.
Modified Paths:
--------------
WebEditor/resources/HTMLedit.php
WebEditor/resources/HTMLeditor.js
WebEditor/resources/api.js
WebEditor/src/edu/lnu/FireFly/WebEditor/WebEditor.java
Added Paths:
-----------
WebEditor/src/edu/lnu/FireFly/WebEditor/AppletWithWYSIWYGEditor.java
Modified: WebEditor/resources/HTMLedit.php
===================================================================
--- WebEditor/resources/HTMLedit.php 2008-05-08 17:25:04 UTC (rev 103)
+++ WebEditor/resources/HTMLedit.php 2008-05-08 19:02:32 UTC (rev 104)
@@ -6,20 +6,28 @@
var s=document.getElementById("spaw_edit_field").value;
opener.document.webeditor.setEditedHTML(s);
close();
+ return false;
}
</script>
</head>
<body>
-
+<form name='editFrm' onSubmit='javascript:save();'>
<?
include("spaw2/spaw.inc.php");
-$spaw = new SpawEditor('spaw_edit_field');
+$spaw = new SpawEditor('spaw_edit_field', "123");
$spaw->show();
?>
-<input type='button' value='save' onClick='javascript:save();'>
+<input type='submit' value='save' onClick='javascript:save();'>
+</form>
+ <script type="text/javascript">
+ var s = opener.document.webeditor.getEditedHTML();
+ document.getElementById("spaw_edit_field").value = s;
+ alert(s, false);
+
+ </script>
</body>
</html>
\ No newline at end of file
Modified: WebEditor/resources/HTMLeditor.js
===================================================================
--- WebEditor/resources/HTMLeditor.js 2008-05-08 17:25:04 UTC (rev 103)
+++ WebEditor/resources/HTMLeditor.js 2008-05-08 19:02:32 UTC (rev 104)
@@ -1,3 +1,3 @@
-function showEditor(){
+function showEditor(currentText){
myWin=window.open("HTMLedit.php", "wind1", "width=800,height=350");
}
Modified: WebEditor/resources/api.js
===================================================================
--- WebEditor/resources/api.js 2008-05-08 17:25:04 UTC (rev 103)
+++ WebEditor/resources/api.js 2008-05-08 19:02:32 UTC (rev 104)
@@ -1,24 +1,24 @@
function Initialize(param)
{
- return document.player.Initialize(param);
+ return document.webeditor.Initialize(param);
}
function Terminate(param)
{
- return document.player.Terminate(param);
+ return document.webeditor.Terminate(param);
}
function SetValue(name,value)
{
- return document.player.SetValue(name, value);
+ return document.webeditor.SetValue(name, value);
}
function GetValue(name)
{
- return document.player.GetValue(name);
+ return document.webeditor.GetValue(name);
}
function Commit(param)
{
- var returnVal = document.player.Commit(param);
+ var returnVal = document.webeditor.Commit(param);
var status = GetValue("cmi.core.lesson_status");
if (status=="passed" || status=="failed")
navigation.location.reload();
@@ -26,15 +26,15 @@
}
function GetLastError()
{
- return document.player.GetLastError();
+ return document.webeditor.GetLastError();
}
function GetErrorString(code)
{
- return document.player.GetErrorString(code);
+ return document.webeditor.GetErrorString(code);
}
function GetDiagnostic(param)
{
- return document.player.GetDiagnostic(param);
+ return document.webeditor.GetDiagnostic(param);
}
function GetVersion()
{
Added: WebEditor/src/edu/lnu/FireFly/WebEditor/AppletWithWYSIWYGEditor.java
===================================================================
--- WebEditor/src/edu/lnu/FireFly/WebEditor/AppletWithWYSIWYGEditor.java (rev 0)
+++ WebEditor/src/edu/lnu/FireFly/WebEditor/AppletWithWYSIWYGEditor.java 2008-05-08 19:02:32 UTC (rev 104)
@@ -0,0 +1,46 @@
+package edu.lnu.FireFly.WebEditor;
+
+import javax.swing.JTextField;
+
+import netscape.javascript.JSObject;
+import edu.lnu.FireFly.WebEditor.GUI.Dialogs.PropertyDlg;
+
+public class AppletWithWYSIWYGEditor extends AppletWithApiHandle{
+ private boolean htmlEditing = false;
+ private JTextField textField = null;
+
+ public void htmlEdit(JTextField captionTextField2, PropertyDlg dlg) {
+ JSObject win = JSObject.getWindow(this);
+ Object[] params = new String[1];
+ params[0] = captionTextField2.getText();
+
+ dlg.setModal(false);
+
+ htmlEditing = true;
+ textField = captionTextField2;
+
+ win.call("showEditor", params);
+ }
+
+ public String getEditedHTML(){
+ return textField.getText();
+ }
+
+ public void setEditedHTML(String newHTML){
+ if (!htmlEditing){
+ return;
+ }
+ textField.setText(newHTML);
+
+ htmlEditing = false;
+ }
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = 1L;
+
+ public boolean isHtmlEditing() {
+ return htmlEditing;
+ }
+}
Modified: WebEditor/src/edu/lnu/FireFly/WebEditor/WebEditor.java
===================================================================
--- WebEditor/src/edu/lnu/FireFly/WebEditor/WebEditor.java 2008-05-08 17:25:04 UTC (rev 103)
+++ WebEditor/src/edu/lnu/FireFly/WebEditor/WebEditor.java 2008-05-08 19:02:32 UTC (rev 104)
@@ -8,12 +8,10 @@
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;
import javax.swing.JScrollPane;
-import javax.swing.JTextField;
import javax.swing.JTree;
import javax.swing.event.TreeSelectionEvent;
import javax.swing.event.TreeSelectionListener;
-import netscape.javascript.JSObject;
import edu.lnu.FireFly.FFManifest.Manifest;
import edu.lnu.FireFly.FFManifest.TreeItem;
import edu.lnu.FireFly.FFManifest.item.Item;
@@ -24,7 +22,6 @@
import edu.lnu.FireFly.WebEditor.Data.SummaryPageManager;
import edu.lnu.FireFly.WebEditor.GUI.CourseTreePopupMenu;
import edu.lnu.FireFly.WebEditor.GUI.TreeDataModel;
-import edu.lnu.FireFly.WebEditor.GUI.Dialogs.PropertyDlg;
import edu.lnu.FireFly.WebEditor.ItemModels.ChapterModel;
import edu.lnu.FireFly.WebEditor.ItemModels.ItemModels;
import edu.lnu.FireFly.WebEditor.ItemModels.OrganizationModel;
@@ -33,7 +30,7 @@
import edu.lnu.FireFly.WebEditor.ItemModels.SummaryPageModel.SummaryPageModel;
import edu.lnu.FireFly.WebEditor.WSClients.WebEditorServiceClient;
-public class WebEditor extends AppletWithApiHandle implements ActionListener,
+public class WebEditor extends AppletWithWYSIWYGEditor implements ActionListener,
TreeSelectionListener {
/**
@@ -190,29 +187,4 @@
}
}
}
-
- private boolean htmlEditing = false;
- private JTextField textField = null;
-
- public void htmlEdit(JTextField captionTextField2, PropertyDlg dlg) {
- JSObject win = JSObject.getWindow(instance);
- Object[] params = new String[0];
-
- dlg.setModal(false);
-
- htmlEditing = true;
- textField = captionTextField2;
-
- win.call("showEditor", params);
- }
-
- public void setEditedHTML(String newHTML){
- if (!htmlEditing){
- return;
- }
-
- textField.setText(newHTML);
-
- htmlEditing = false;
- }
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <or...@us...> - 2008-05-08 17:25:29
|
Revision: 103
http://acmcontester.svn.sourceforge.net/acmcontester/?rev=103&view=rev
Author: oracle_
Date: 2008-05-08 10:25:04 -0700 (Thu, 08 May 2008)
Log Message:
-----------
Little bug fixed
Modified Paths:
--------------
ACMServer/branches/Version_2/Server/TestingUnit.pas
Added Paths:
-----------
ACMServer/branches/Version_2/changelog.txt
Modified: ACMServer/branches/Version_2/Server/TestingUnit.pas
===================================================================
--- ACMServer/branches/Version_2/Server/TestingUnit.pas 2008-05-07 22:19:10 UTC (rev 102)
+++ ACMServer/branches/Version_2/Server/TestingUnit.pas 2008-05-08 17:25:04 UTC (rev 103)
@@ -9,6 +9,7 @@
SleepConst = 200;
WaitConst = 10;
TerProcTimeOut = 10000;
+ RealTimeConst = 25;
R_CompilationError = 1;
R_RuntimeError = 2;
@@ -168,8 +169,15 @@
if not WasOK then
begin
- Res.ResInt:=R_InTimeError;
- Res.ResStr:='Cant create process with exe file="'+ExeFile+'"';
+ if ((GetLastError()=193) or (GetLastError()=1455)) then
+ begin
+ Res.ResInt:=R_RuntimeError;
+ Res.ResStr:='Extra large array error';
+ end else
+ begin
+ Res.ResInt:=R_InTimeError;
+ Res.ResStr:='Cant create process with exe file="'+ExeFile+'"';
+ end;
end
else begin
starttime:=GetTickCount();
@@ -215,7 +223,7 @@
break;
end;
- if GetTickCount-starttime>TimeLimit*100 then
+ if GetTickCount-starttime>TimeLimit*RealTimeConst then
begin
Res.ResInt:=R_TimeLimit;
Res.ResStr:='Time Limit (due to realtime limit)';
Added: ACMServer/branches/Version_2/changelog.txt
===================================================================
--- ACMServer/branches/Version_2/changelog.txt (rev 0)
+++ ACMServer/branches/Version_2/changelog.txt 2008-05-08 17:25:04 UTC (rev 103)
@@ -0,0 +1,2 @@
+20:20 08.05.2008 Oracle
+ - \xD2\xE5\xEF\xE5\xF0 \xEF\xF0\xEE\xE3\xF0\xE0\xEC\xE8 \xE7 \xE2\xE5\xEB\xE8\xF7\xE5\xE7\xED\xE8\xEC\xE8 \xEC\xE0\xF1\xE8\xE2\xE0\xEC\xE8 \xEA\xEE\xF0\xE5\xEA\xF2\xED\xEE \xF2\xE5\xF1\xF2\xF3\xFE\xF2\xFC\xF1\xFF - \xE2\xE8\xE2\xEE\xE4\xE8\xF2\xFC\xF1\xFF Runtime error. \xCA\xEE\xED\xF1\xF2\xE0\xED\xF2\xF3 \xE4\xEB\xFF \xF0\xE5\xE0\xEB\xFC\xED\xEE\xE3\xEE \xF7\xE0\xF1\xF3 \xF0\xEE\xE1\xEE\xF2\xE8 \xE7\xEC\xE5\xED\xF8\xE5\xED\xEE \xE4\xEE 25.
\ 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-07 22:19:04
|
Revision: 102
http://acmcontester.svn.sourceforge.net/acmcontester/?rev=102&view=rev
Author: sem62
Date: 2008-05-07 15:19:10 -0700 (Wed, 07 May 2008)
Log Message:
-----------
Added spaw2 wysiwyg editor to Lecture caption edit.
Modified Paths:
--------------
WebEditor/resources/index.html
WebEditor/src/edu/lnu/FireFly/WebEditor/GUI/Dialogs/LecturePropertiestsDlg.java
WebEditor/src/edu/lnu/FireFly/WebEditor/GUI/Dialogs/PropertyDlg.java
WebEditor/src/edu/lnu/FireFly/WebEditor/GUI/Dialogs/SimpleQuestionPropertiestsDlg.java
WebEditor/src/edu/lnu/FireFly/WebEditor/WebEditor.java
Added Paths:
-----------
WebEditor/resources/HTMLedit.php
WebEditor/resources/HTMLeditor.js
WebEditor/resources/spaw2/
WebEditor/resources/spaw2/class/
WebEditor/resources/spaw2/class/config.class.php
WebEditor/resources/spaw2/class/editor.class.php
WebEditor/resources/spaw2/class/lang.class.php
WebEditor/resources/spaw2/class/output.class.php
WebEditor/resources/spaw2/class/theme.class.php
WebEditor/resources/spaw2/class/toolbar.class.php
WebEditor/resources/spaw2/class/util.class.php
WebEditor/resources/spaw2/config/
WebEditor/resources/spaw2/config/config.php
WebEditor/resources/spaw2/demo/
WebEditor/resources/spaw2/demo/demo.php
WebEditor/resources/spaw2/dialogs/
WebEditor/resources/spaw2/dialogs/dialog.php
WebEditor/resources/spaw2/dialogs/img/
WebEditor/resources/spaw2/dialogs/img/spacer.gif
WebEditor/resources/spaw2/docs/
WebEditor/resources/spaw2/docs/changelog.txt
WebEditor/resources/spaw2/docs/documentation/
WebEditor/resources/spaw2/docs/documentation/documentation.css
WebEditor/resources/spaw2/docs/documentation/integrators.html
WebEditor/resources/spaw2/docs/documentation/plugins.html
WebEditor/resources/spaw2/docs/license.txt
WebEditor/resources/spaw2/docs/readme.txt
WebEditor/resources/spaw2/docs/releasenotes.txt
WebEditor/resources/spaw2/empty/
WebEditor/resources/spaw2/empty/empty.html
WebEditor/resources/spaw2/img/
WebEditor/resources/spaw2/img/flash.gif
WebEditor/resources/spaw2/img/spacer100.gif
WebEditor/resources/spaw2/js/
WebEditor/resources/spaw2/js/common/
WebEditor/resources/spaw2/js/common/color.js
WebEditor/resources/spaw2/js/common/contextmenu.js
WebEditor/resources/spaw2/js/common/editor.js
WebEditor/resources/spaw2/js/common/editorpage.js
WebEditor/resources/spaw2/js/common/engine.js
WebEditor/resources/spaw2/js/common/entities.js
WebEditor/resources/spaw2/js/common/events.js
WebEditor/resources/spaw2/js/common/tab.js
WebEditor/resources/spaw2/js/common/toolbar.js
WebEditor/resources/spaw2/js/common/utils.js
WebEditor/resources/spaw2/js/gecko/
WebEditor/resources/spaw2/js/gecko/editor.js
WebEditor/resources/spaw2/js/ie/
WebEditor/resources/spaw2/js/ie/editor.js
WebEditor/resources/spaw2/js/opera/
WebEditor/resources/spaw2/js/opera/editor.js
WebEditor/resources/spaw2/js/spaw.js.php
WebEditor/resources/spaw2/plugins/
WebEditor/resources/spaw2/plugins/core/
WebEditor/resources/spaw2/plugins/core/dialogs/
WebEditor/resources/spaw2/plugins/core/dialogs/colorpicker.inc.php
WebEditor/resources/spaw2/plugins/core/dialogs/colorpicker.js
WebEditor/resources/spaw2/plugins/core/dialogs/flash_prop.inc.php
WebEditor/resources/spaw2/plugins/core/dialogs/flash_prop.js
WebEditor/resources/spaw2/plugins/core/dialogs/hyperlink.inc.php
WebEditor/resources/spaw2/plugins/core/dialogs/hyperlink.js
WebEditor/resources/spaw2/plugins/core/dialogs/image_prop.inc.php
WebEditor/resources/spaw2/plugins/core/dialogs/image_prop.js
WebEditor/resources/spaw2/plugins/core/dialogs/img/
WebEditor/resources/spaw2/plugins/core/dialogs/img/crosshair.gif
WebEditor/resources/spaw2/plugins/core/dialogs/img/huesaturation.jpg
WebEditor/resources/spaw2/plugins/core/dialogs/img/leftarrow.gif
WebEditor/resources/spaw2/plugins/core/dialogs/img/spacer.gif
WebEditor/resources/spaw2/plugins/core/dialogs/table_cell_prop.inc.php
WebEditor/resources/spaw2/plugins/core/dialogs/table_cell_prop.js
WebEditor/resources/spaw2/plugins/core/dialogs/table_prop.inc.php
WebEditor/resources/spaw2/plugins/core/dialogs/table_prop.js
WebEditor/resources/spaw2/plugins/core/js/
WebEditor/resources/spaw2/plugins/core/js/common/
WebEditor/resources/spaw2/plugins/core/js/common/format.js
WebEditor/resources/spaw2/plugins/core/js/common/general.js
WebEditor/resources/spaw2/plugins/core/js/common/insert.js
WebEditor/resources/spaw2/plugins/core/js/common/mode.js
WebEditor/resources/spaw2/plugins/core/js/common/table.js
WebEditor/resources/spaw2/plugins/core/js/common/tools.js
WebEditor/resources/spaw2/plugins/core/js/gecko/
WebEditor/resources/spaw2/plugins/core/js/gecko/format_gecko.js
WebEditor/resources/spaw2/plugins/core/js/ie/
WebEditor/resources/spaw2/plugins/core/js/ie/format_ie.js
WebEditor/resources/spaw2/plugins/core/js/opera/
WebEditor/resources/spaw2/plugins/core/js/opera/format_opera.js
WebEditor/resources/spaw2/plugins/core/lib/
WebEditor/resources/spaw2/plugins/core/lib/lang/
WebEditor/resources/spaw2/plugins/core/lib/lang/ar.lang.inc.php
WebEditor/resources/spaw2/plugins/core/lib/lang/az.lang.inc.php
WebEditor/resources/spaw2/plugins/core/lib/lang/bg.lang.inc.php
WebEditor/resources/spaw2/plugins/core/lib/lang/br.lang.inc.php
WebEditor/resources/spaw2/plugins/core/lib/lang/ca.lang.inc.php
WebEditor/resources/spaw2/plugins/core/lib/lang/cz.lang.inc.php
WebEditor/resources/spaw2/plugins/core/lib/lang/de.lang.inc.php
WebEditor/resources/spaw2/plugins/core/lib/lang/dk.lang.inc.php
WebEditor/resources/spaw2/plugins/core/lib/lang/en.lang.inc.php
WebEditor/resources/spaw2/plugins/core/lib/lang/es.lang.inc.php
WebEditor/resources/spaw2/plugins/core/lib/lang/et.lang.inc.php
WebEditor/resources/spaw2/plugins/core/lib/lang/fi.lang.inc.php
WebEditor/resources/spaw2/plugins/core/lib/lang/fr.lang.inc.php
WebEditor/resources/spaw2/plugins/core/lib/lang/gr.lang.inc.php
WebEditor/resources/spaw2/plugins/core/lib/lang/gz.lang.inc.php
WebEditor/resources/spaw2/plugins/core/lib/lang/he.lang.inc.php
WebEditor/resources/spaw2/plugins/core/lib/lang/hr.lang.inc.php
WebEditor/resources/spaw2/plugins/core/lib/lang/hu.lang.inc.php
WebEditor/resources/spaw2/plugins/core/lib/lang/it.lang.inc.php
WebEditor/resources/spaw2/plugins/core/lib/lang/ja.lang.inc.php
WebEditor/resources/spaw2/plugins/core/lib/lang/lt.lang.inc.php
WebEditor/resources/spaw2/plugins/core/lib/lang/lv.lang.inc.php
WebEditor/resources/spaw2/plugins/core/lib/lang/nl.lang.inc.php
WebEditor/resources/spaw2/plugins/core/lib/lang/no.lang.inc.php
WebEditor/resources/spaw2/plugins/core/lib/lang/pl.lang.inc.php
WebEditor/resources/spaw2/plugins/core/lib/lang/pt.lang.inc.php
WebEditor/resources/spaw2/plugins/core/lib/lang/ru.lang.inc.php
WebEditor/resources/spaw2/plugins/core/lib/lang/se.lang.inc.php
WebEditor/resources/spaw2/plugins/core/lib/lang/si.lang.inc.php
WebEditor/resources/spaw2/plugins/core/lib/lang/sk.lang.inc.php
WebEditor/resources/spaw2/plugins/core/lib/lang/sr.lang.inc.php
WebEditor/resources/spaw2/plugins/core/lib/lang/tr.lang.inc.php
WebEditor/resources/spaw2/plugins/core/lib/lang/uk.lang.inc.php
WebEditor/resources/spaw2/plugins/core/lib/lang/vn.lang.inc.php
WebEditor/resources/spaw2/plugins/core/lib/lang/zh-big5.lang.inc.php
WebEditor/resources/spaw2/plugins/core/lib/lang/zh-gb2312.lang.inc.php
WebEditor/resources/spaw2/plugins/core/lib/theme/
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/config/
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/config/theme.config.php
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/css/
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/css/dialog.css
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/css/theme.css
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/atab_bg.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/atab_left.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/atab_right.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/bg_pattern.jpg
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/btbg.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/checkmark.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/graydot.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/sizing_grip.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/spacer.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tab_bg.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tab_left.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tab_right.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb__empty.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb__empty_down.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb__empty_off.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb__empty_over.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb__plugin.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb__plugin_down.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb__plugin_off.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb__plugin_over.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_baseline.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_baseline_down.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_baseline_off.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_baseline_over.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_bg_color.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_bg_color_down.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_bg_color_off.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_bg_color_over.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_bold.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_bold_down.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_bold_off.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_bold_over.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_bottom.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_bottom_down.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_bottom_off.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_bottom_over.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_cleanup.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_cleanup_down.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_cleanup_off.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_cleanup_over.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_colorpicker.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_colorpicker_down.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_colorpicker_off.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_colorpicker_over.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_copy.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_copy_down.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_copy_off.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_copy_over.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_cut.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_cut_down.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_cut_off.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_cut_over.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_delete.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_delete_down.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_delete_off.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_delete_over.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_design.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_design_down.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_design_off.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_design_over.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_flash_prop.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_flash_prop_down.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_flash_prop_off.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_flash_prop_over.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_fore_color.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_fore_color_down.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_fore_color_off.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_fore_color_over.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_html.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_html_down.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_html_off.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_html_over.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_hyperlink.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_hyperlink_down.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_hyperlink_off.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_hyperlink_over.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_image.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_image_down.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_image_map.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_image_map_down.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_image_map_off.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_image_map_over.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_image_off.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_image_over.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_image_popup.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_image_popup_down.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_image_popup_off.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_image_popup_over.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_image_prop.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_image_prop_down.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_image_prop_off.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_image_prop_over.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_indent.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_indent_down.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_indent_off.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_indent_over.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_inserthorizontalrule.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_inserthorizontalrule_down.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_inserthorizontalrule_off.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_inserthorizontalrule_over.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_insertorderedlist.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_insertorderedlist_down.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_insertorderedlist_off.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_insertorderedlist_over.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_insertunorderedlist.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_insertunorderedlist_down.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_insertunorderedlist_off.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_insertunorderedlist_over.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_internal_link.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_internal_link_down.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_internal_link_off.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_internal_link_over.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_italic.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_italic_down.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_italic_off.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_italic_over.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_justifycenter.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_justifycenter_down.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_justifycenter_off.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_justifycenter_over.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_justifyfull.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_justifyfull_down.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_justifyfull_off.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_justifyfull_over.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_justifyleft.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_justifyleft_down.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_justifyleft_off.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_justifyleft_over.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_justifyright.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_justifyright_down.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_justifyright_off.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_justifyright_over.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_middle.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_middle_down.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_middle_off.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_middle_over.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_new.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_new_down.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_new_off.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_new_over.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_outdent.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_outdent_down.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_outdent_off.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_outdent_over.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_page_prop.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_page_prop_down.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_page_prop_off.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_page_prop_over.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_paste.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_paste_down.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_paste_off.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_paste_over.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_preview.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_preview_down.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_preview_off.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_preview_over.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_redo.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_redo_down.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_redo_off.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_redo_over.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_save.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_save_all.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_save_all_down.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_save_all_off.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_save_all_over.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_save_down.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_save_off.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_save_over.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_separator.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_special_chars.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_special_chars_down.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_special_chars_off.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_special_chars_over.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_strikethrough.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_strikethrough_down.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_strikethrough_off.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_strikethrough_over.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_subscript.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_subscript_down.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_subscript_off.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_subscript_over.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_superscript.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_superscript_down.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_superscript_off.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_superscript_over.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_table_cell_merge_down.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_table_cell_merge_down_down.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_table_cell_merge_down_off.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_table_cell_merge_down_over.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_table_cell_merge_right.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_table_cell_merge_right_down.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_table_cell_merge_right_off.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_table_cell_merge_right_over.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_table_cell_prop.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_table_cell_prop_down.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_table_cell_prop_off.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_table_cell_prop_over.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_table_cell_split_horizontal.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_table_cell_split_horizontal_down.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_table_cell_split_horizontal_off.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_table_cell_split_horizontal_over.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_table_cell_split_vertical.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_table_cell_split_vertical_down.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_table_cell_split_vertical_off.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_table_cell_split_vertical_over.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_table_column_delete.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_table_column_delete_down.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_table_column_delete_off.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_table_column_delete_over.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_table_column_insert.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_table_column_insert_down.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_table_column_insert_off.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_table_column_insert_over.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_table_create.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_table_create_down.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_table_create_off.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_table_create_over.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_table_prop.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_table_prop_down.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_table_prop_off.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_table_prop_over.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_table_row_delete.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_table_row_delete_down.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_table_row_delete_off.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_table_row_delete_over.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_table_row_insert.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_table_row_insert_down.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_table_row_insert_off.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_table_row_insert_over.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_table_row_prop.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_table_row_prop_down.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_table_row_prop_off.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_table_row_prop_over.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_toggle_borders.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_toggle_borders_down.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_toggle_borders_off.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_toggle_borders_over.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_top.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_top_down.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_top_off.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_top_over.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_underline.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_underline_down.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_underline_off.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_underline_over.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_undo.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_undo_down.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_undo_off.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_undo_over.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_unlink.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_unlink_down.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_unlink_off.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/img/tb_unlink_over.gif
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/js/
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/js/common/
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/js/common/spaw2.js
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/templates/
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/templates/dialog_footer.tpl
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/templates/dialog_header.tpl
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/templates/editor.tpl
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/templates/editor_floating.tpl
WebEditor/resources/spaw2/plugins/core/lib/theme/spaw2/templates/toolbar_floating.tpl
WebEditor/resources/spaw2/plugins/core/lib/toolbars/
WebEditor/resources/spaw2/plugins/core/lib/toolbars/edit.toolbar.php
WebEditor/resources/spaw2/plugins/core/lib/toolbars/font.toolbar.php
WebEditor/resources/spaw2/plugins/core/lib/toolbars/format.toolbar.php
WebEditor/resources/spaw2/plugins/core/lib/toolbars/format_mini.toolbar.php
WebEditor/resources/spaw2/plugins/core/lib/toolbars/insert.toolbar.php
WebEditor/resources/spaw2/plugins/core/lib/toolbars/mode_strip.toolbar.php
WebEditor/resources/spaw2/plugins/core/lib/toolbars/style.toolbar.php
WebEditor/resources/spaw2/plugins/core/lib/toolbars/table.toolbar.php
WebEditor/resources/spaw2/plugins/core/lib/toolbars/tools.toolbar.php
WebEditor/resources/spaw2/plugins/spawfm/
WebEditor/resources/spaw2/plugins/spawfm/class/
WebEditor/resources/spaw2/plugins/spawfm/class/spawfm.class.php
WebEditor/resources/spaw2/plugins/spawfm/config/
WebEditor/resources/spaw2/plugins/spawfm/config/config.php
WebEditor/resources/spaw2/plugins/spawfm/dialogs/
WebEditor/resources/spaw2/plugins/spawfm/dialogs/spawfm.inc.php
WebEditor/resources/spaw2/plugins/spawfm/dialogs/spawfm.js
WebEditor/resources/spaw2/plugins/spawfm/img/
WebEditor/resources/spaw2/plugins/spawfm/img/btn_new_folder.gif
WebEditor/resources/spaw2/plugins/spawfm/img/btn_new_folder_off.gif
WebEditor/resources/spaw2/plugins/spawfm/img/btn_up.gif
WebEditor/resources/spaw2/plugins/spawfm/img/btn_up_off.gif
WebEditor/resources/spaw2/plugins/spawfm/img/ico_default.gif
WebEditor/resources/spaw2/plugins/spawfm/img/ico_default_big.gif
WebEditor/resources/spaw2/plugins/spawfm/img/ico_flash.gif
WebEditor/resources/spaw2/plugins/spawfm/img/ico_flash_big.gif
WebEditor/resources/spaw2/plugins/spawfm/img/ico_folder.gif
WebEditor/resources/spaw2/plugins/spawfm/img/ico_image.gif
WebEditor/resources/spaw2/plugins/spawfm/img/ico_image_big.gif
WebEditor/resources/spaw2/plugins/spawfm/lib/
WebEditor/resources/spaw2/plugins/spawfm/lib/filelist0.css
WebEditor/resources/spaw2/plugins/spawfm/lib/filelist1.css
WebEditor/resources/spaw2/plugins/spawfm/lib/lang/
WebEditor/resources/spaw2/plugins/spawfm/lib/lang/en.lang.inc.php
WebEditor/resources/spaw2/plugins/spawfm/lib/lang/hu.lang.inc.php
WebEditor/resources/spaw2/plugins/spawfm/lib/lang/lt.lang.inc.php
WebEditor/resources/spaw2/plugins/spawfm/lib/lang/nl.lang.inc.php
WebEditor/resources/spaw2/plugins/spawfm/lib/lang/ru.lang.inc.php
WebEditor/resources/spaw2/plugins/spawfm/lib/theme/
WebEditor/resources/spaw2/plugins/spawfm/lib/theme/spaw2/
WebEditor/resources/spaw2/plugins/spawfm/lib/theme/spaw2/img/
WebEditor/resources/spaw2/plugins/spawfm/lib/theme/spaw2/img/btn_view_details.gif
WebEditor/resources/spaw2/plugins/spawfm/lib/theme/spaw2/img/btn_view_list.gif
WebEditor/resources/spaw2/plugins/spawfm/lib/theme/spaw2/img/btn_view_thumbs.gif
WebEditor/resources/spaw2/spacer.gif
WebEditor/resources/spaw2/spaw.inc.php
WebEditor/resources/spaw2/spaw_control.class.php
WebEditor/resources/spaw2/uploads/
WebEditor/resources/spaw2/uploads/files/
WebEditor/resources/spaw2/uploads/files/180px-UniwersytetJanaKazimierzaLw?\208?\147_w1.jpg
WebEditor/resources/spaw2/uploads/files/banner.GIF
WebEditor/resources/spaw2/uploads/files/lnu.doc
WebEditor/resources/spaw2/wysiwyg.css
WebEditor/template/ChapterModel.conf
WebEditor/template/OrganizationModel.conf
Added: WebEditor/resources/HTMLedit.php
===================================================================
--- WebEditor/resources/HTMLedit.php (rev 0)
+++ WebEditor/resources/HTMLedit.php 2008-05-07 22:19:10 UTC (rev 102)
@@ -0,0 +1,25 @@
+<html>
+<head>
+ <script type="text/javascript">
+
+ function save(){
+ var s=document.getElementById("spaw_edit_field").value;
+ opener.document.webeditor.setEditedHTML(s);
+ close();
+ }
+
+ </script>
+</head>
+<body>
+
+<?
+include("spaw2/spaw.inc.php");
+
+$spaw = new SpawEditor('spaw_edit_field');
+$spaw->show();
+?>
+
+<input type='button' value='save' onClick='javascript:save();'>
+
+</body>
+</html>
\ No newline at end of file
Added: WebEditor/resources/HTMLeditor.js
===================================================================
--- WebEditor/resources/HTMLeditor.js (rev 0)
+++ WebEditor/resources/HTMLeditor.js 2008-05-07 22:19:10 UTC (rev 102)
@@ -0,0 +1,3 @@
+function showEditor(){
+ myWin=window.open("HTMLedit.php", "wind1", "width=800,height=350");
+}
Modified: WebEditor/resources/index.html
===================================================================
--- WebEditor/resources/index.html 2008-05-07 19:24:22 UTC (rev 101)
+++ WebEditor/resources/index.html 2008-05-07 22:19:10 UTC (rev 102)
@@ -2,7 +2,7 @@
<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>
+ <script type="text/javascript" src="HTMLeditor.js"></script>
<style>
.left-corn {
@@ -85,7 +85,7 @@
</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 mayscript="" name="webeditor" 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/">
Added: WebEditor/resources/spaw2/class/config.class.php
===================================================================
--- WebEditor/resources/spaw2/class/config.class.php (rev 0)
+++ WebEditor/resources/spaw2/class/config.class.php 2008-05-07 22:19:10 UTC (rev 102)
@@ -0,0 +1,332 @@
+<?php
+/**
+ * SPAW Editor v.2 Config classes
+ *
+ * Configuration related classes
+ *
+ * @package spaw2
+ * @subpackage Configuration
+ * @author Alan Mendelevich <al...@so...>
+ * @copyright UAB Solmetra
+ */
+
+/**
+ * Specifies that value for the config item is not transfered to external parts of spaw
+ */
+define("SPAW_CFG_TRANSFER_NONE", 0);
+/**
+ * Specifies that value for the config item is transfered via JavaScript variables
+ */
+define("SPAW_CFG_TRANSFER_JS", 1);
+/**
+ * Specifies that value for the config item is appended to request url
+ */
+define("SPAW_CFG_TRANSFER_REQUEST", 2);
+/**
+ * Specifies that value for the config item is stored on the server
+ */
+define("SPAW_CFG_TRANSFER_SECURE", 4);
+
+/**
+ * Configuration item class
+ *
+ * Class defines single configuration item
+ * @package spaw2
+ * @subpackage Configuration
+ */
+class SpawConfigItem
+{
+ /**
+ * Sets config item values
+ * @param string $name Config item's name
+ * @param mixed $value Config item's value
+ * @param integer $tranfer_type The way item should be transfered to other parts of the editor (one of SPAW_CFG_TRANSFER_* constants)
+ * @return SpawConfigItem
+ */
+ function SpawConfigItem($name, $value, $transfer_type)
+ {
+ $this->name = $name;
+ $this->value = $value;
+ $this->transfer_type = $transfer_type;
+ }
+ /**
+ * item name
+ * @var string
+ */
+ var $name;
+ /**
+ * item value
+ * @var mixed
+ */
+ var $value;
+ /**
+ * the way item is transferred to dialogs, etc.
+ * Holds information on the prefered method to transfer this value to external
+ * of the editor like dialogs. Should be set to one (or several combined with OR)
+ * of SPAW_CFG_TRANFER_* constants.
+ * @var integer
+ */
+ var $transfer_type;
+}
+
+/**
+ * Configuration class
+ *
+ * Holds global (when accessed through class) SPAW configuration and
+ * instance configuration when insantiated
+ * @package spaw2
+ * @subpackage Configuration
+ */
+class SpawConfig
+{
+ /**
+ * array for instance config settings
+ * @access private
+ */
+ var $config;
+
+ /**
+ * Copies global SPAW configuration to instance
+ */
+ function SpawConfig()
+ {
+ // copy static config to this instance
+ $this->config = SpawConfig::configVar();
+ }
+
+ /**
+ * Workaround for "static" class variable under php4
+ * @access private
+ */
+ function &configVar()
+ {
+ static $config;
+
+ return $config;
+ }
+
+ /**
+ * Sets global config item
+ * @param string $name Config item's name
+ * @param mixed $value Config item's value
+ * @param integer $transfer_type Transfer type for the value (One or several of SPAW_CFG_TRANSFER_* constants). Default value - SPAW_CFG_TRANSFER_NONE
+ * @see SPAW_CFG_TRANSFER_NONE, SPAW_CFG_TRANSFER_JS, SPAW_CFG_TRANSFER_REQUEST, SPAW_CFG_TRANSFER_SECURE
+ * @static
+ */
+ function setStaticConfigItem($name, $value, $transfer_type=SPAW_CFG_TRANSFER_NONE)
+ {
+ $cfg = &SpawConfig::configVar();
+ $cfg[$name] = new SpawConfigItem($name, $value, $transfer_type);
+ }
+
+ /**
+ * Sets instance config item
+ * @param string $name Config item's name
+ * @param mixed $value Config item's value
+ * @param integer $transfer_type Transfer type for the value (One or several of SPAW_CFG_TRANSFER_* constants). Default value - SPAW_CFG_TRANSFER_NONE
+ * @see SPAW_CFG_TRANSFER_NONE, SPAW_CFG_TRANSFER_JS, SPAW_CFG_TRANSFER_REQUEST, SPAW_CFG_TRANSFER_SECURE
+ */
+ function setConfigItem($name, $value, $transfer_type=SPAW_CFG_TRANSFER_NONE)
+ {
+ $this->config[$name] = new SpawConfigItem($name, $value, $transfer_type);
+ }
+
+ /**
+ * Gets global config item
+ * @param string $name Config item name
+ * @returns SpawConfigItem
+ * @static
+ */
+ function getStaticConfigItem($name)
+ {
+ $cfg = &SpawConfig::configVar();
+ if (isset($cfg[$name]))
+ return $cfg[$name];
+ else
+ return NULL;
+ }
+
+ /**
+ * Gets instance config item
+ * @param string $name Config item name
+ * @returns SpawConfigItem
+ */
+ function getConfigItem($name)
+ {
+ $cfg = $this->config;
+ if (isset($cfg[$name]))
+ return $cfg[$name];
+ else
+ return NULL;
+ }
+
+ /**
+ * Sets global config item value
+ * @param string $name Config item name
+ * @param mixed $value Config item value
+ * @static
+ */
+ function setStaticConfigValue($name, $value)
+ {
+ $cfg_item = SpawConfig::getStaticConfigItem($name);
+ if ($cfg_item)
+ {
+ $cfg_item->value = $value;
+ SpawConfig::setStaticConfigItem($cfg_item->name, $cfg_item->value, $cfg_item->transfer_type);
+ }
+ }
+
+ /**
+ * Sets global value for the element of config item provided item's value is an array
+ * @param string $name Config item name
+ * @param mixed $index Array index
+ * @param mixed $value Element value
+ */
+ function setStaticConfigValueElement($name, $index, $value)
+ {
+ $cfg_item = SpawConfig::getStaticConfigItem($name);
+ if ($cfg_item && is_array($cfg_item->value))
+ {
+ $cfg_item->value[$index] = $value;
+ SpawConfig::setStaticConfigItem($cfg_item->name, $cfg_item->value, $cfg_item->transfer_type);
+ }
+ }
+
+ /**
+ * Sets instance config item value
+ * @param string $name Config item name
+ * @param mixed $value Config item value
+ */
+ function setConfigValue($name, $value)
+ {
+ $cfg_item = $this->getConfigItem($name);
+
+ if ($cfg_item)
+ {
+ $cfg_item->value = $value;
+ $this->setConfigItem($cfg_item->name, $cfg_item->value, $cfg_item->transfer_type);
+ }
+ }
+
+ /**
+ * Sets instance value for the element of config item provided item's value is an array
+ * @param string $name Config item name
+ * @param mixed $index Array index
+ * @param mixed $value Element value
+ */
+ function setConfigValueElement($name, $index, $value)
+ {
+ $cfg_item = $this->getConfigItem($name);
+ if ($cfg_item && is_array($cfg_item->value))
+ {
+ $cfg_item->value[$index] = $value;
+ $this->setConfigItem($cfg_item->name, $cfg_item->value, $cfg_item->transfer_type);
+ }
+ }
+
+ /**
+ * Gets global config item value
+ * @param string $name Config item name
+ * @returns mixed Config item value
+ * @static
+ */
+ function getStaticConfigValue($name)
+ {
+ $cfg_item = SpawConfig::getStaticConfigItem($name);
+
+ if ($cfg_item)
+ return $cfg_item->value;
+ else
+ return NULL;
+ }
+
+ /**
+ * Gets global value for the element of config item provided item's value is an array
+ * @param string $name Config item name
+ * @param mixed $index Array index
+ * @returns mixed Element value
+ */
+ function getStaticConfigValueElement($name, $index)
+ {
+ $cfg_item = SpawConfig::getStaticConfigItem($name);
+ if ($cfg_item && is_array($cfg_item->value) && !empty($cfg_item->value[$index]))
+ return $cfg_item->value[$index];
+ else
+ return NULL;
+ }
+
+
+ /**
+ * Gets instance config item value
+ * @param string $name Config item name
+ * @returns mixed Config item value
+ */
+ function getConfigValue($name)
+ {
+ $cfg_item = $this->getConfigItem($name);
+
+ if ($cfg_item)
+ return $cfg_item->value;
+ else
+ return NULL;
+ }
+
+ /**
+ * Gets instance value for the element of config item provided item's value is an array
+ * @param string $name Config item name
+ * @param mixed $index Array index
+ * @returns mixed Element value
+ */
+ function getConfigValueElement($name, $index)
+ {
+ $cfg_item = $this->getConfigItem($name);
+ if ($cfg_item && is_array($cfg_item->value) && !empty($cfg_item->value[$index]))
+ return $cfg_item->value[$index];
+ else
+ return NULL;
+ }
+
+ /**
+ * Stores "secure" config items in session and returns md5 of serialized config variables
+ * @returns string
+ */
+ function storeSecureConfig()
+ {
+ $strcfg = '';
+ $cfg = $this->config;
+ $sec_cfg = array();
+ $result = '';
+ $stored_cfg = SpawVars::getSessionVar("spaw_configs");
+
+ foreach($cfg as $key => $cfg_item)
+ {
+ if ($cfg_item->transfer_type & SPAW_CFG_TRANSFER_SECURE)
+ {
+ $strcfg .= $key . serialize($cfg_item);
+ $sec_cfg[$key] = $cfg_item;
+ }
+ }
+ if ($strcfg != '')
+ {
+ $result = md5($strcfg);
+ $stored_cfg[$result] = $sec_cfg;
+ SpawVars::setSessionVar("spaw_configs", $stored_cfg);
+ }
+ return $result;
+ }
+
+ /**
+ * Restores "secure" config items from session
+ * @params string $scid Config id
+ */
+ function restoreSecureConfig($scid)
+ {
+ $sec_cfg = SpawVars::getSessionVar("spaw_configs");
+ if ($sec_cfg != '' && is_array($sec_cfg[$scid]))
+ {
+ foreach($sec_cfg[$scid] as $key => $cfg_item)
+ $this->setConfigItem($cfg_item->name, $cfg_item->value, $cfg_item->transfer_type);
+ }
+ }
+}
+?>
Added: WebEditor/resources/spaw2/class/editor.class.php
===================================================================
--- WebEditor/resources/spaw2/class/editor.class.php (rev 0)
+++ WebEditor/resources/spaw2/class/editor.class.php 2008-05-07 22:19:10 UTC (rev 102)
@@ -0,0 +1,834 @@
+<?php
+/**
+ * SPAW Editor v.2 Editor classes
+ *
+ * Main editor classes
+ * @package spaw2
+ * @subpackage Editor
+ * @author Alan Mendelevich <al...@so...>
+ * @copyright UAB Solmetra
+ */
+
+require_once(str_replace('\\\\','/',dirname(__FILE__)).'/config.class.php');
+require_once(str_replace('\\\\','/',dirname(__FILE__)).'/toolbar.class.php');
+require_once(str_replace('\\\\','/',dirname(__FILE__)).'/theme.class.php');
+require_once(str_replace('\\\\','/',dirname(__FILE__)).'/lang.class.php');
+
+/**
+ * Represetns editor page
+ * @package spaw2
+ * @subpackage Editor
+ */
+class SpawEditorPage
+{
+ /**
+ * Page name
+ * @var string
+ */
+ var $name;
+
+ /**
+ * Name of the page input (textarea)
+ * @var string
+ */
+ var $intputName;
+
+ /**
+ * Page caption
+ * @var string
+ */
+ var $caption;
+
+ /**
+ * Page direction
+ * @var string
+ */
+ var $direction;
+
+ /**
+ * Page content
+ * @var string
+ */
+ var $value;
+
+ /**
+ * Constructor
+ * @param string $name Name
+ * @param string $caption Caption
+ * @param string $value Initial content
+ */
+ function SpawEditorPage($name, $caption, $value = '', $direction = 'ltr')
+ {
+ // workaround for names with [ and ]
+ $_page_count = SpawConfig::getStaticConfigItem('_page_count');
+ if ($_page_count != null)
+ {
+ SpawConfig::setStaticConfigItem('_page_count', $_page_count->value + 1);
+ }
+ else
+ {
+ SpawConfig::setStaticConfigItem('_page_count', 1);
+ }
+ $_pn = SpawConfig::getStaticConfigValue('_page_count');
+
+ $ctrl_id = str_replace(']','_', str_replace('[', '_', $name));
+ if ($ctrl_id != $name)
+ $ctrl_id = $ctrl_id . '_' . $_pn;
+
+ $this->name = $ctrl_id;
+ $this->inputName = $name;
+ $this->caption = $caption;
+ $this->value = $value;
+ $this->direction = $direction;
+ }
+}
+
+/**
+ * Represents the editor as a whole
+ * @package spaw2
+ * @subpackage Editor
+ */
+class SpawEditor
+{
+ /**
+ * Holds editor name
+ * @var string
+ */
+ var $name;
+
+
+ /**
+ * Workaround for "static" class variable under php4
+ * @access private
+ */
+ function &scriptSent()
+ {
+ static $script_sent;
+
+ return $script_sent;
+ }
+
+ /**
+ * Constructor
+ * @param string $name Editor name
+ */
+ function SpawEditor($name, $value='', $lang='', $toolbarset='',
+ $theme='', $width='', $height='', $stylesheet='', $page_caption='')
+ {
+ $this->name = $name;
+
+ // add first page
+ $page_caption = ($page_caption != '')?$page_caption:$name;
+ $page = new SpawEditorPage($name, $page_caption, $value);
+ if ($page->name != $this->name)
+ $this->name = $page->name;
+ $this->addPage($page);
+ $this->setActivePage($page);
+
+ if ($lang != '')
+ $this->setLanguage($lang);
+// if ($toolbarset != '')
+// $this->addToolbarSet($toolbarset);
+ if ($theme != '')
+ $this->setTheme($theme);
+ if ($width != '')
+ $this->setDimensions($width, null);
+ if ($height != '')
+ $this->setDimensions(null, $height);
+ if ($stylesheet != '')
+ $this->setStylesheet($stylesheet);
+
+ // load static config
+ $this->config = new SpawConfig();
+
+ if ($toolbarset != '')
+ $this->setConfigValue('default_toolbarset',$toolbarset);
+ }
+
+ /**
+ * Stores instance config
+ * @var SpawConfig
+ */
+ var $config;
+
+ /**
+ * Stores instance width
+ * @var string
+ */
+ var $width;
+
+ /**
+ * Stores instance height
+ * @var string
+ */
+ var $height;
+
+ /**
+ * Sets editor dimensions
+ * @param string width
+ * @param string height
+ */
+ function setDimensions($width, $height)
+ {
+ if ($width != null && $width != '')
+ $this->width = $width;
+ if ($height != null && $height != '')
+ $this->height = $height;
+ }
+
+ /**
+ * Stores toolbars used in this instance
+ * @var array
+ */
+ var $toolbars;
+
+ /**
+ * Adds toolbars to current instance (unlimited number of arguments could be passed)
+ *
+ * Specify a comma separated list of toolbars that should be displayed (ie. "format","table",etc.).
+ * @param string $toolbar,... list of toolbar names
+ */
+ function addToolbars($toolbar='')
+ {
+ $numargs = func_num_args();
+ if ($numargs)
+ {
+ // add specified toolbars
+ $args = func_get_args();
+ for ($i=0; $i<$numargs; $i++)
+ {
+ $this->toolbars[$args[$i]] = SpawToolbar::getToolbar($args[$i]);
+ $this->toolbars[$args[$i]]->editor = &$this;
+ }
+ }
+ }
+
+ /**
+ * Adds toolbar set
+ * @param string toolbar set name
+ */
+ function addToolbarSet($toolbarset)
+ {
+ $tset = SpawConfig::getStaticConfigValue("toolbarset_".$toolbarset);
+ if (is_array($tset))
+ {
+ foreach($tset as $substitute => $toolbar)
+ {
+ $this->addToolbar($toolbar, $substitute);
+ }
+ }
+ }
+
+ /**
+ * Adds toolbar (substitutes other toolbar if $substiture is specified)
+ * @param string $toolbar name of the toolbar to add
+ * @param string $substitute place this toolbar in place of specified
+ */
+ function addToolbar($toolbar, $substitute='')
+ {
+ $index = empty($substitute)?$toolbar:$substitute;
+
+ $this->toolbars[$index] = SpawToolbar::getToolbar($toolbar);
+ $this->toolbars[$index]->editor = &$this;
+ }
+
+ /**
+ * Theme/skin
+ * @var SpawTheme
+ */
+ var $theme;
+
+ /**
+ * Sets theme/skin for the instance
+ * @param string $theme Theme name
+ */
+ function setTheme($theme)
+ {
+ $this->theme = SpawTheme::getTheme($theme);
+ }
+
+ /**
+ * Language
+ * @var SpawLang
+ */
+ var $lang;
+
+ /**
+ * Sets editor language
+ * @param string $lang abbreviation of the language code
+ * @param string $out_charset output charset
+ */
+ function setLanguage($lang='', $out_charset='')
+ {
+ $this->lang = new SpawLang($lang);
+ if ($out_charset != null && $out_charset != '')
+ $this->lang->setOutputCharset($out_charset);
+ }
+
+ /**
+ * Editing area stylesheet
+ * @param string path to stylesheet file
+ */
+ var $stylesheet;
+
+ /**
+ * Sets editing area stylesheet
+ * @param string $filename path to stylesheet file
+ */
+ function setStylesheet($filename)
+ {
+ $this->stylesheet = $filename;
+ }
+
+ /**
+ * Pages collection
+ * @var array
+ */
+ var $pages;
+
+ /**
+ * Adds page
+ * @param SpawEditorPage page Page object
+ */
+ function addPage($page)
+ {
+ $this->pages[$page->name] = $page;
+ }
+
+ /**
+ * Returns page
+ * @param string $name Page name
+ * @returns SpawEditorPage
+ */
+ function getPage($name)
+ {
+ if (!empty($this->pages[$name]))
+ return $this->pages[$name];
+ else
+ return NULL;
+ }
+
+ /**
+ * Holds currently active page
+ * @var SpawEditorPage
+ */
+ var $active_page;
+
+ /**
+ * Sets active page
+ * @param SpawEditorPage $page
+ */
+ function setActivePage($page)
+ {
+ $this->active_page = $page;
+ }
+
+ /**
+ * Returns active page
+ * @returns SpawEditorPage
+ */
+ function getActivePage()
+ {
+ return $this->active_page;
+ }
+
+ /**
+ * Floating toolbar mode flag
+ * @var bool
+ */
+ var $floating_mode = false;
+
+ /**
+ * Sets floating toolbar mode on or off
+ * @param bool $value Should floating mode be enabled
+ */
+ function setFloatingMode($controlled_by = '', $value = true)
+ {
+ $this->floating_mode = $value;
+ if ($value)
+ $this->setToolbarFrom($controlled_by);
+ }
+
+ /**
+ * Returs true if floating toolbar mode is enabled
+ * @returns bool
+ */
+ function getFloatingMode()
+ {
+ return $this->floating_mode;
+ }
+
+ /**
+ * Holds instance of another SpawEditor which controls floating toolbar used for this instance
+ *
+ * If empty, this is the "main" instance for floating toolbar
+ * @var SpawEditor
+ */
+ var $toolbar_from;
+
+ /**
+ * Sets variable holding instance of another SpawEditor which controls floating toolbar used for this instance
+ * @param SpawEditor $controlled_by
+ */
+ function setToolbarFrom($controlled_by = '')
+ {
+ if ($controlled_by == '')
+ $controlled_by = $this;
+ $this->toolbar_from = $controlled_by;
+ }
+
+ /**
+ * Returns instance of another SpawEditor which controls floating toolbar used for this instance
+ * @returns SpawEditor
+ */
+ function getToolbarFrom()
+ {
+ if ($this->toolbar_from)
+ return $this->toolbar_from;
+ else
+ return $this;
+ }
+
+ /**
+ * Holds value whether mode strip should be displayed or not
+ * @var bool
+ */
+ var $is_mode_strip_visible = true;
+ /**
+ * Sets value indicating that mode strip should be shown
+ */
+ function showModeStrip()
+ {
+ $this->is_mode_strip_visible = true;
+ }
+ /**
+ * Sets value indicating that mode strip shouldn't be shown
+ */
+ function hideModeStrip()
+ {
+ $this->is_mode_strip_visible = false;
+ }
+ /**
+ * Returns value indicating whether mode strip should be shown or not
+ * @returns bool
+ */
+ function isModeStripVisible()
+ {
+ return $this->is_mode_strip_visible;
+ }
+
+ /**
+ * Holds value whether status bar should be displayed or not
+ * @var bool
+ */
+ var $is_status_bar_visible = true;
+ /**
+ * Sets value indicating that status bar should be shown
+ */
+ function showStatusBar()
+ {
+ $this->is_status_bar_visible = true;
+ }
+ /**
+ * Sets value indicating that status bar shouldn't be shown
+ */
+ function hideStatusBar()
+ {
+ $this->is_status_bar_visible = false;
+ }
+ /**
+ * Returns value indicating whether status bar should be shown or not
+ * @returns bool
+ */
+ function isStatusBarVisible()
+ {
+ return $this->is_status_bar_visible;
+ }
+
+ /**
+ * Holds value whether resizing grip should be displayed or not
+ * @var bool
+ */
+ var $is_resizable = true;
+ /**
+ * Sets value indicating that resizing grip should be shown
+ */
+ function showResizingGrip()
+ {
+ $this->is_resizable = true;
+ }
+ /**
+ * Sets value indicating that resizing grip shouldn't be shown
+ */
+ function hideResizingGrip()
+ {
+ $this->is_resizable = false;
+ }
+ /**
+ * Returns value indicating whether resizing grip should be shown or not
+ * @returns bool
+ */
+ function isResizingGripVisible()
+ {
+ return $this->is_resizable;
+ }
+
+ /**
+ * Set's instance config item
+ * @param string $name Config item's name
+ * @param mixed $value Config item's value
+ * @param integer $transfer_type Transfer type for the value (One or several of SPAW_CFG_TRANSFER_* constants). Default value - SPAW_CFG_TRANSFER_NONE
+ */
+ function setConfigItem($name, $value, $transfer_type=SPAW_CFG_TRANSFER_NONE)
+ {
+ $this->config->setConfigItem($name, $value, $transfer_type);
+ }
+
+ /**
+ * Gets instance config item
+ * @param string $name Config item name
+ * @returns SpawConfigItem
+ */
+ function getConfigItem($name)
+ {
+ return $this->config->getConfigItem($name);
+ }
+
+ /**
+ * Sets instance config item value
+ * @param string $name Config item name
+ * @param mixed $value Config item value
+ */
+ function setConfigValue($name, $value)
+ {
+ $this->config->setConfigValue($name, $value);
+ }
+
+ /**
+ * Sets instance value for the element of config item provided item's value is an array
+ * @param string $name Config item name
+ * @param mixed $index Array index
+ * @param mixed $value Element value
+ */
+ function setConfigValueElement($name, $index, $value)
+ {
+ $this->config->setConfigValueElement($name, $index, $value);
+ }
+
+ /**
+ * Gets instance config item value
+ * @param string $name Config item name
+ * @returns mixed Config item value
+ */
+ function getConfigValue($name)
+ {
+ return $this->config->getConfigValue($name);
+ }
+
+ /**
+ * Gets instance value for the element of config item provided item's value is an array
+ * @param string $name Config item name
+ * @param mixed $index Array index
+ * @returns mixed Element value
+ */
+ function getConfigValueElement($name, $index)
+ {
+ return $this->config->getConfigValueElement($name, $index);
+ }
+
+ /**
+ * Sets default property values if they were not explicitly specified
+ */
+ function setDefaults()
+ {
+ if ($this->theme == null)
+ $this->setTheme($this->config->getConfigValue('default_theme'));
+ if ($this->toolbars == null)
+ $this->addToolbarSet($this->config->getConfigValue('default_toolbarset'));
+ if ($this->stylesheet == null)
+ $this->setStylesheet($this->config->getConfigValue('default_stylesheet'));
+ if ($this->width == null)
+ $this->setDimensions($this->config->getConfigValue('default_width'), null);
+ if ($this->height == null)
+ $this->setDimensions(null, $this->config->getConfigValue('default_height'));
+ if ($this->lang == null)
+ $this->setLanguage($this->config->getConfigValue('default_lang'), $this->config->getConfigValue('default_output_charset'));
+ }
+
+ /**
+ * Returns HTML and JavaScript code for the editor
+ * @returns string
+ */
+ function getHtml()
+ {
+ $res = '';
+ $this->setDefaults();
+ if (SpawAgent::getAgent() != SPAW_AGENT_UNSUPPORTED)
+ {
+ // supported browser
+ $head_res = '';
+ $js_res = '';
+ $html_res = '';
+ $ssent = &SpawEditor::scriptSent();
+ if (!$ssent)
+ {
+ $head_res .= '<script type="text/javascript" src="'.SpawConfig::getStaticConfigValue("SPAW_DIR").'js/spaw.js.php" charset="utf-8"></script>';
+ $js_res .= 'SpawEngine.setSpawDir("'. SpawConfig::getStaticConfigValue("SPAW_DIR") . '");';
+ $ssent = true;
+ }
+ $objname = $this->name.'_obj';
+ $js_res .= 'var '....
[truncated message content] |
|
From: <se...@us...> - 2008-05-07 19:24:20
|
Revision: 101
http://acmcontester.svn.sourceforge.net/acmcontester/?rev=101&view=rev
Author: sem62
Date: 2008-05-07 12:24:22 -0700 (Wed, 07 May 2008)
Log Message:
-----------
Fixed bugs with updating course tree
Modified Paths:
--------------
WebEditor/resources/index.html
WebEditor/src/edu/lnu/FireFly/WebEditor/AppletWithApiHandle.java
WebEditor/src/edu/lnu/FireFly/WebEditor/Data/SummaryPageManager.java
WebEditor/src/edu/lnu/FireFly/WebEditor/GUI/TreeDataModel.java
WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/ResourcedItemModel.java
WebEditor/src/edu/lnu/FireFly/WebEditor/Settings.java
WebEditor/src/edu/lnu/FireFly/WebEditor/WebEditor.java
Modified: WebEditor/resources/index.html
===================================================================
--- WebEditor/resources/index.html 2008-05-07 17:51:30 UTC (rev 100)
+++ WebEditor/resources/index.html 2008-05-07 19:24:22 UTC (rev 101)
@@ -88,7 +88,8 @@
<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">
+ <PARAM NAME="templateLocation" VALUE="http://127.0.0.1/sem/WebEditor/template/">
+ <PARAM NAME="resourceLocation" VALUE="http://127.0.0.1/sem/WebEditor/">
</applet>
</td>
</tr>
Modified: WebEditor/src/edu/lnu/FireFly/WebEditor/AppletWithApiHandle.java
===================================================================
--- WebEditor/src/edu/lnu/FireFly/WebEditor/AppletWithApiHandle.java 2008-05-07 17:51:30 UTC (rev 100)
+++ WebEditor/src/edu/lnu/FireFly/WebEditor/AppletWithApiHandle.java 2008-05-07 19:24:22 UTC (rev 101)
@@ -27,6 +27,11 @@
static public String GetValue(String parameter){
System.out.print("GetValue(" + parameter + ");\n");
+
+ if (parameter.endsWith("completionStatus")){
+ return "incomplete";
+ }
+
return "";
}
Modified: WebEditor/src/edu/lnu/FireFly/WebEditor/Data/SummaryPageManager.java
===================================================================
--- WebEditor/src/edu/lnu/FireFly/WebEditor/Data/SummaryPageManager.java 2008-05-07 17:51:30 UTC (rev 100)
+++ WebEditor/src/edu/lnu/FireFly/WebEditor/Data/SummaryPageManager.java 2008-05-07 19:24:22 UTC (rev 101)
@@ -11,7 +11,7 @@
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.GUI.Reorganizer;
import edu.lnu.FireFly.WebEditor.ItemModels.ChapterModel;
import edu.lnu.FireFly.WebEditor.ItemModels.ItemModel;
import edu.lnu.FireFly.WebEditor.ItemModels.ItemModels;
@@ -209,12 +209,12 @@
"Count of summary pages is graiter than one!!!");
}
- ((Item) item).moveDown();
+ Reorganizer.getInstance().moveDown(item);
}
}
}
- TreeDataModel.getInstance().updateAllTree();
+ //TreeDataModel.getInstance().updateAllTree();
}
public void updateSummaryPages() {
Modified: WebEditor/src/edu/lnu/FireFly/WebEditor/GUI/TreeDataModel.java
===================================================================
--- WebEditor/src/edu/lnu/FireFly/WebEditor/GUI/TreeDataModel.java 2008-05-07 17:51:30 UTC (rev 100)
+++ WebEditor/src/edu/lnu/FireFly/WebEditor/GUI/TreeDataModel.java 2008-05-07 19:24:22 UTC (rev 101)
@@ -96,7 +96,7 @@
return getItemPath(item.getParent()).pathByAddingChild(item);
}
- public void updateAllTree(){
+ private void updateAllTree(){
for (int i=0; i < listeners.size(); i++){
TreeModelListener listener = listeners.get(i);
TreeModelEvent event = new TreeModelEvent(this, new TreePath(TreeDataModel.getInstance().getRoot()));
Modified: WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/ResourcedItemModel.java
===================================================================
--- WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/ResourcedItemModel.java 2008-05-07 17:51:30 UTC (rev 100)
+++ WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/ResourcedItemModel.java 2008-05-07 19:24:22 UTC (rev 101)
@@ -38,7 +38,7 @@
return;
}
- ConfigureItem(item);
+ ConfigureItem(item);
}
protected final String loadResource(String location, String identifier) {
Modified: WebEditor/src/edu/lnu/FireFly/WebEditor/Settings.java
===================================================================
--- WebEditor/src/edu/lnu/FireFly/WebEditor/Settings.java 2008-05-07 17:51:30 UTC (rev 100)
+++ WebEditor/src/edu/lnu/FireFly/WebEditor/Settings.java 2008-05-07 19:24:22 UTC (rev 101)
@@ -4,6 +4,7 @@
private String courseLocation = "";
private String templateLocation = "";
private String serviceLocation = "";
+ private String resourceLocation = "";
public static Settings obj = null;
@@ -39,4 +40,12 @@
public void setServiceLocation(String serviceLocation) {
this.serviceLocation = serviceLocation;
}
+
+ public String getResourceLocation() {
+ return resourceLocation;
+ }
+
+ public void setResourceLocation(String resourceLocation) {
+ this.resourceLocation = resourceLocation;
+ }
}
Modified: WebEditor/src/edu/lnu/FireFly/WebEditor/WebEditor.java
===================================================================
--- WebEditor/src/edu/lnu/FireFly/WebEditor/WebEditor.java 2008-05-07 17:51:30 UTC (rev 100)
+++ WebEditor/src/edu/lnu/FireFly/WebEditor/WebEditor.java 2008-05-07 19:24:22 UTC (rev 101)
@@ -157,8 +157,8 @@
if (e.getNewLeadSelectionPath() == null) {
try {
getAppletContext().showDocument(
- new URL("http://localhost:8080/WebEditor/empty.htm"),
- "ContentFrame");
+ new URL(Settings.getInstance().getResourceLocation()
+ + "/empty.htm"), "ContentFrame");
System.out.print("browse to empty document.\n");
Thread.sleep(300);
} catch (Exception e1) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <se...@us...> - 2008-05-07 17:51:36
|
Revision: 100
http://acmcontester.svn.sourceforge.net/acmcontester/?rev=100&view=rev
Author: sem62
Date: 2008-05-07 10:51:30 -0700 (Wed, 07 May 2008)
Log Message:
-----------
* Fixed bug with move item down in tree
* Fixed notify sending to tree for updating it after moving items.
Modified Paths:
--------------
WebEditor/src/edu/lnu/FireFly/WebEditor/GUI/CourseTreePopupMenu.java
WebEditor/src/edu/lnu/FireFly/WebEditor/GUI/Reorganizer.java
Modified: WebEditor/src/edu/lnu/FireFly/WebEditor/GUI/CourseTreePopupMenu.java
===================================================================
--- WebEditor/src/edu/lnu/FireFly/WebEditor/GUI/CourseTreePopupMenu.java 2008-05-07 17:28:19 UTC (rev 99)
+++ WebEditor/src/edu/lnu/FireFly/WebEditor/GUI/CourseTreePopupMenu.java 2008-05-07 17:51:30 UTC (rev 100)
@@ -124,7 +124,7 @@
}
if (menuItem == moveUpItemMenu) {
- Reorganizer.getInstance().moveDown(manifestItem);
+ Reorganizer.getInstance().moveUp(manifestItem);
}
if (menuItem == moveDownItemMenu) {
Modified: WebEditor/src/edu/lnu/FireFly/WebEditor/GUI/Reorganizer.java
===================================================================
--- WebEditor/src/edu/lnu/FireFly/WebEditor/GUI/Reorganizer.java 2008-05-07 17:28:19 UTC (rev 99)
+++ WebEditor/src/edu/lnu/FireFly/WebEditor/GUI/Reorganizer.java 2008-05-07 17:51:30 UTC (rev 100)
@@ -34,10 +34,21 @@
}
if (moved) {
- TreeDataModel.getInstance().updateAllTree();
+ updateAfterMoved(anItem, -1);
}
}
+ private void updateAfterMoved(TreeItem anItem, int otherItemOffset) {
+ TreeDataModel.getInstance().treeNodesDeleted(anItem);
+ TreeDataModel.getInstance().treeNodesInserted(anItem);
+
+ int anItemIndex = anItem.getParent().getChildIndex(anItem);
+ TreeItem item = anItem.getParent().getChild(anItemIndex + otherItemOffset);
+
+ TreeDataModel.getInstance().treeNodesDeleted(item);
+ TreeDataModel.getInstance().treeNodesInserted(item);
+ }
+
public boolean canMoveDown(TreeItem anItem) {
int brothersCount = anItem.getParent().getChildCount();
int index = anItem.getParent().getChildIndex(anItem);
@@ -75,7 +86,7 @@
}
if (moved) {
- TreeDataModel.getInstance().updateAllTree();
+ updateAfterMoved(anItem, 1);
}
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <se...@us...> - 2008-05-07 17:28:12
|
Revision: 99
http://acmcontester.svn.sourceforge.net/acmcontester/?rev=99&view=rev
Author: sem62
Date: 2008-05-07 10:28:19 -0700 (Wed, 07 May 2008)
Log Message:
-----------
Added scroll pane for course tree.
Modified Paths:
--------------
WebEditor/src/edu/lnu/FireFly/WebEditor/WebEditor.java
Modified: WebEditor/src/edu/lnu/FireFly/WebEditor/WebEditor.java
===================================================================
--- WebEditor/src/edu/lnu/FireFly/WebEditor/WebEditor.java 2008-05-07 17:08:06 UTC (rev 98)
+++ WebEditor/src/edu/lnu/FireFly/WebEditor/WebEditor.java 2008-05-07 17:28:19 UTC (rev 99)
@@ -7,6 +7,7 @@
import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;
+import javax.swing.JScrollPane;
import javax.swing.JTree;
import javax.swing.event.TreeSelectionEvent;
import javax.swing.event.TreeSelectionListener;
@@ -104,7 +105,7 @@
CreateNewCourse();
tree = new JTree(TreeDataModel.getInstance());
- this.add(tree);
+ this.add(new JScrollPane(tree));
tree.addTreeSelectionListener(this);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <se...@us...> - 2008-05-07 17:08:06
|
Revision: 98
http://acmcontester.svn.sourceforge.net/acmcontester/?rev=98&view=rev
Author: sem62
Date: 2008-05-07 10:08:06 -0700 (Wed, 07 May 2008)
Log Message:
-----------
Optimization trasferring.
Template loading only once.
Modified Paths:
--------------
WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/ChapterModel.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
WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/Template.java
WebEditor/src/edu/lnu/FireFly/WebEditor/WSClients/WebEditorServiceClient.java
WebEditor/src/edu/lnu/FireFly/WebEditor/WebEditor.java
Modified: WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/ChapterModel.java
===================================================================
--- WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/ChapterModel.java 2008-05-07 08:48:34 UTC (rev 97)
+++ WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/ChapterModel.java 2008-05-07 17:08:06 UTC (rev 98)
@@ -147,8 +147,8 @@
identifier = ((Item) anItem).identifier;
}
- WebEditorServiceClient
- .setFileContent(identifier + ".conf", doc.asXML());
+ WebEditorServiceClient.getInstance().setFileContent(
+ identifier + ".conf", doc.asXML());
if (updateSummaryPages) {
SummaryPageManager.getInstance().updateSummaryPages();
Modified: WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/Lecture/LectureModel.java
===================================================================
--- WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/Lecture/LectureModel.java 2008-05-07 08:48:34 UTC (rev 97)
+++ WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/Lecture/LectureModel.java 2008-05-07 17:08:06 UTC (rev 98)
@@ -64,14 +64,15 @@
}
@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);
LectureData itemData = getData(anItem);
-
+
template.setProperty("caption", itemData.getCaption());
template.setProperty("content", itemData.getContent());
@@ -85,11 +86,11 @@
root.addElement("ShowOnSummaryPage").setText(
String.valueOf(itemData.getShowOnSummaryPage()));
- WebEditorServiceClient.setFileContent(resource.identifier + ".conf",
- doc.asXML());
+ WebEditorServiceClient.getInstance().setFileContent(
+ resource.identifier + ".conf", doc.asXML());
SummaryPageManager.getInstance().updateSummaryPages();
-
+
return true;
}
Modified: WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/ResourcedItemModel.java
===================================================================
--- WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/ResourcedItemModel.java 2008-05-07 08:48:34 UTC (rev 97)
+++ WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/ResourcedItemModel.java 2008-05-07 17:08:06 UTC (rev 98)
@@ -45,10 +45,10 @@
String res = "";
if (location.equalsIgnoreCase("course")) {
- res = WebEditorServiceClient.getFileContent(identifier + ".conf",
+ res = WebEditorServiceClient.getInstance().getFileContent(identifier + ".conf",
location);
} else {
- res = WebEditorServiceClient.getFileContent(modelName + ".conf",
+ res = WebEditorServiceClient.getInstance().getFileContent(modelName + ".conf",
location);
}
return res;
Modified: WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/SimpleQuestion/SimpleQuestionModel.java
===================================================================
--- WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/SimpleQuestion/SimpleQuestionModel.java 2008-05-07 08:48:34 UTC (rev 97)
+++ WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/SimpleQuestion/SimpleQuestionModel.java 2008-05-07 17:08:06 UTC (rev 98)
@@ -146,7 +146,7 @@
ansEl.setText(answer.getAnswerText());
}
- WebEditorServiceClient.setFileContent(resource.identifier + ".conf",
+ WebEditorServiceClient.getInstance().setFileContent(resource.identifier + ".conf",
doc.asXML());
SummaryPageManager.getInstance().updateSummaryPages();
Modified: WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/SummaryPageModel/SummaryPageModel.java
===================================================================
--- WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/SummaryPageModel/SummaryPageModel.java 2008-05-07 08:48:34 UTC (rev 97)
+++ WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/SummaryPageModel/SummaryPageModel.java 2008-05-07 17:08:06 UTC (rev 98)
@@ -54,7 +54,7 @@
/* Element root = */doc.addElement(this.getClass().getSimpleName());
// root.addElement("content").setText(getData(item).getContent());
- WebEditorServiceClient.setFileContent(resource.identifier + ".conf",
+ WebEditorServiceClient.getInstance().setFileContent(resource.identifier + ".conf",
doc.asXML());
return true;
Modified: WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/Template.java
===================================================================
--- WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/Template.java 2008-05-07 08:48:34 UTC (rev 97)
+++ WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/Template.java 2008-05-07 17:08:06 UTC (rev 98)
@@ -53,7 +53,7 @@
public boolean updateResource() {
String templateFileName = model.getClass().getSimpleName() + ".html";
- String res = WebEditorServiceClient.getFileContent(templateFileName,
+ String res = WebEditorServiceClient.getInstance().getFileContent(templateFileName,
"template");
Iterator<String> iter = propertiests.keySet().iterator();
@@ -67,7 +67,7 @@
}
}
- WebEditorServiceClient.setFileContent(fileName, res);
+ WebEditorServiceClient.getInstance().setFileContent(fileName, res);
return true;
}
Modified: WebEditor/src/edu/lnu/FireFly/WebEditor/WSClients/WebEditorServiceClient.java
===================================================================
--- WebEditor/src/edu/lnu/FireFly/WebEditor/WSClients/WebEditorServiceClient.java 2008-05-07 08:48:34 UTC (rev 97)
+++ WebEditor/src/edu/lnu/FireFly/WebEditor/WSClients/WebEditorServiceClient.java 2008-05-07 17:08:06 UTC (rev 98)
@@ -6,18 +6,45 @@
import java.net.URL;
import java.net.URLConnection;
import java.net.URLEncoder;
+import java.util.HashMap;
import edu.lnu.FireFly.WebEditor.Settings;
public class WebEditorServiceClient {
+
+ private HashMap<String, String> templates;
+
+ private static WebEditorServiceClient obj = null;
+
+ private WebEditorServiceClient(){
+ templates = new HashMap<String, String>();
+ }
+
+ public static WebEditorServiceClient getInstance(){
+ if (obj == null){
+ obj = new WebEditorServiceClient();
+ }
+
+ return obj;
+ }
/**
* @param fName File name
* @param location Location name = template | course
* @return
*/
- public static String getFileContent(String fName, String location) {
+ public String getFileContent(String fName, String location) {
System.out.println("Getting file's content (fName=" + fName + "; location=" + location + ")...");
+ if (location.equalsIgnoreCase("template")){
+ String template = templates.get(fName);
+ if (template != null){
+
+ System.out.println("Founded in hash.");
+
+ return template;
+ }
+ }
+
String result = "";
try {
// Construct data
@@ -53,11 +80,15 @@
e.printStackTrace();
}
+ if (location.equalsIgnoreCase("template")){
+ templates.put(fName, result);
+ }
+
System.out.print("result: " + result);
return result;
}
- public static void setFileContent(String fName, String content) {
+ public void setFileContent(String fName, String content) {
System.out.println("Setting file's content (fName=" + fName + ")...");
String result = "";
Modified: WebEditor/src/edu/lnu/FireFly/WebEditor/WebEditor.java
===================================================================
--- WebEditor/src/edu/lnu/FireFly/WebEditor/WebEditor.java 2008-05-07 08:48:34 UTC (rev 97)
+++ WebEditor/src/edu/lnu/FireFly/WebEditor/WebEditor.java 2008-05-07 17:08:06 UTC (rev 98)
@@ -64,13 +64,13 @@
private void saveManifest() throws TestDocException {
Parser parser = new Parser();
- WebEditorServiceClient.setFileContent("imsmanifest.xml", parser
- .toXML(manifest));
+ WebEditorServiceClient.getInstance().setFileContent("imsmanifest.xml",
+ parser.toXML(manifest));
}
private void openManifest() throws TestDocException {
Parser parser = new Parser();
- manifest = parser.fromXML(WebEditorServiceClient
+ manifest = parser.fromXML(WebEditorServiceClient.getInstance()
.getFileContent("imsmanifest.xml", "course"));
TreeDataModel.initInstance(manifest);
@@ -84,10 +84,13 @@
@Override
public void init() {
- Settings.getInstance().setCourseLocation(getParameter("courseLocation"));
- Settings.getInstance().setServiceLocation(getParameter("serviceLocation"));
- Settings.getInstance().setTemplateLocation(getParameter("templateLocation"));
-
+ Settings.getInstance()
+ .setCourseLocation(getParameter("courseLocation"));
+ Settings.getInstance().setServiceLocation(
+ getParameter("serviceLocation"));
+ Settings.getInstance().setTemplateLocation(
+ getParameter("templateLocation"));
+
instance = this;
initMenu();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <se...@us...> - 2008-05-07 08:48:31
|
Revision: 97
http://acmcontester.svn.sourceforge.net/acmcontester/?rev=97&view=rev
Author: sem62
Date: 2008-05-07 01:48:34 -0700 (Wed, 07 May 2008)
Log Message:
-----------
code refactor:
* move synchronizeItemWithResource to parent class
* added some files to template
Modified Paths:
--------------
WebEditor/src/edu/lnu/FireFly/WebEditor/Data/ManifestFactory.java
WebEditor/src/edu/lnu/FireFly/WebEditor/GUI/Dialogs/SimpleQuestionPropertiestsDlg.java
WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/ChapterItemData.java
WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/ChapterModel.java
WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/ItemData.java
WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/ItemModel.java
WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/ItemModels.java
WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/Lecture/LectureData.java
WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/Lecture/LectureModel.java
WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/OrganizationModel.java
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/SimpleQuestion/SimpleQuestionModel.java
WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/SummaryPageModel/SummaryPageData.java
WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/SummaryPageModel/SummaryPageModel.java
WebEditor/src/edu/lnu/FireFly/WebEditor/WebEditor.java
Modified: WebEditor/src/edu/lnu/FireFly/WebEditor/Data/ManifestFactory.java
===================================================================
--- WebEditor/src/edu/lnu/FireFly/WebEditor/Data/ManifestFactory.java 2008-05-06 22:43:58 UTC (rev 96)
+++ WebEditor/src/edu/lnu/FireFly/WebEditor/Data/ManifestFactory.java 2008-05-07 08:48:34 UTC (rev 97)
@@ -35,7 +35,7 @@
return null;
}
- model.initializeDataForItem(root, new ChapterItemData());
+ model.setItemData(root, new ChapterItemData());
model.updateItemResource(root, false);
return manifest;
Modified: WebEditor/src/edu/lnu/FireFly/WebEditor/GUI/Dialogs/SimpleQuestionPropertiestsDlg.java
===================================================================
--- WebEditor/src/edu/lnu/FireFly/WebEditor/GUI/Dialogs/SimpleQuestionPropertiestsDlg.java 2008-05-06 22:43:58 UTC (rev 96)
+++ WebEditor/src/edu/lnu/FireFly/WebEditor/GUI/Dialogs/SimpleQuestionPropertiestsDlg.java 2008-05-07 08:48:34 UTC (rev 97)
@@ -8,9 +8,7 @@
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
-import edu.lnu.FireFly.FFManifest.item.Item;
import edu.lnu.FireFly.WebEditor.ItemModels.SimpleQuestion.SimpleQuestionAnswersDataModel;
-import edu.lnu.FireFly.WebEditor.ItemModels.SimpleQuestion.SimpleQuestionException;
import edu.lnu.FireFly.WebEditor.ItemModels.SimpleQuestion.SimpleQuestionModel;
/**
@@ -37,7 +35,7 @@
private javax.swing.JButton editCaptionInHtmlBtn;
private javax.swing.JButton editQuestionInHtmlBtn;
private SimpleQuestionAnswersDataModel simpleQuestionAnswersDataModel;
-
+
public SimpleQuestionPropertiestsDlg() {
obj = this;
@@ -47,7 +45,7 @@
@Override
public void actionPerformed(ActionEvent arg0) {
super.actionPerformed(arg0);
-
+
if (arg0.getSource() == editQuestionInHtmlBtn) {
editTextFieldInHtmlEditor(questionTextField);
}
@@ -64,29 +62,23 @@
@Override
protected void fillFields() {
- try {
- SimpleQuestionPropertiestsDlg dlg = (SimpleQuestionPropertiestsDlg)obj;
- dlg.titleTextField.setText(manifestItem.getTitle());
+ SimpleQuestionPropertiestsDlg dlg = (SimpleQuestionPropertiestsDlg) obj;
+ dlg.titleTextField.setText(manifestItem.getTitle());
- SimpleQuestionModel itemModel = new SimpleQuestionModel();
+ SimpleQuestionModel itemModel = new SimpleQuestionModel();
- itemModel.synchronizeItemWithResource((Item)manifestItem);
+ dlg.captionTextField.setText(itemModel.getData(manifestItem)
+ .getCaption());
+ dlg.sameAsTitleCheckBox.setSelected(dlg.titleTextField.getText()
+ .equals(dlg.captionTextField.getText()));
+ dlg.questionTextField.setText(itemModel.getData(manifestItem)
+ .getQuestion());
- dlg.captionTextField
- .setText(itemModel.getData(manifestItem).getCaption());
- dlg.sameAsTitleCheckBox.setSelected(dlg.titleTextField.getText()
- .equals(dlg.captionTextField.getText()));
- dlg.questionTextField.setText(itemModel
- .getData(manifestItem).getQuestion());
+ dlg.simpleQuestionAnswersDataModel = itemModel.getData(manifestItem)
+ .getAnswers();
+ dlg.answersTable.setModel(dlg.simpleQuestionAnswersDataModel);
- dlg.simpleQuestionAnswersDataModel = itemModel
- .getData(manifestItem).getAnswers();
- dlg.answersTable.setModel(dlg.simpleQuestionAnswersDataModel);
-
- dlg.titleTextField.selectAll();
- } catch (SimpleQuestionException e) {
- e.printStackTrace();
- }
+ dlg.titleTextField.selectAll();
}
private void initComponents() {
@@ -348,7 +340,8 @@
layout
.createParallelGroup(
javax.swing.GroupLayout.Alignment.BASELINE)
- .addComponent(cancelButton)
+ .addComponent(
+ cancelButton)
.addComponent(okButton))
.addContainerGap(
javax.swing.GroupLayout.DEFAULT_SIZE,
@@ -362,17 +355,15 @@
SimpleQuestionModel itemModel = new SimpleQuestionModel();
manifestItem.setTitle(titleTextField.getText());
- try{
itemModel.getData(manifestItem).setCaption(captionTextField.getText());
- itemModel.getData(manifestItem).setQuestion(questionTextField.getText());
- itemModel.getData(manifestItem).setAnswers(simpleQuestionAnswersDataModel);
- }
- catch (SimpleQuestionException e) {
- e.printStackTrace();
- return;
- }
+ itemModel.getData(manifestItem)
+ .setQuestion(questionTextField.getText());
+
+ itemModel.getData(manifestItem).setAnswers(
+ simpleQuestionAnswersDataModel);
+
itemModel.updateItemResource(manifestItem, true);
}
Modified: WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/ChapterItemData.java
===================================================================
--- WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/ChapterItemData.java 2008-05-06 22:43:58 UTC (rev 96)
+++ WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/ChapterItemData.java 2008-05-07 08:48:34 UTC (rev 97)
@@ -1,5 +1,13 @@
package edu.lnu.FireFly.WebEditor.ItemModels;
+import java.io.Reader;
+
+import org.dom4j.Document;
+import org.dom4j.Element;
+import org.dom4j.io.SAXReader;
+
+import edu.lnu.FireFly.FFManifest.TreeItem;
+
public class ChapterItemData extends ItemData {
private boolean showSummaryPage = true;
private boolean flow;
@@ -57,7 +65,43 @@
public void setShowSummaryPage(boolean showSummaryPage) {
this.showSummaryPage = showSummaryPage;
}
+
+ public boolean unmarshal (Reader aXmlInputStream, TreeItem anItem){
+ SAXReader reader = new SAXReader();
+ Document doc = null;
+ Element root = null;
+ try {
+ doc = reader.read(aXmlInputStream);
+
+ root = doc.getRootElement();
+ } catch (Exception e) {
+ e.printStackTrace();
+ return false;
+ }
+
+ try {
+ boolean showSP = Boolean.valueOf(root
+ .elementTextTrim("ShowSummaryPage"));
+ setShowSummaryPage(showSP);
+
+ boolean showOnSP = Boolean.valueOf(root
+ .elementTextTrim("ShowOnSummaryPage"));
+ setShowOnSummaryPage(showOnSP);
+
+ int configuration = Integer.valueOf(root
+ .elementTextTrim("Configuration"));
+ setConfiguration(configuration);
+
+ } catch (Exception e) {
+ e.printStackTrace();
+ return false;
+ }
+
+
+ return true;
+ }
+
public static final int CONFIGURATION_USER_DEFINED = 0;
public static final int CONFIGURATION_LECTURE = 1;
public static final int CONFIGURATION_EXAMINATION = 2;
Modified: WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/ChapterModel.java
===================================================================
--- WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/ChapterModel.java 2008-05-06 22:43:58 UTC (rev 96)
+++ WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/ChapterModel.java 2008-05-07 08:48:34 UTC (rev 97)
@@ -1,11 +1,8 @@
package edu.lnu.FireFly.WebEditor.ItemModels;
-import java.io.StringReader;
-
import org.dom4j.Document;
import org.dom4j.DocumentHelper;
import org.dom4j.Element;
-import org.dom4j.io.SAXReader;
import edu.lnu.FireFly.FFManifest.Organization;
import edu.lnu.FireFly.FFManifest.TreeItem;
@@ -17,21 +14,11 @@
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;
}
@@ -43,7 +30,7 @@
public ChapterModel() {
super();
- modelName = "Chapter";
+ modelName = "ChapterModel";
isContainerItem = true;
}
@@ -67,7 +54,7 @@
}
public boolean getShowSummaryPage(TreeItem anItem) {
- ChapterItemData itemData = (ChapterItemData) getItemData(anItem);
+ ChapterItemData itemData = getData(anItem);
if (itemData == null) {
System.out
@@ -119,11 +106,11 @@
}
public void setShowSummaryPage(TreeItem anItem, boolean state) {
- ChapterItemData itemData = (ChapterItemData) getItemData(anItem);
+ ChapterItemData itemData = getData(anItem);
if (itemData == null) {
ItemData data = new ChapterItemData();
- initializeDataForItem(anItem, data);
+ setItemData(anItem, data);
itemData = (ChapterItemData) getItemData(anItem);
}
@@ -133,61 +120,14 @@
}
}
- @Override
- public boolean synchronizeItemWithResource(TreeItem anItem) {
- initializeDataForItem(anItem, new ChapterItemData());
-
- String identifier = "";
- if (anItem.getClass() == Item.class) {
- identifier = ((Item) anItem).identifier;
- }
- if (anItem.getClass() == Organization.class) {
- identifier = ((Organization) anItem).identifier;
- }
- String res = WebEditorServiceClient
- .getFileContent(identifier + ".conf", "course");
-
- if (res == null || res.trim().equals("")){
- return false;
- }
-
- SAXReader reader = new SAXReader();
-
- Document doc = null;
- Element root = null;
- try {
- doc = reader.read(new StringReader(res));
-
- root = doc.getRootElement();
- } catch (Exception e) {
- e.printStackTrace();
- return false;
- }
-
- try {
- boolean showSP = Boolean.valueOf(root
- .elementTextTrim("ShowSummaryPage"));
- ((ChapterItemData) getItemData(anItem)).setShowSummaryPage(showSP);
-
- boolean showOnSP = Boolean.valueOf(root
- .elementTextTrim("ShowOnSummaryPage"));
- getItemData(anItem).setShowOnSummaryPage(showOnSP);
-
- int configuration = Integer.valueOf(root
- .elementTextTrim("Configuration"));
- ((ChapterItemData) getItemData(anItem)).setConfiguration(configuration);
-
- } catch (Exception e) {
- e.printStackTrace();
- return false;
- }
-
- return true;
+ private ChapterItemData getData(TreeItem anItem) {
+ return (ChapterItemData) getItemData(anItem);
}
@Override
- public boolean updateItemResource(TreeItem anItem, boolean updateSummaryPages) {
- ChapterItemData itemData = (ChapterItemData) getItemData(anItem);
+ public boolean updateItemResource(TreeItem anItem,
+ boolean updateSummaryPages) {
+ ChapterItemData itemData = getData(anItem);
Document doc = DocumentHelper.createDocument();
Element root = doc.addElement(modelName);
@@ -210,10 +150,15 @@
WebEditorServiceClient
.setFileContent(identifier + ".conf", doc.asXML());
- if (updateSummaryPages){
+ if (updateSummaryPages) {
SummaryPageManager.getInstance().updateSummaryPages();
}
return true;
}
+
+ @Override
+ protected ItemData createItemDataInstance() {
+ return new ChapterItemData();
+ }
}
\ No newline at end of file
Modified: WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/ItemData.java
===================================================================
--- WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/ItemData.java 2008-05-06 22:43:58 UTC (rev 96)
+++ WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/ItemData.java 2008-05-07 08:48:34 UTC (rev 97)
@@ -1,5 +1,9 @@
package edu.lnu.FireFly.WebEditor.ItemModels;
+import java.io.Reader;
+
+import edu.lnu.FireFly.FFManifest.TreeItem;
+
public abstract class ItemData {
private Boolean showOnSummaryPage = false;
@@ -10,4 +14,6 @@
public void setShowOnSummaryPage(Boolean showOnSummaryPage) {
this.showOnSummaryPage = showOnSummaryPage;
}
+
+ public abstract boolean unmarshal(Reader res, TreeItem anItem);
}
Modified: WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/ItemModel.java
===================================================================
--- WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/ItemModel.java 2008-05-06 22:43:58 UTC (rev 96)
+++ WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/ItemModel.java 2008-05-07 08:48:34 UTC (rev 97)
@@ -19,7 +19,7 @@
protected String modelName = "Abstract model";
- public void initializeDataForItem(TreeItem anItem, ItemData data) {
+ public void setItemData(TreeItem anItem, ItemData data) {
questionsData.put(anItem, data);
}
@@ -129,8 +129,8 @@
public abstract void rename(TreeItem item, String newTitle);
- public abstract boolean synchronizeItemWithResource(TreeItem item);
-
+ public abstract boolean synchronizeItemWithResource(TreeItem anItem, String location);
+
public abstract boolean updateItemResource(TreeItem item, boolean updateSummaryPages);
public abstract boolean getLimitConditionsMenuVisible();
@@ -150,4 +150,6 @@
return null;
}
+
+ protected abstract ItemData createItemDataInstance();
}
Modified: WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/ItemModels.java
===================================================================
--- WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/ItemModels.java 2008-05-06 22:43:58 UTC (rev 96)
+++ WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/ItemModels.java 2008-05-07 08:48:34 UTC (rev 97)
@@ -45,7 +45,7 @@
ItemModel model = ItemModels.getModelFromItem(item);
if (item.getClass() == Item.class) {
- model.synchronizeItemWithResource((Item)item);
+ model.synchronizeItemWithResource((Item)item, "course");
}
if (model.getClass() == ChapterModel.class
Modified: WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/Lecture/LectureData.java
===================================================================
--- WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/Lecture/LectureData.java 2008-05-06 22:43:58 UTC (rev 96)
+++ WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/Lecture/LectureData.java 2008-05-07 08:48:34 UTC (rev 97)
@@ -1,20 +1,55 @@
package edu.lnu.FireFly.WebEditor.ItemModels.Lecture;
+import java.io.Reader;
+
+import org.dom4j.Document;
+import org.dom4j.Element;
+import org.dom4j.io.SAXReader;
+
+import edu.lnu.FireFly.FFManifest.TreeItem;
import edu.lnu.FireFly.WebEditor.ItemModels.ItemData;
public class LectureData extends ItemData {
- private String caption="";
- private String content="";
+ private String caption = "";
+ private String content = "";
+
public String getCaption() {
return caption;
}
+
public void setCaption(String caption) {
this.caption = caption;
}
+
public String getContent() {
return content;
}
+
public void setContent(String content) {
this.content = content;
}
+
+ public boolean unmarshal(Reader stringReader, TreeItem anItem) {
+ SAXReader reader = new SAXReader();
+
+ Document doc = null;
+ try {
+ doc = reader.read(stringReader);
+ } catch (Exception e) {
+ e.printStackTrace();
+ return false;
+ }
+
+ Element root = doc.getRootElement();
+
+ setCaption(root.elementTextTrim("caption"));
+ setContent(root.elementTextTrim("content"));
+
+ boolean showOnSP = Boolean.valueOf(root
+ .elementTextTrim("ShowOnSummaryPage"));
+
+ setShowOnSummaryPage(showOnSP);
+
+ return true;
+ }
}
Modified: WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/Lecture/LectureModel.java
===================================================================
--- WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/Lecture/LectureModel.java 2008-05-06 22:43:58 UTC (rev 96)
+++ WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/Lecture/LectureModel.java 2008-05-07 08:48:34 UTC (rev 97)
@@ -1,11 +1,8 @@
package edu.lnu.FireFly.WebEditor.ItemModels.Lecture;
-import java.io.StringReader;
-
import org.dom4j.Document;
import org.dom4j.DocumentHelper;
import org.dom4j.Element;
-import org.dom4j.io.SAXReader;
import edu.lnu.FireFly.FFManifest.TreeItem;
import edu.lnu.FireFly.FFManifest.item.Item;
@@ -14,17 +11,13 @@
import edu.lnu.FireFly.WebEditor.Data.SummaryPageManager;
import edu.lnu.FireFly.WebEditor.GUI.TreeDataModel;
import edu.lnu.FireFly.WebEditor.GUI.Dialogs.LecturePropertiestsDlg;
+import edu.lnu.FireFly.WebEditor.ItemModels.ItemData;
import edu.lnu.FireFly.WebEditor.ItemModels.ResourcedItemModel;
import edu.lnu.FireFly.WebEditor.ItemModels.Template;
import edu.lnu.FireFly.WebEditor.WSClients.WebEditorServiceClient;
public class LectureModel extends ResourcedItemModel {
@Override
- protected void initializeDataForItem(Item anItem) {
- initializeDataForItem(anItem, new LectureData());
- }
-
- @Override
public boolean getShowSummaryPageMenuVisible() {
return false;
}
@@ -40,44 +33,10 @@
}
public LectureModel() {
- modelName = "Lecture";
+ modelName = "LectureModel";
}
@Override
- public boolean synchronizeItemWithResource(TreeItem anItem) {
- initializeDataForItem(anItem, new LectureData());
-
- Resource resource = WebEditor.instance.getManifest().resources
- .findResourceByIdentifier(((Item)anItem).identifierref);
-
- String res = WebEditorServiceClient.getFileContent(resource.identifier
- + ".conf", "course");
-
- SAXReader reader = new SAXReader();
-
- Document doc = null;
- try {
- doc = reader.read(new StringReader(res));
- } catch (Exception e) {
- e.printStackTrace();
- return false;
- }
-
- Element root = doc.getRootElement();
-
- LectureData itemData = getData(anItem);
-
- itemData.setCaption(root.elementTextTrim("caption"));
- itemData.setContent(root.elementTextTrim("content"));
-
- boolean showOnSP = Boolean.valueOf(root
- .elementTextTrim("ShowOnSummaryPage"));
- itemData.setShowOnSummaryPage(showOnSP);
-
- return true;
- }
-
- @Override
public boolean canAddToItem(TreeItem parent) {
// TODO Auto-generated method stub
return true;
@@ -133,4 +92,9 @@
return true;
}
+
+ @Override
+ protected ItemData createItemDataInstance() {
+ return new LectureData();
+ }
}
\ No newline at end of file
Modified: WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/OrganizationModel.java
===================================================================
--- WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/OrganizationModel.java 2008-05-06 22:43:58 UTC (rev 96)
+++ WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/OrganizationModel.java 2008-05-07 08:48:34 UTC (rev 97)
@@ -9,7 +9,7 @@
public OrganizationModel(){
super();
isContainerItem = true;
- modelName = "Organization";
+ modelName = "OrganizationModel";
}
@Override
@@ -35,11 +35,6 @@
}
@Override
- public void addItem(TreeItem parent) {
- System.out.print("Can't add Organization into course.");
- }
-
- @Override
public boolean isApplaingForItem(TreeItem treeItem){
return treeItem.getClass() == Organization.class;
}
Modified: WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/ResourcedItemModel.java
===================================================================
--- WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/ResourcedItemModel.java 2008-05-06 22:43:58 UTC (rev 96)
+++ WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/ResourcedItemModel.java 2008-05-07 08:48:34 UTC (rev 97)
@@ -1,26 +1,35 @@
package edu.lnu.FireFly.WebEditor.ItemModels;
+import java.io.StringReader;
import java.util.UUID;
import edu.lnu.FireFly.FFManifest.TreeItem;
import edu.lnu.FireFly.FFManifest.item.Item;
import edu.lnu.FireFly.WebEditor.GUI.TreeDataModel;
+import edu.lnu.FireFly.WebEditor.WSClients.WebEditorServiceClient;
public abstract class ResourcedItemModel extends ItemModel {
@Override
- public void addItem(TreeItem parent) {
+ public final void addItem(TreeItem parent) {
+
+ if (this.getClass() == OrganizationModel.class){
+ System.out.println("Can't add Organization into course.");
+ return ;
+ }
+
Item item = new Item();
item.setParent(parent);
- item.identifier = this.getClass().getSimpleName() + "_Item_" + UUID.randomUUID().toString();
+ item.identifier = this.getClass().getSimpleName() + "_Item_"
+ + UUID.randomUUID().toString();
item.title = "New " + modelName;
item.parameters = "pageType=" + modelName;
item.identifierref = createNewResource();
initializeDataForItem(item);
-
+
try {
parent.addChild(item);
TreeDataModel.getInstance().treeNodesInserted(item);
@@ -32,6 +41,19 @@
ConfigureItem(item);
}
+ protected final String loadResource(String location, String identifier) {
+ String res = "";
+
+ if (location.equalsIgnoreCase("course")) {
+ res = WebEditorServiceClient.getFileContent(identifier + ".conf",
+ location);
+ } else {
+ res = WebEditorServiceClient.getFileContent(modelName + ".conf",
+ location);
+ }
+ return res;
+ }
+
@Override
public boolean isApplaingForItem(TreeItem treeItem) {
if (treeItem.getClass() != Item.class) {
@@ -63,4 +85,34 @@
((Item) item).title = newTitle;
TreeDataModel.getInstance().treeNodesChanged(item);
}
+
+ public final boolean synchronizeItemWithResource(TreeItem anItem, String location)
+ {
+ String res = loadResource(location, getIdentifier(anItem));
+
+ if (res == null || res.trim().equals("")) {
+ return false;
+ }
+
+ ItemData itemData = getItemData(anItem);
+
+ if (itemData == null) {
+ itemData = createItemDataInstance();
+ setItemData(anItem, itemData);
+ }
+
+ itemData.unmarshal(new StringReader(res), anItem);
+
+ return true;
+ }
+
+ protected final void initializeDataForItem(Item anItem){
+ ItemData itemData = createItemDataInstance();
+
+ String res = loadResource("template", getIdentifier(anItem));
+
+ itemData.unmarshal(new StringReader(res), anItem);
+
+ setItemData(anItem, itemData);
+ }
}
Modified: WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/SimpleQuestion/SimpleQuestionData.java
===================================================================
--- WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/SimpleQuestion/SimpleQuestionData.java 2008-05-06 22:43:58 UTC (rev 96)
+++ WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/SimpleQuestion/SimpleQuestionData.java 2008-05-07 08:48:34 UTC (rev 97)
@@ -1,5 +1,13 @@
package edu.lnu.FireFly.WebEditor.ItemModels.SimpleQuestion;
+import java.io.Reader;
+import java.util.Iterator;
+
+import org.dom4j.Document;
+import org.dom4j.Element;
+import org.dom4j.io.SAXReader;
+
+import edu.lnu.FireFly.FFManifest.TreeItem;
import edu.lnu.FireFly.WebEditor.ItemModels.ItemData;
public class SimpleQuestionData extends ItemData {
@@ -25,4 +33,45 @@
public void setQuestion(String question) {
this.question = question;
}
+
+ @SuppressWarnings("unchecked")
+ public boolean unmarshal(Reader res, TreeItem anItem) {
+ SAXReader reader = new SAXReader();
+
+ Document doc = null;
+ try {
+ doc = reader.read(res);
+
+ Element root = doc.getRootElement();
+ Element answers = root.element("answers");
+
+ setCaption(root.elementTextTrim("caption"));
+ setQuestion(root.elementTextTrim("question"));
+
+ boolean showOnSP = Boolean.valueOf(root
+ .elementTextTrim("ShowOnSummaryPage"));
+ setShowOnSummaryPage(showOnSP);
+
+ getAnswers().setSingleVariant(
+ answers.attributeValue("singleVariant").equalsIgnoreCase(
+ "true"));
+
+ getAnswers().answers.clear();
+
+ Iterator<Element> iter = answers.elementIterator("answer");
+ while (iter.hasNext()) {
+ Element answer = iter.next();
+ SimpleQuestionAnswer ans = new SimpleQuestionAnswer(answer
+ .getText());
+ ans.setAnswerPoint(Double.valueOf(answer
+ .attributeValue("point")));
+ getAnswers().answers.add(ans);
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ return false;
+ }
+
+ return true;
+ }
}
Modified: WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/SimpleQuestion/SimpleQuestionModel.java
===================================================================
--- WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/SimpleQuestion/SimpleQuestionModel.java 2008-05-06 22:43:58 UTC (rev 96)
+++ WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/SimpleQuestion/SimpleQuestionModel.java 2008-05-07 08:48:34 UTC (rev 97)
@@ -1,12 +1,10 @@
package edu.lnu.FireFly.WebEditor.ItemModels.SimpleQuestion;
-import java.io.StringReader;
import java.util.Iterator;
import org.dom4j.Document;
import org.dom4j.DocumentHelper;
import org.dom4j.Element;
-import org.dom4j.io.SAXReader;
import edu.lnu.FireFly.FFManifest.TreeItem;
import edu.lnu.FireFly.FFManifest.item.Item;
@@ -15,18 +13,13 @@
import edu.lnu.FireFly.WebEditor.Data.SummaryPageManager;
import edu.lnu.FireFly.WebEditor.GUI.TreeDataModel;
import edu.lnu.FireFly.WebEditor.GUI.Dialogs.SimpleQuestionPropertiestsDlg;
+import edu.lnu.FireFly.WebEditor.ItemModels.ItemData;
import edu.lnu.FireFly.WebEditor.ItemModels.ResourcedItemModel;
import edu.lnu.FireFly.WebEditor.ItemModels.Template;
import edu.lnu.FireFly.WebEditor.WSClients.WebEditorServiceClient;
public class SimpleQuestionModel extends ResourcedItemModel {
-
@Override
- protected void initializeDataForItem(Item anItem) {
- initializeDataForItem(anItem, new SimpleQuestionData());
- }
-
- @Override
public boolean getLimitConditionsMenuVisible() {
return true;
}
@@ -37,7 +30,7 @@
}
public SimpleQuestionModel() {
- modelName = "SimpleQuestion";
+ modelName = "SimpleQuestionModel";
}
@Override
@@ -61,8 +54,7 @@
.getItemPath(item));
}
- public SimpleQuestionData getData(TreeItem item)
- throws SimpleQuestionException {
+ public SimpleQuestionData getData(TreeItem item) {
return ((SimpleQuestionData) getItemData(item));
}
@@ -98,115 +90,65 @@
TreeDataModel.getInstance().treeNodesChanged(item);
}
- @Override
- @SuppressWarnings("unchecked")
- public boolean synchronizeItemWithResource(TreeItem anItem) {
- Resource resource = WebEditor.instance.getManifest().resources
- .findResourceByIdentifier(((Item)anItem).identifierref);
-
- String res = WebEditorServiceClient.getFileContent(resource.identifier
- + ".conf", "course");
-
- SAXReader reader = new SAXReader();
-
- initializeDataForItem(anItem, new SimpleQuestionData());
-
- Document doc = null;
- try {
- doc = reader.read(new StringReader(res));
-
- Element root = doc.getRootElement();
- Element answers = root.element("answers");
-
- SimpleQuestionData itemData = getData(anItem);
- itemData.setCaption(root.elementTextTrim("caption"));
- itemData.setQuestion(root.elementTextTrim("question"));
-
- boolean showOnSP = Boolean.valueOf(root
- .elementTextTrim("ShowOnSummaryPage"));
- itemData.setShowOnSummaryPage(showOnSP);
-
- itemData.getAnswers().setSingleVariant(
- answers.attributeValue("singleVariant").equalsIgnoreCase(
- "true"));
-
- itemData.getAnswers().answers.clear();
-
- Iterator<Element> iter = answers.elementIterator("answer");
- while (iter.hasNext()) {
- Element answer = iter.next();
- SimpleQuestionAnswer ans = new SimpleQuestionAnswer(answer
- .getText());
- ans.setAnswerPoint(Double.valueOf(answer
- .attributeValue("point")));
- itemData.getAnswers().answers.add(ans);
- }
- } catch (Exception e) {
- e.printStackTrace();
- return false;
- }
-
- return true;
+ protected ItemData createItemDataInstance() {
+ return new SimpleQuestionData();
}
@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);
- try {
- SimpleQuestionData itemData = getData(anItem);
-
- template.setProperty("Caption", itemData.getCaption());
- template.setProperty("Question", itemData.getQuestion());
+ SimpleQuestionData itemData = getData(anItem);
- Iterator<SimpleQuestionAnswer> iter = itemData.getAnswers().answers
- .iterator();
- String answers = "\r\nsetSingleVariant("
- + itemData.getAnswers().getSingleVariant() + ");\r\n";
+ template.setProperty("Caption", itemData.getCaption());
+ template.setProperty("Question", itemData.getQuestion());
- while (iter.hasNext()) {
- SimpleQuestionAnswer answer = iter.next();
- answers += "addAnswer(\"" + answer.getAnswerText() + "\", "
- + answer.getAnswerPoint() + ");" + "\r\n";
- }
+ Iterator<SimpleQuestionAnswer> iter = itemData.getAnswers().answers
+ .iterator();
+ String answers = "\r\nsetSingleVariant("
+ + itemData.getAnswers().getSingleVariant() + ");\r\n";
- template.setProperty("answers", answers);
- template.updateResource();
+ while (iter.hasNext()) {
+ SimpleQuestionAnswer answer = iter.next();
+ answers += "addAnswer(\"" + answer.getAnswerText() + "\", "
+ + answer.getAnswerPoint() + ");" + "\r\n";
+ }
- Document doc = DocumentHelper.createDocument();
- Element root = doc.addElement(modelName);
- root.addElement("caption").setText(itemData.getCaption());
- root.addElement("question").setText(itemData.getQuestion());
+ template.setProperty("answers", answers);
+ template.updateResource();
- root.addElement("ShowOnSummaryPage").setText(
- String.valueOf(itemData.getShowOnSummaryPage()));
+ Document doc = DocumentHelper.createDocument();
+ Element root = doc.addElement(modelName);
+ root.addElement("caption").setText(itemData.getCaption());
+ root.addElement("question").setText(itemData.getQuestion());
- Element ans = root.addElement("answers");
+ root.addElement("ShowOnSummaryPage").setText(
+ String.valueOf(itemData.getShowOnSummaryPage()));
- ans.addAttribute("singleVariant", String.valueOf(itemData
- .getAnswers().getSingleVariant()));
+ Element ans = root.addElement("answers");
- iter = itemData.getAnswers().answers.iterator();
+ ans.addAttribute("singleVariant", String.valueOf(itemData.getAnswers()
+ .getSingleVariant()));
- while (iter.hasNext()) {
- SimpleQuestionAnswer answer = iter.next();
+ iter = itemData.getAnswers().answers.iterator();
- Element ansEl = ans.addElement("answer");
- ansEl.addAttribute("point", String.valueOf(answer
- .getAnswerPoint()));
- ansEl.setText(answer.getAnswerText());
- }
+ while (iter.hasNext()) {
+ SimpleQuestionAnswer answer = iter.next();
- WebEditorServiceClient.setFileContent(
- resource.identifier + ".conf", doc.asXML());
- } catch (SimpleQuestionException e) {
- e.printStackTrace();
- return false;
+ Element ansEl = ans.addElement("answer");
+ ansEl
+ .addAttribute("point", String.valueOf(answer
+ .getAnswerPoint()));
+ ansEl.setText(answer.getAnswerText());
}
+ WebEditorServiceClient.setFileContent(resource.identifier + ".conf",
+ doc.asXML());
+
SummaryPageManager.getInstance().updateSummaryPages();
return true;
Modified: WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/SummaryPageModel/SummaryPageData.java
===================================================================
--- WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/SummaryPageModel/SummaryPageData.java 2008-05-06 22:43:58 UTC (rev 96)
+++ WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/SummaryPageModel/SummaryPageData.java 2008-05-07 08:48:34 UTC (rev 97)
@@ -1,12 +1,20 @@
package edu.lnu.FireFly.WebEditor.ItemModels.SummaryPageModel;
+import java.io.Reader;
+
+import edu.lnu.FireFly.FFManifest.TreeItem;
import edu.lnu.FireFly.WebEditor.ItemModels.ItemData;
public class SummaryPageData extends ItemData {
@Override
+ public boolean unmarshal(Reader res, TreeItem anItem) {
+ // TODO Auto-generated method stub
+ return true;
+ }
+
+ @Override
public Boolean getShowOnSummaryPage() {
- // It can be show on summary page
return false;
}
}
Modified: WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/SummaryPageModel/SummaryPageModel.java
===================================================================
--- WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/SummaryPageModel/SummaryPageModel.java 2008-05-06 22:43:58 UTC (rev 96)
+++ WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/SummaryPageModel/SummaryPageModel.java 2008-05-07 08:48:34 UTC (rev 97)
@@ -8,6 +8,7 @@
import edu.lnu.FireFly.FFManifest.resource.Resource;
import edu.lnu.FireFly.WebEditor.WebEditor;
import edu.lnu.FireFly.WebEditor.ItemModels.ChapterModel;
+import edu.lnu.FireFly.WebEditor.ItemModels.ItemData;
import edu.lnu.FireFly.WebEditor.ItemModels.ItemModel;
import edu.lnu.FireFly.WebEditor.ItemModels.ItemModels;
import edu.lnu.FireFly.WebEditor.ItemModels.OrganizationModel;
@@ -19,11 +20,6 @@
public class SummaryPageModel extends ResourcedItemModel {
@Override
- protected void initializeDataForItem(Item anItem) {
- initializeDataForItem(anItem, new SummaryPageData());
- }
-
- @Override
public boolean getLimitConditionsMenuVisible() {
return false;
}
@@ -34,16 +30,10 @@
}
public SummaryPageModel() {
- modelName = "SummaryPage";
+ modelName = "SummaryPageModel";
}
@Override
- public boolean synchronizeItemWithResource(TreeItem item) {
- // currently it can't any item data
- return false;
- }
-
- @Override
public boolean updateItemResource(TreeItem anItem,
boolean updateSummaryPages) {
Resource resource = WebEditor.instance.getManifest().resources
@@ -141,4 +131,9 @@
return false;
}
+ @Override
+ protected ItemData createItemDataInstance() {
+ return new SummaryPageData();
+ }
+
}
Modified: WebEditor/src/edu/lnu/FireFly/WebEditor/WebEditor.java
===================================================================
--- WebEditor/src/edu/lnu/FireFly/WebEditor/WebEditor.java 2008-05-06 22:43:58 UTC (rev 96)
+++ WebEditor/src/edu/lnu/FireFly/WebEditor/WebEditor.java 2008-05-07 08:48:34 UTC (rev 97)
@@ -120,7 +120,7 @@
OrganizationModel model = (OrganizationModel) ItemModels
.getModelFromItem(root);
- model.synchronizeItemWithResource(root);
+ model.synchronizeItemWithResource(root, "template");
SummaryPageManager.getInstance().updateSummaryPages();
} catch (Exception e) {
e.printStackTrace();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <se...@us...> - 2008-05-06 22:43:52
|
Revision: 96
http://acmcontester.svn.sourceforge.net/acmcontester/?rev=96&view=rev
Author: sem62
Date: 2008-05-06 15:43:58 -0700 (Tue, 06 May 2008)
Log Message:
-----------
modofied creating resource process.
Modified Paths:
--------------
WebEditor/service/getFileContent.php
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/Template.java
WebEditor/src/edu/lnu/FireFly/WebEditor/WSClients/WebEditorServiceClient.java
WebEditor/src/edu/lnu/FireFly/WebEditor/WebEditor.java
Removed Paths:
-------------
WebEditor/service/copyFromTemplate.php
Deleted: WebEditor/service/copyFromTemplate.php
===================================================================
--- WebEditor/service/copyFromTemplate.php 2008-05-06 21:59:28 UTC (rev 95)
+++ WebEditor/service/copyFromTemplate.php 2008-05-06 22:43:58 UTC (rev 96)
@@ -1,10 +0,0 @@
-<?
- require_once("config.inc.php");
-
- if (isset($_POST['fNameInTemplate']) && isset($_POST['fNameInCourse'])){
- $log = fopen('service.txt', 'a');
- $source = $template_location . $_POST['fNameInTemplate'];
- $dest = $course_location . $_POST['fNameInCourse'];
- echo copy($source, $dest);
- }
-?>
\ No newline at end of file
Modified: WebEditor/service/getFileContent.php
===================================================================
--- WebEditor/service/getFileContent.php 2008-05-06 21:59:28 UTC (rev 95)
+++ WebEditor/service/getFileContent.php 2008-05-06 22:43:58 UTC (rev 96)
@@ -1,7 +1,11 @@
<?
require_once("config.inc.php");
- if (isset($_POST['fName'])){
- readfile ($course_location . $_POST['fName']);
+ if (isset($_POST['fName']) && isset($_POST['location'])){
+ if ($_POST['location'] == "course"){
+ readfile ($course_location . $_POST['fName']);
+ } else {
+ readfile ($template_location . $_POST['fName']);
+ }
}
?>
\ No newline at end of file
Modified: WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/ChapterModel.java
===================================================================
--- WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/ChapterModel.java 2008-05-06 21:59:28 UTC (rev 95)
+++ WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/ChapterModel.java 2008-05-06 22:43:58 UTC (rev 96)
@@ -145,7 +145,7 @@
identifier = ((Organization) anItem).identifier;
}
String res = WebEditorServiceClient
- .getFileContent(identifier + ".conf");
+ .getFileContent(identifier + ".conf", "course");
if (res == null || res.trim().equals("")){
return false;
Modified: WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/ItemModel.java
===================================================================
--- WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/ItemModel.java 2008-05-06 21:59:28 UTC (rev 95)
+++ WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/ItemModel.java 2008-05-06 22:43:58 UTC (rev 96)
@@ -13,7 +13,6 @@
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 {
protected static HashMap<TreeItem, ItemData> questionsData = new HashMap<TreeItem, ItemData>();
@@ -77,17 +76,7 @@
String fName = resource.identifier + ".html";
resource.setHref(fName);
- boolean copied = WebEditorServiceClient.copyFromTemplate(this
- .getClass().getSimpleName()
- + ".html", fName);
- copied = copied
- && WebEditorServiceClient.copyFromTemplate(this.getClass()
- .getSimpleName()
- + ".conf", resource.identifier + ".conf");
-
- System.out.println("copied: " + copied);
-
WebEditor.instance.getManifest().resources.resources.add(resource);
return resource.identifier;
Modified: WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/Lecture/LectureModel.java
===================================================================
--- WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/Lecture/LectureModel.java 2008-05-06 21:59:28 UTC (rev 95)
+++ WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/Lecture/LectureModel.java 2008-05-06 22:43:58 UTC (rev 96)
@@ -51,7 +51,7 @@
.findResourceByIdentifier(((Item)anItem).identifierref);
String res = WebEditorServiceClient.getFileContent(resource.identifier
- + ".conf");
+ + ".conf", "course");
SAXReader reader = new SAXReader();
@@ -60,6 +60,7 @@
doc = reader.read(new StringReader(res));
} catch (Exception e) {
e.printStackTrace();
+ return false;
}
Element root = doc.getRootElement();
@@ -90,8 +91,6 @@
@Override
public void ConfigureItem(TreeItem item) {
- synchronizeItemWithResource((Item) item);
-
new LecturePropertiestsDlg().showDialog(item);
TreeDataModel.getInstance().treeNodesChanged(item);
WebEditor.tree.setSelectionPath(null);
Modified: WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/ResourcedItemModel.java
===================================================================
--- WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/ResourcedItemModel.java 2008-05-06 21:59:28 UTC (rev 95)
+++ WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/ResourcedItemModel.java 2008-05-06 22:43:58 UTC (rev 96)
@@ -29,9 +29,6 @@
return;
}
- synchronizeItemWithResource(item);
- updateItemResource(item, true);
-
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-06 21:59:28 UTC (rev 95)
+++ WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/SimpleQuestion/SimpleQuestionModel.java 2008-05-06 22:43:58 UTC (rev 96)
@@ -105,7 +105,7 @@
.findResourceByIdentifier(((Item)anItem).identifierref);
String res = WebEditorServiceClient.getFileContent(resource.identifier
- + ".conf");
+ + ".conf", "course");
SAXReader reader = new SAXReader();
Modified: WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/Template.java
===================================================================
--- WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/Template.java 2008-05-06 21:59:28 UTC (rev 95)
+++ WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/Template.java 2008-05-06 22:43:58 UTC (rev 96)
@@ -51,22 +51,17 @@
}
public boolean updateResource() {
- boolean copied = WebEditorServiceClient.copyFromTemplate(model
- .getClass().getSimpleName()
- + ".html", fileName);
+ String templateFileName = model.getClass().getSimpleName() + ".html";
- if (!copied){
- return false;
- }
-
- String res = WebEditorServiceClient.getFileContent(fileName);
+ String res = WebEditorServiceClient.getFileContent(templateFileName,
+ "template");
Iterator<String> iter = propertiests.keySet().iterator();
while (iter.hasNext()) {
String name = iter.next();
res = insertPropertyIntoResource(res, name, propertiests.get(name));
-
- if (res == null){
+
+ if (res == null) {
System.out.print("Property \"" + name + "\" isn't present.\n");
return false;
}
Modified: WebEditor/src/edu/lnu/FireFly/WebEditor/WSClients/WebEditorServiceClient.java
===================================================================
--- WebEditor/src/edu/lnu/FireFly/WebEditor/WSClients/WebEditorServiceClient.java 2008-05-06 21:59:28 UTC (rev 95)
+++ WebEditor/src/edu/lnu/FireFly/WebEditor/WSClients/WebEditorServiceClient.java 2008-05-06 22:43:58 UTC (rev 96)
@@ -10,13 +10,23 @@
import edu.lnu.FireFly.WebEditor.Settings;
public class WebEditorServiceClient {
- public static String getFileContent(String fName) {
+ /**
+ * @param fName File name
+ * @param location Location name = template | course
+ * @return
+ */
+ public static String getFileContent(String fName, String location) {
+ System.out.println("Getting file's content (fName=" + fName + "; location=" + location + ")...");
+
String result = "";
try {
// Construct data
String data = URLEncoder.encode("fName", "UTF-8") + "="
+ URLEncoder.encode(fName, "UTF-8");
+ data += "&" + URLEncoder.encode("location", "UTF-8") + "="
+ + URLEncoder.encode(location, "UTF-8");
+
// Send data
URL url = new URL(Settings.getInstance().getServiceLocation()
+ "getFileContent.php");
@@ -43,10 +53,13 @@
e.printStackTrace();
}
+ System.out.print("result: " + result);
return result;
}
public static void setFileContent(String fName, String content) {
+ System.out.println("Setting file's content (fName=" + fName + ")...");
+
String result = "";
try {
// Construct data
@@ -85,45 +98,45 @@
System.out.println(result);
}
- public static boolean copyFromTemplate(String fNameInTemplate,
- String fNameInCourse) {
- String result = "";
- try {
- // Construct data
- String data = URLEncoder.encode("fNameInTemplate", "UTF-8") + "="
- + URLEncoder.encode(fNameInTemplate, "UTF-8");
- data += "&" + URLEncoder.encode("fNameInCourse", "UTF-8") + "="
- + URLEncoder.encode(fNameInCourse, "UTF-8");
-
- // Send data
- URL url = new URL(Settings.getInstance().getServiceLocation()
- + "copyFromTemplate.php");
-
- URLConnection conn = url.openConnection();
- conn.setDoOutput(true);
-
- OutputStreamWriter wr = new OutputStreamWriter(conn
- .getOutputStream());
-
- wr.write(data);
- wr.flush();
-
- // Get the response
- BufferedReader rd = new BufferedReader(new InputStreamReader(conn
- .getInputStream()));
- String line;
- while ((line = rd.readLine()) != null) {
- result += line + "\n";
- }
- wr.close();
- rd.close();
- } catch (Exception e) {
- e.printStackTrace();
- }
-
- System.out.println("copyFromTemplate(). result is:");
- System.out.println(result);
-
- return true;
- }
+// public static boolean copyFromTemplate(String fNameInTemplate,
+// String fNameInCourse) {
+// String result = "";
+// try {
+// // Construct data
+// String data = URLEncoder.encode("fNameInTemplate", "UTF-8") + "="
+// + URLEncoder.encode(fNameInTemplate, "UTF-8");
+// data += "&" + URLEncoder.encode("fNameInCourse", "UTF-8") + "="
+// + URLEncoder.encode(fNameInCourse, "UTF-8");
+//
+// // Send data
+// URL url = new URL(Settings.getInstance().getServiceLocation()
+// + "copyFromTemplate.php");
+//
+// URLConnection conn = url.openConnection();
+// conn.setDoOutput(true);
+//
+// OutputStreamWriter wr = new OutputStreamWriter(conn
+// .getOutputStream());
+//
+// wr.write(data);
+// wr.flush();
+//
+// // Get the response
+// BufferedReader rd = new BufferedReader(new InputStreamReader(conn
+// .getInputStream()));
+// String line;
+// while ((line = rd.readLine()) != null) {
+// result += line + "\n";
+// }
+// wr.close();
+// rd.close();
+// } catch (Exception e) {
+// e.printStackTrace();
+// }
+//
+// System.out.println("copyFromTemplate(). result is:");
+// System.out.println(result);
+//
+// return true;
+// }
}
Modified: WebEditor/src/edu/lnu/FireFly/WebEditor/WebEditor.java
===================================================================
--- WebEditor/src/edu/lnu/FireFly/WebEditor/WebEditor.java 2008-05-06 21:59:28 UTC (rev 95)
+++ WebEditor/src/edu/lnu/FireFly/WebEditor/WebEditor.java 2008-05-06 22:43:58 UTC (rev 96)
@@ -71,7 +71,7 @@
private void openManifest() throws TestDocException {
Parser parser = new Parser();
manifest = parser.fromXML(WebEditorServiceClient
- .getFileContent("imsmanifest.xml"));
+ .getFileContent("imsmanifest.xml", "course"));
TreeDataModel.initInstance(manifest);
ItemModels.initializeAllItemDatas(manifest.getRoot());
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <se...@us...> - 2008-05-06 21:59:23
|
Revision: 95
http://acmcontester.svn.sourceforge.net/acmcontester/?rev=95&view=rev
Author: sem62
Date: 2008-05-06 14:59:28 -0700 (Tue, 06 May 2008)
Log Message:
-----------
Deleted unneeded files
Removed Paths:
-------------
WebEditor/src/edu/lnu/FireFly/WebEditor/WSClients/CopyFromTemplateWSRequest.java
WebEditor/src/edu/lnu/FireFly/WebEditor/WSClients/CopyFromTemplateWSResponse.java
WebEditor/src/edu/lnu/FireFly/WebEditor/WSClients/GetFileContentWSRequest.java
WebEditor/src/edu/lnu/FireFly/WebEditor/WSClients/GetFileContentWSResponse.java
WebEditor/src/edu/lnu/FireFly/WebEditor/WSClients/SetFileContentWSRequest.java
WebEditor/src/edu/lnu/FireFly/WebEditor/WSClients/WSConnection.java
WebEditor/src/edu/lnu/FireFly/WebEditor/WSClients/WSRequest.java
Deleted: WebEditor/src/edu/lnu/FireFly/WebEditor/WSClients/CopyFromTemplateWSRequest.java
===================================================================
--- WebEditor/src/edu/lnu/FireFly/WebEditor/WSClients/CopyFromTemplateWSRequest.java 2008-05-06 21:53:32 UTC (rev 94)
+++ WebEditor/src/edu/lnu/FireFly/WebEditor/WSClients/CopyFromTemplateWSRequest.java 2008-05-06 21:59:28 UTC (rev 95)
@@ -1,9 +0,0 @@
-package edu.lnu.FireFly.WebEditor.WSClients;
-
-public class CopyFromTemplateWSRequest extends WSRequest {
- public CopyFromTemplateWSRequest(String fNameInTemplate, String fNameInCourse){
- setMethodName("copyFromTemplate");
- addParameter("fNameInTemplate", fNameInTemplate);
- addParameter("fNameInCourse", fNameInCourse);
- }
-}
Deleted: WebEditor/src/edu/lnu/FireFly/WebEditor/WSClients/CopyFromTemplateWSResponse.java
===================================================================
--- WebEditor/src/edu/lnu/FireFly/WebEditor/WSClients/CopyFromTemplateWSResponse.java 2008-05-06 21:53:32 UTC (rev 94)
+++ WebEditor/src/edu/lnu/FireFly/WebEditor/WSClients/CopyFromTemplateWSResponse.java 2008-05-06 21:59:28 UTC (rev 95)
@@ -1,15 +0,0 @@
-package edu.lnu.FireFly.WebEditor.WSClients;
-
-import org.dom4j.Document;
-
-public class CopyFromTemplateWSResponse {
- public static Boolean getValue(Document doc)
- {
- try{
- return Boolean.valueOf(doc.getRootElement().element("Body").element("copyFromTemplateResponse").element("return").getText());
- }
- catch (NullPointerException e) {
- return null;
- }
- }
-}
Deleted: WebEditor/src/edu/lnu/FireFly/WebEditor/WSClients/GetFileContentWSRequest.java
===================================================================
--- WebEditor/src/edu/lnu/FireFly/WebEditor/WSClients/GetFileContentWSRequest.java 2008-05-06 21:53:32 UTC (rev 94)
+++ WebEditor/src/edu/lnu/FireFly/WebEditor/WSClients/GetFileContentWSRequest.java 2008-05-06 21:59:28 UTC (rev 95)
@@ -1,8 +0,0 @@
-package edu.lnu.FireFly.WebEditor.WSClients;
-
-public class GetFileContentWSRequest extends WSRequest {
- public GetFileContentWSRequest(String fName){
- setMethodName("getFileContent");
- addParameter("fName", fName);
- }
-}
Deleted: WebEditor/src/edu/lnu/FireFly/WebEditor/WSClients/GetFileContentWSResponse.java
===================================================================
--- WebEditor/src/edu/lnu/FireFly/WebEditor/WSClients/GetFileContentWSResponse.java 2008-05-06 21:53:32 UTC (rev 94)
+++ WebEditor/src/edu/lnu/FireFly/WebEditor/WSClients/GetFileContentWSResponse.java 2008-05-06 21:59:28 UTC (rev 95)
@@ -1,16 +0,0 @@
-package edu.lnu.FireFly.WebEditor.WSClients;
-
-import org.dom4j.Document;
-
-public class GetFileContentWSResponse {
-
- public static String getValue(Document doc)
- {
- try{
- return doc.getRootElement().element("Body").element("getFileContentResponse").element("return").getText();
- }
- catch (NullPointerException e) {
- return null;
- }
- }
-}
Deleted: WebEditor/src/edu/lnu/FireFly/WebEditor/WSClients/SetFileContentWSRequest.java
===================================================================
--- WebEditor/src/edu/lnu/FireFly/WebEditor/WSClients/SetFileContentWSRequest.java 2008-05-06 21:53:32 UTC (rev 94)
+++ WebEditor/src/edu/lnu/FireFly/WebEditor/WSClients/SetFileContentWSRequest.java 2008-05-06 21:59:28 UTC (rev 95)
@@ -1,9 +0,0 @@
-package edu.lnu.FireFly.WebEditor.WSClients;
-
-public class SetFileContentWSRequest extends WSRequest {
- public SetFileContentWSRequest(String fName, String fContent){
- setMethodName("setFileContent");
- addParameter("fName", fName);
- addParameter("content", fContent);
- }
-}
Deleted: WebEditor/src/edu/lnu/FireFly/WebEditor/WSClients/WSConnection.java
===================================================================
--- WebEditor/src/edu/lnu/FireFly/WebEditor/WSClients/WSConnection.java 2008-05-06 21:53:32 UTC (rev 94)
+++ WebEditor/src/edu/lnu/FireFly/WebEditor/WSClients/WSConnection.java 2008-05-06 21:59:28 UTC (rev 95)
@@ -1,100 +0,0 @@
-package edu.lnu.FireFly.WebEditor.WSClients;
-
-import java.io.IOException;
-import java.net.HttpURLConnection;
-import java.net.ProtocolException;
-import java.net.URL;
-
-import org.dom4j.Document;
-import org.dom4j.DocumentException;
-import org.dom4j.DocumentFactory;
-import org.dom4j.Element;
-import org.dom4j.Namespace;
-import org.dom4j.QName;
-import org.dom4j.io.SAXReader;
-import org.xml.sax.SAXException;
-
-public class WSConnection {
- public Document invoke(WSRequest request){
- Document requestBody = createRequestBody(request);
-
- HttpURLConnection conn = null;
- try {
- conn = (HttpURLConnection)url.openConnection();
- } catch (IOException e1) {
- e1.printStackTrace();
- return null;
- }
-
- try {
- conn.setRequestMethod("POST");
- } catch (ProtocolException e) {
- e.printStackTrace();
- return null;
- }
-
- conn.addRequestProperty("Content-Type", "text/xml; charset=utf-8");
- conn.setDoOutput(true);
- conn.setDoInput(true);
- try {
- conn.connect();
- } catch (IOException e1) {
- e1.printStackTrace();
- return null;
- }
-
- try{
- conn.getOutputStream().write(requestBody.asXML().getBytes("utf-8"));
- }
- catch (Exception e) {
- e.printStackTrace();
- return null;
- }
-
- SAXReader reader = new SAXReader();
- try {
- reader.setFeature("http://xml.org/sax/features/namespaces", true);
- } catch (SAXException e) {
- e.printStackTrace();
- return null;
- }
-
- try {
- return reader.read(conn.getInputStream());
- } catch (DocumentException e) {
- e.printStackTrace();
- return null;
- } catch (IOException e) {
- e.printStackTrace();
- return null;
- }
- }
-
- protected Document createRequestBody(WSRequest request){
- Document doc = DocumentFactory.getInstance().createDocument();
-
- Element soap = DocumentFactory.getInstance().createElement(new QName("soap:Envelope"));
- soap.add(new Namespace("soap", "http://schemas.xmlsoap.org/soap/envelope/"));
-
- Element header = DocumentFactory.getInstance().createElement(new QName("soap:Header"));
- Element body = DocumentFactory.getInstance().createElement(new QName("soap:Body"));
-
- doc.add(soap);
- soap.add(header);
- soap.add(body);
- body.add(request.getMethodElement("http://WebEditorServer.FireFly.lnu.edu/"));
-
- return doc;
- }
-
- protected void setServiseNameSpace(String namespace){
- this.namespace = namespace;
- }
-
- public void setServiceURL(URL url){
- this.url = url;
- }
-
- protected URL url;
- protected String namespace;
-}
Deleted: WebEditor/src/edu/lnu/FireFly/WebEditor/WSClients/WSRequest.java
===================================================================
--- WebEditor/src/edu/lnu/FireFly/WebEditor/WSClients/WSRequest.java 2008-05-06 21:53:32 UTC (rev 94)
+++ WebEditor/src/edu/lnu/FireFly/WebEditor/WSClients/WSRequest.java 2008-05-06 21:59:28 UTC (rev 95)
@@ -1,36 +0,0 @@
-package edu.lnu.FireFly.WebEditor.WSClients;
-
-import org.dom4j.DocumentFactory;
-import org.dom4j.Element;
-import org.dom4j.Namespace;
-import org.dom4j.QName;
-import java.util.*;
-
-public class WSRequest {
- protected void addParameter(String name, Object value) {
- parameters.put(name, value);
- }
-
- protected void setMethodName(String name) {
- methodName = name;
- }
-
- public final Element getMethodElement(String namespace) {
- Element method = DocumentFactory.getInstance().createElement(new QName("ns:" + methodName));
-
- method.add(new Namespace("ns", namespace));
-
- Object[] keys = parameters.keySet().toArray();
-
- for (int i = 0; i < keys.length; i++){
- Element param = DocumentFactory.getInstance().createElement(new QName(keys[i].toString()));
- param.setText(parameters.get(keys[i]).toString());
- method.add(param);
- }
-
- return method;
- }
-
- private HashMap<String, Object> parameters = new HashMap<String, Object>();
- private String methodName = "";
-}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <se...@us...> - 2008-05-06 21:53:25
|
Revision: 94
http://acmcontester.svn.sourceforge.net/acmcontester/?rev=94&view=rev
Author: sem62
Date: 2008-05-06 14:53:32 -0700 (Tue, 06 May 2008)
Log Message:
-----------
added label to printing value.
Modified Paths:
--------------
WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/ItemModel.java
Modified: WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/ItemModel.java
===================================================================
--- WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/ItemModel.java 2008-05-06 21:52:13 UTC (rev 93)
+++ WebEditor/src/edu/lnu/FireFly/WebEditor/ItemModels/ItemModel.java 2008-05-06 21:53:32 UTC (rev 94)
@@ -86,7 +86,7 @@
.getSimpleName()
+ ".conf", resource.identifier + ".conf");
- System.out.print(copied);
+ System.out.println("copied: " + copied);
WebEditor.instance.getManifest().resources.resources.add(resource);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <se...@us...> - 2008-05-06 21:52:14
|
Revision: 93
http://acmcontester.svn.sourceforge.net/acmcontester/?rev=93&view=rev
Author: sem62
Date: 2008-05-06 14:52:13 -0700 (Tue, 06 May 2008)
Log Message:
-----------
Corrected bug with "Show summary page" menu.
Menu checked state was not set to current state before show menu. This gives bug.
Modified Paths:
--------------
WebEditor/src/edu/lnu/FireFly/WebEditor/GUI/CourseTreePopupMenu.java
Modified: WebEditor/src/edu/lnu/FireFly/WebEditor/GUI/CourseTreePopupMenu.java
===================================================================
--- WebEditor/src/edu/lnu/FireFly/WebEditor/GUI/CourseTreePopupMenu.java 2008-05-06 11:22:53 UTC (rev 92)
+++ WebEditor/src/edu/lnu/FireFly/WebEditor/GUI/CourseTreePopupMenu.java 2008-05-06 21:52:13 UTC (rev 93)
@@ -207,6 +207,13 @@
showSummaryPageMenuItem.setVisible(model
.getShowSummaryPageMenuVisible());
+ if (model.getShowSummaryPageMenuVisible()) {
+ ChapterModel chapterModel = (ChapterModel) model;
+
+ showSummaryPageMenuItem.setState(chapterModel
+ .getShowSummaryPage(manifestItem));
+ }
+
addItemMenu.setVisible(model.isContainer()
&& ItemModels.getAllModels().size() > 0);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <se...@us...> - 2008-05-06 11:22:54
|
Revision: 92
http://acmcontester.svn.sourceforge.net/acmcontester/?rev=92&view=rev
Author: sem62
Date: 2008-05-06 04:22:53 -0700 (Tue, 06 May 2008)
Log Message:
-----------
Modified summary page.
Modified Paths:
--------------
WebEditor/src/edu/lnu/FireFly/WebEditor/WebEditor.java
WebEditor/template/LectureModel.html
WebEditor/template/global/SummaryPage.js
Added Paths:
-----------
WebEditor/template/global/images/
WebEditor/template/global/images/completed.gif
WebEditor/template/global/images/incomplete.gif
WebEditor/template/global/images/undefined.gif
Modified: WebEditor/src/edu/lnu/FireFly/WebEditor/WebEditor.java
===================================================================
--- WebEditor/src/edu/lnu/FireFly/WebEditor/WebEditor.java 2008-05-06 09:48:50 UTC (rev 91)
+++ WebEditor/src/edu/lnu/FireFly/WebEditor/WebEditor.java 2008-05-06 11:22:53 UTC (rev 92)
@@ -41,7 +41,7 @@
public static WebEditor instance = null;
- protected Manifest manifest = ManifestFactory.createManifest();
+ protected Manifest manifest = null;
protected JMenuItem openMenuItem = null;
@@ -84,7 +84,6 @@
@Override
public void init() {
-
Settings.getInstance().setCourseLocation(getParameter("courseLocation"));
Settings.getInstance().setServiceLocation(getParameter("serviceLocation"));
Settings.getInstance().setTemplateLocation(getParameter("templateLocation"));
Modified: WebEditor/template/LectureModel.html
===================================================================
--- WebEditor/template/LectureModel.html 2008-05-06 09:48:50 UTC (rev 91)
+++ WebEditor/template/LectureModel.html 2008-05-06 11:22:53 UTC (rev 92)
@@ -3,9 +3,15 @@
<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">
+ function finish(){
+ SetValue("cmi.completionStatus", "completed");
+ Terminate();
+ }
+ </script>
</head>
-<body onload="Initialize();" onunload="Terminate();">
+<body onload="Initialize();" onunload="finish();">
<div id="lecture_caption">
<!--caption start-->New caption<!--caption end-->
</div>
Modified: WebEditor/template/global/SummaryPage.js
===================================================================
--- WebEditor/template/global/SummaryPage.js 2008-05-06 09:48:50 UTC (rev 91)
+++ WebEditor/template/global/SummaryPage.js 2008-05-06 11:22:53 UTC (rev 92)
@@ -5,7 +5,7 @@
document.write(s);
}
-function ins(title, min, max, raw){
+function ins(title, min, max, raw, completionStatus){
var percents = 100*(raw-min)/(max-min) + " %";
rowNum++;
@@ -13,7 +13,7 @@
td += 1 - (rowNum % 2) + 1;
td += "'>";
- document.write("<TR>" + td + rowNum);
+ document.write("<TR>" + td + rowNum + "<img src='global/images/" + completionStatus + ".gif'>");
document.write(td + title);
document.write(td + min);
document.write(td + max);
@@ -37,7 +37,7 @@
title = " " + title;
}
- ins(title, getScore(id, "min"), getScore(id, "max"), getScore(id, "raw"));
+ ins(title, getScore(id, "min"), getScore(id, "max"), getScore(id, "raw"), getCompletionStatus(id));
}
function getObjectiveIndex(id){
@@ -51,6 +51,13 @@
return -1;
}
+function getCompletionStatus(objectiveID){
+ var index = getObjectiveIndex(objectiveID);
+ var res = GetValue("cmi.objectives." + index + ".completionStatus");
+
+ return res != null ? res : "undefined";
+}
+
function getScore(objectiveID, field){
var index = getObjectiveIndex(objectiveID);
var res = GetValue("cmi.objectives." + index + ".score." + field);
Added: WebEditor/template/global/images/completed.gif
===================================================================
(Binary files differ)
Property changes on: WebEditor/template/global/images/completed.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: WebEditor/template/global/images/incomplete.gif
===================================================================
(Binary files differ)
Property changes on: WebEditor/template/global/images/incomplete.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: WebEditor/template/global/images/undefined.gif
===================================================================
(Binary files differ)
Property changes on: WebEditor/template/global/images/undefined.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
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.
|
|
From: <se...@us...> - 2008-05-06 09:41:37
|
Revision: 90
http://acmcontester.svn.sourceforge.net/acmcontester/?rev=90&view=rev
Author: sem62
Date: 2008-05-06 02:41:26 -0700 (Tue, 06 May 2008)
Log Message:
-----------
add file
Added Paths:
-----------
WebEditor/src/resources/api.js
Added: WebEditor/src/resources/api.js
===================================================================
--- WebEditor/src/resources/api.js (rev 0)
+++ WebEditor/src/resources/api.js 2008-05-06 09:41:26 UTC (rev 90)
@@ -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;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <se...@us...> - 2008-05-06 09:39:00
|
Revision: 89
http://acmcontester.svn.sourceforge.net/acmcontester/?rev=89&view=rev
Author: sem62
Date: 2008-05-06 02:39:02 -0700 (Tue, 06 May 2008)
Log Message:
-----------
* Added php service
* Added Settings class. It will collect all settings information.
* initalize settings value with applet's params tags.
* delete some not needed resource files.
Modified Paths:
--------------
WebEditor/src/deploy.jardesc
WebEditor/src/edu/lnu/FireFly/WebEditor/WSClients/WebEditorServiceClient.java
WebEditor/src/edu/lnu/FireFly/WebEditor/WebEditor.java
WebEditor/src/resources/index.html
Added Paths:
-----------
WebEditor/src/edu/lnu/FireFly/WebEditor/Settings.java
WebEditor/src/service/
WebEditor/src/service/config.inc.php
WebEditor/src/service/copyFromTemplate.php
WebEditor/src/service/getFileContent.php
WebEditor/src/service/setFileContent.php
Modified: WebEditor/src/deploy.jardesc
===================================================================
--- WebEditor/src/deploy.jardesc 2008-05-05 15:58:05 UTC (rev 88)
+++ WebEditor/src/deploy.jardesc 2008-05-06 09:39:02 UTC (rev 89)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="WINDOWS-1251" standalone="no"?>
<jardesc>
- <jar path="E:/ACMContester/out/web/WebEditor/webeditor.jar"/>
+ <jar path="s:/WebEditor/webeditor.jar"/>
<options buildIfNeeded="true" compress="true" descriptionLocation="/webEditor/src/deploy.jardesc" exportErrors="true" exportWarnings="true" includeDirectoryEntries="true" overwrite="true" saveDescription="true" storeRefactorings="false" useSourceFolders="false"/>
<storedRefactorings deprecationInfo="true" structuralOnly="false"/>
<selectedProjects/>
Added: WebEditor/src/edu/lnu/FireFly/WebEditor/Settings.java
===================================================================
--- WebEditor/src/edu/lnu/FireFly/WebEditor/Settings.java (rev 0)
+++ WebEditor/src/edu/lnu/FireFly/WebEditor/Settings.java 2008-05-06 09:39:02 UTC (rev 89)
@@ -0,0 +1,42 @@
+package edu.lnu.FireFly.WebEditor;
+
+public class Settings {
+ private String courseLocation = "";
+ private String templateLocation = "";
+ private String serviceLocation = "";
+
+ public static Settings obj = null;
+
+ public static Settings getInstance(){
+
+ if (obj == null){
+ obj = new Settings();
+ }
+
+ return obj;
+ }
+
+ public String getCourseLocation() {
+ return courseLocation;
+ }
+
+ public void setCourseLocation(String courseLocation) {
+ this.courseLocation = courseLocation;
+ }
+
+ public String getTemplateLocation() {
+ return templateLocation;
+ }
+
+ public void setTemplateLocation(String templateLocation) {
+ this.templateLocation = templateLocation;
+ }
+
+ public String getServiceLocation() {
+ return serviceLocation;
+ }
+
+ public void setServiceLocation(String serviceLocation) {
+ this.serviceLocation = serviceLocation;
+ }
+}
Modified: WebEditor/src/edu/lnu/FireFly/WebEditor/WSClients/WebEditorServiceClient.java
===================================================================
--- WebEditor/src/edu/lnu/FireFly/WebEditor/WSClients/WebEditorServiceClient.java 2008-05-05 15:58:05 UTC (rev 88)
+++ WebEditor/src/edu/lnu/FireFly/WebEditor/WSClients/WebEditorServiceClient.java 2008-05-06 09:39:02 UTC (rev 89)
@@ -1,51 +1,129 @@
package edu.lnu.FireFly.WebEditor.WSClients;
+import java.io.BufferedReader;
+import java.io.InputStreamReader;
+import java.io.OutputStreamWriter;
import java.net.URL;
+import java.net.URLConnection;
+import java.net.URLEncoder;
+import edu.lnu.FireFly.WebEditor.Settings;
+
public class WebEditorServiceClient {
- public static String getFileContent(String fName){
- try{
- WSConnection conn = new WSConnection();
- conn.setServiceURL(new URL ("http://localhost:8080/WebEditor/WebEditorServiceService"));
- conn.setServiseNameSpace("http://WebEditorServer.FireFly.lnu.edu/");
- String value = GetFileContentWSResponse.getValue(conn.invoke(new GetFileContentWSRequest(fName)));
+ public static String getFileContent(String fName) {
+ String result = "";
+ try {
+ // Construct data
+ String data = URLEncoder.encode("fName", "UTF-8") + "="
+ + URLEncoder.encode(fName, "UTF-8");
+
+ // Send data
+ URL url = new URL(Settings.getInstance().getServiceLocation()
+ + "getFileContent.php");
-// value = new String(new sun.misc.BASE64Decoder().decodeBuffer(value));
+ URLConnection conn = url.openConnection();
+ conn.setDoOutput(true);
- return value;
- }
- catch (Exception e) {
+ OutputStreamWriter wr = new OutputStreamWriter(conn
+ .getOutputStream());
+
+ wr.write(data);
+ wr.flush();
+
+ // Get the response
+ BufferedReader rd = new BufferedReader(new InputStreamReader(conn
+ .getInputStream()));
+ String line;
+ while ((line = rd.readLine()) != null) {
+ result += line + "\n";
+ }
+ wr.close();
+ rd.close();
+ } catch (Exception e) {
e.printStackTrace();
- return null;
}
+
+ return result;
}
public static void setFileContent(String fName, String content) {
- try{
- WSConnection conn = new WSConnection();
- conn.setServiceURL(new URL ("http://localhost:8080/WebEditor/WebEditorServiceService"));
- conn.setServiseNameSpace("http://WebEditorServer.FireFly.lnu.edu/");
+ String result = "";
+ try {
+ // Construct data
+ String data = URLEncoder.encode("fName", "UTF-8") + "="
+ + URLEncoder.encode(fName, "UTF-8");
+ data += "&" + URLEncoder.encode("content", "UTF-8") + "="
+ + URLEncoder.encode(content, "UTF-8");
+
+ // Send data
+ URL url = new URL(Settings.getInstance().getServiceLocation()
+ + "setFileContent.php");
- conn.invoke(new SetFileContentWSRequest(fName, content));
-// conn.invoke(new SetFileContentWSRequest(fName, new BASE64Encoder().encode(content.getBytes())));
- }
- catch (Exception e) {
+ URLConnection conn = url.openConnection();
+ conn.setDoOutput(true);
+
+ OutputStreamWriter wr = new OutputStreamWriter(conn
+ .getOutputStream());
+
+ wr.write(data);
+ wr.flush();
+
+ // Get the response
+ BufferedReader rd = new BufferedReader(new InputStreamReader(conn
+ .getInputStream()));
+ String line;
+ while ((line = rd.readLine()) != null) {
+ result += line + "\n";
+ }
+ wr.close();
+ rd.close();
+ } catch (Exception e) {
e.printStackTrace();
}
+
+ System.out.println("setFileContent(). result is:");
+ System.out.println(result);
}
- public static boolean copyFromTemplate(String fNameInTemplate, String fNameInCourse){
- try{
- WSConnection conn = new WSConnection();
- conn.setServiceURL(new URL ("http://localhost:8080/WebEditor/WebEditorServiceService"));
- conn.setServiseNameSpace("http://WebEditorServer.FireFly.lnu.edu/");
+ public static boolean copyFromTemplate(String fNameInTemplate,
+ String fNameInCourse) {
+ String result = "";
+ try {
+ // Construct data
+ String data = URLEncoder.encode("fNameInTemplate", "UTF-8") + "="
+ + URLEncoder.encode(fNameInTemplate, "UTF-8");
+ data += "&" + URLEncoder.encode("fNameInCourse", "UTF-8") + "="
+ + URLEncoder.encode(fNameInCourse, "UTF-8");
+
+ // Send data
+ URL url = new URL(Settings.getInstance().getServiceLocation()
+ + "copyFromTemplate.php");
- return CopyFromTemplateWSResponse.getValue(conn.invoke(new CopyFromTemplateWSRequest(fNameInTemplate, fNameInCourse)));
- }
- catch (Exception e) {
+ URLConnection conn = url.openConnection();
+ conn.setDoOutput(true);
+
+ OutputStreamWriter wr = new OutputStreamWriter(conn
+ .getOutputStream());
+
+ wr.write(data);
+ wr.flush();
+
+ // Get the response
+ BufferedReader rd = new BufferedReader(new InputStreamReader(conn
+ .getInputStream()));
+ String line;
+ while ((line = rd.readLine()) != null) {
+ result += line + "\n";
+ }
+ wr.close();
+ rd.close();
+ } catch (Exception e) {
e.printStackTrace();
- return false;
}
+
+ System.out.println("copyFromTemplate(). result is:");
+ System.out.println(result);
+
+ return true;
}
-
}
Modified: WebEditor/src/edu/lnu/FireFly/WebEditor/WebEditor.java
===================================================================
--- WebEditor/src/edu/lnu/FireFly/WebEditor/WebEditor.java 2008-05-05 15:58:05 UTC (rev 88)
+++ WebEditor/src/edu/lnu/FireFly/WebEditor/WebEditor.java 2008-05-06 09:39:02 UTC (rev 89)
@@ -84,6 +84,11 @@
@Override
public void init() {
+
+ Settings.getInstance().setCourseLocation(getParameter("courseLocation"));
+ Settings.getInstance().setServiceLocation(getParameter("serviceLocation"));
+ Settings.getInstance().setTemplateLocation(getParameter("templateLocation"));
+
instance = this;
initMenu();
@@ -168,7 +173,7 @@
.findResourceByIdentifier(item.identifierref);
if (resource != null) {
getAppletContext().showDocument(
- new URL("http://localhost:8080/WebEditor/course/"
+ new URL(Settings.getInstance().getCourseLocation()
+ resource.getFullHref()), "ContentFrame");
System.out.print("redirected\n");
}
Modified: WebEditor/src/resources/index.html
===================================================================
--- WebEditor/src/resources/index.html 2008-05-05 15:58:05 UTC (rev 88)
+++ WebEditor/src/resources/index.html 2008-05-06 09:39:02 UTC (rev 89)
@@ -3,7 +3,7 @@
<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;
@@ -57,7 +57,7 @@
padding: 4px;
}
</style>
-
+
</head>
<body onUnload="exit_clicked(false);" bgcolor='#215E21'>
@@ -86,6 +86,9 @@
<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>
@@ -113,7 +116,7 @@
</table>
</table>
</td>
- </tr>
+ </tr>
</tbody>
</table>
</table>
Added: WebEditor/src/service/config.inc.php
===================================================================
--- WebEditor/src/service/config.inc.php (rev 0)
+++ WebEditor/src/service/config.inc.php 2008-05-06 09:39:02 UTC (rev 89)
@@ -0,0 +1,6 @@
+<?
+ $base_dir = "../../";
+
+ $course_location = $base_dir . "course/";
+ $template_location = $base_dir . "WebEditor/template/";
+?>
\ No newline at end of file
Added: WebEditor/src/service/copyFromTemplate.php
===================================================================
--- WebEditor/src/service/copyFromTemplate.php (rev 0)
+++ WebEditor/src/service/copyFromTemplate.php 2008-05-06 09:39:02 UTC (rev 89)
@@ -0,0 +1,10 @@
+<?
+ require_once("config.inc.php");
+
+ if (isset($_POST['fNameInTemplate']) && isset($_POST['fNameInCourse'])){
+ $log = fopen('service.txt', 'a');
+ $source = $template_location . $_POST['fNameInTemplate'];
+ $dest = $course_location . $_POST['fNameInCourse'];
+ echo copy($source, $dest);
+ }
+?>
\ No newline at end of file
Added: WebEditor/src/service/getFileContent.php
===================================================================
--- WebEditor/src/service/getFileContent.php (rev 0)
+++ WebEditor/src/service/getFileContent.php 2008-05-06 09:39:02 UTC (rev 89)
@@ -0,0 +1,7 @@
+<?
+ require_once("config.inc.php");
+
+ if (isset($_POST['fName'])){
+ readfile ($course_location . $_POST['fName']);
+ }
+?>
\ No newline at end of file
Added: WebEditor/src/service/setFileContent.php
===================================================================
--- WebEditor/src/service/setFileContent.php (rev 0)
+++ WebEditor/src/service/setFileContent.php 2008-05-06 09:39:02 UTC (rev 89)
@@ -0,0 +1,9 @@
+<?
+ require_once("config.inc.php");
+
+ if (isset($_POST['fName']) && isset($_POST['content'])){
+ $fp = fopen($course_location . $_POST['fName'], 'w');
+ fwrite($fp, $_POST['content']);
+ fclose($fp);
+ }
+?>
\ 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: <or...@us...> - 2008-05-05 15:58:08
|
Revision: 88
http://acmcontester.svn.sourceforge.net/acmcontester/?rev=88&view=rev
Author: oracle_
Date: 2008-05-05 08:58:05 -0700 (Mon, 05 May 2008)
Log Message:
-----------
Add realtime limit (100*TimeLimit)
Modified Paths:
--------------
ACMServer/branches/Version_2/Server/TestingUnit.pas
Modified: ACMServer/branches/Version_2/Server/TestingUnit.pas
===================================================================
--- ACMServer/branches/Version_2/Server/TestingUnit.pas 2008-05-05 12:59:58 UTC (rev 87)
+++ ACMServer/branches/Version_2/Server/TestingUnit.pas 2008-05-05 15:58:05 UTC (rev 88)
@@ -46,6 +46,7 @@
Res:TRes;
PMC:_PROCESS_MEMORY_COUNTERS;
ErrFile:string;
+ starttime:DWORD;
begin
@@ -171,6 +172,7 @@
Res.ResStr:='Cant create process with exe file="'+ExeFile+'"';
end
else begin
+ starttime:=GetTickCount();
repeat
GetProcessMemoryInfo(PI.hProcess,@PMC,sizeof(PMC));
@@ -213,6 +215,18 @@
break;
end;
+ if GetTickCount-starttime>TimeLimit*100 then
+ begin
+ Res.ResInt:=R_TimeLimit;
+ Res.ResStr:='Time Limit (due to realtime limit)';
+ TerminateProcess(pi.hProcess,0);
+ if WaitForSingleObject(PI.hProcess, TerProcTimeOut)=WAIT_TIMEOUT then
+ begin
+ Res.ResInt:=R_InTimeError;
+ Res.ResStr:='Can not terminate process';
+ end;
+ break;
+ end;
Sleep(WaitConst);
until not ((ET.dwLowDateTime=0) and (ET.dwHighDateTime=0));
@@ -258,4 +272,4 @@
end;
-end.
+end.
\ 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: <br...@us...> - 2008-05-05 13:00:01
|
Revision: 87
http://acmcontester.svn.sourceforge.net/acmcontester/?rev=87&view=rev
Author: brus07
Date: 2008-05-05 05:59:58 -0700 (Mon, 05 May 2008)
Log Message:
-----------
?\208?\159?\208?\181?\209?\128?\208?\181?\208?\185?\208?\188?\208?\181?\208?\189?\208?\190?\208?\178?\208?\176?\208?\189?\208?\190 namespace AcmContester.Gate ?\208?\178 AcmContester.Mediator
\Mediator\Mediator.csproj
\Mediator\Properties\AssemblyInfo.cs
\Mediator\Library\Connector\SocketServerSingleton.cs
\Mediator\Library\Connector\WebConnectorSignleton.cs
\Mediator\Library\Data\DataMediator.cs
\Mediator\Library\Data\Result.cs
\Mediator\Library\Data\Submit.cs
\Mediator\Library\SocketGate.cs
\Mediator\Library\WebGate.cs
\Mediator\Form1.cs
\Mediator\Form1.Designer.cs
\Mediator\Program.cs
Modified Paths:
--------------
ACMServer/trunk/Mediator/Form1.Designer.cs
ACMServer/trunk/Mediator/Form1.cs
ACMServer/trunk/Mediator/Library/Connector/SocketServerSingleton.cs
ACMServer/trunk/Mediator/Library/Connector/WebConnectorSignleton.cs
ACMServer/trunk/Mediator/Library/Data/DataMediator.cs
ACMServer/trunk/Mediator/Library/Data/Result.cs
ACMServer/trunk/Mediator/Library/Data/Submit.cs
ACMServer/trunk/Mediator/Library/SocketGate.cs
ACMServer/trunk/Mediator/Library/WebGate.cs
ACMServer/trunk/Mediator/Mediator.csproj
ACMServer/trunk/Mediator/Program.cs
ACMServer/trunk/Mediator/Properties/AssemblyInfo.cs
ACMServer/trunk/Mediator/Properties/Resources.Designer.cs
ACMServer/trunk/Mediator/Properties/Settings.Designer.cs
Modified: ACMServer/trunk/Mediator/Form1.Designer.cs
===================================================================
--- ACMServer/trunk/Mediator/Form1.Designer.cs 2008-05-05 11:38:55 UTC (rev 86)
+++ ACMServer/trunk/Mediator/Form1.Designer.cs 2008-05-05 12:59:58 UTC (rev 87)
@@ -1,4 +1,4 @@
-namespace Gate
+namespace Mediator
{
partial class Form1
{
Modified: ACMServer/trunk/Mediator/Form1.cs
===================================================================
--- ACMServer/trunk/Mediator/Form1.cs 2008-05-05 11:38:55 UTC (rev 86)
+++ ACMServer/trunk/Mediator/Form1.cs 2008-05-05 12:59:58 UTC (rev 87)
@@ -8,7 +8,7 @@
using AcmContester.Library.Connector;
using System.Net.Sockets;
-namespace Gate
+namespace Mediator
{
public partial class Form1 : Form
{
@@ -32,8 +32,8 @@
private void button2_Click(object sender, EventArgs e)
{
- AcmContester.Gate.Library.SocketGate sg = new AcmContester.Gate.Library.SocketGate();
- AcmContester.Gate.Library.WebGate wg = new AcmContester.Gate.Library.WebGate();
+ AcmContester.Mediator.Library.SocketGate sg = new AcmContester.Mediator.Library.SocketGate();
+ AcmContester.Mediator.Library.WebGate wg = new AcmContester.Mediator.Library.WebGate();
//socket.Start();
}
@@ -55,7 +55,7 @@
private void button4_Click(object sender, EventArgs e)
{
- AcmContester.Gate.Library.Data.DataMediator d = AcmContester.Gate.Library.Data.DataMediator.GetMediator();
+ AcmContester.Mediator.Library.Data.DataMediator d = AcmContester.Mediator.Library.Data.DataMediator.GetMediator();
//d.DeleteOld();
TcpClient tcpClient = new TcpClient();
Modified: ACMServer/trunk/Mediator/Library/Connector/SocketServerSingleton.cs
===================================================================
--- ACMServer/trunk/Mediator/Library/Connector/SocketServerSingleton.cs 2008-05-05 11:38:55 UTC (rev 86)
+++ ACMServer/trunk/Mediator/Library/Connector/SocketServerSingleton.cs 2008-05-05 12:59:58 UTC (rev 87)
@@ -1,7 +1,7 @@
using System;
using AcmContester.Library.Connector;
-namespace AcmContester.Gate.Library.Connector
+namespace AcmContester.Mediator.Library.Connector
{
//TODO: \xEF\xEE\xF2\xF0\xB3\xE1\xED\xEE \xE7\xF0\xEE\xE1\xE8\xF2\xE8 \xE2\xB3\xE4\xEF\xEE\xE2\xB3\xE4\xED\xE8\xE9 \xB3\xED\xF2\xE5\xF0\xF4\xE5\xE9\xF1, \xF6\xE5\xE9 \xEA\xEB\xE0\xF1 \xB3 SocketServer \xEC\xE0\xFE\xF2\xFC \xE9\xEE\xE3\xEE \xED\xE0\xF1\xEB\xF3\xE4\xB3\xE2\xE0\xF2\xE8
/// <summary>
Modified: ACMServer/trunk/Mediator/Library/Connector/WebConnectorSignleton.cs
===================================================================
--- ACMServer/trunk/Mediator/Library/Connector/WebConnectorSignleton.cs 2008-05-05 11:38:55 UTC (rev 86)
+++ ACMServer/trunk/Mediator/Library/Connector/WebConnectorSignleton.cs 2008-05-05 12:59:58 UTC (rev 87)
@@ -1,7 +1,7 @@
using System;
using AcmContester.Library.Connector;
-namespace AcmContester.Gate.Library.Connector
+namespace AcmContester.Mediator.Library.Connector
{
class WebConnectorSingleton
{
Modified: ACMServer/trunk/Mediator/Library/Data/DataMediator.cs
===================================================================
--- ACMServer/trunk/Mediator/Library/Data/DataMediator.cs 2008-05-05 11:38:55 UTC (rev 86)
+++ ACMServer/trunk/Mediator/Library/Data/DataMediator.cs 2008-05-05 12:59:58 UTC (rev 87)
@@ -2,7 +2,7 @@
using System.Collections.Generic;
using System.Collections;
-namespace AcmContester.Gate.Library.Data
+namespace AcmContester.Mediator.Library.Data
{
/// <summary>
/// Pattern: Singleton
Modified: ACMServer/trunk/Mediator/Library/Data/Result.cs
===================================================================
--- ACMServer/trunk/Mediator/Library/Data/Result.cs 2008-05-05 11:38:55 UTC (rev 86)
+++ ACMServer/trunk/Mediator/Library/Data/Result.cs 2008-05-05 12:59:58 UTC (rev 87)
@@ -1,7 +1,7 @@
using System;
using AcmContester.AcmLibraryExtention;
-namespace AcmContester.Gate.Library.Data
+namespace AcmContester.Mediator.Library.Data
{
class Result
{
Modified: ACMServer/trunk/Mediator/Library/Data/Submit.cs
===================================================================
--- ACMServer/trunk/Mediator/Library/Data/Submit.cs 2008-05-05 11:38:55 UTC (rev 86)
+++ ACMServer/trunk/Mediator/Library/Data/Submit.cs 2008-05-05 12:59:58 UTC (rev 87)
@@ -1,7 +1,7 @@
using System;
using AcmContester.AcmLibraryExtention;
-namespace AcmContester.Gate.Library.Data
+namespace AcmContester.Mediator.Library.Data
{
class Submit
{
Modified: ACMServer/trunk/Mediator/Library/SocketGate.cs
===================================================================
--- ACMServer/trunk/Mediator/Library/SocketGate.cs 2008-05-05 11:38:55 UTC (rev 86)
+++ ACMServer/trunk/Mediator/Library/SocketGate.cs 2008-05-05 12:59:58 UTC (rev 87)
@@ -1,10 +1,10 @@
using System;
using AcmContester.Library.Connector;
using AcmContester.AcmLibraryExtention;
-using AcmContester.Gate.Library.Data;
-using AcmContester.Gate.Library.Connector;
+using AcmContester.Mediator.Library.Data;
+using AcmContester.Mediator.Library.Connector;
-namespace AcmContester.Gate.Library
+namespace AcmContester.Mediator.Library
{
class SocketGate
{
Modified: ACMServer/trunk/Mediator/Library/WebGate.cs
===================================================================
--- ACMServer/trunk/Mediator/Library/WebGate.cs 2008-05-05 11:38:55 UTC (rev 86)
+++ ACMServer/trunk/Mediator/Library/WebGate.cs 2008-05-05 12:59:58 UTC (rev 87)
@@ -1,8 +1,8 @@
using System;
-using AcmContester.Gate.Library.Data;
-using AcmContester.Gate.Library.Connector;
+using AcmContester.Mediator.Library.Data;
+using AcmContester.Mediator.Library.Connector;
-namespace AcmContester.Gate.Library
+namespace AcmContester.Mediator.Library
{
class WebGate
{
Modified: ACMServer/trunk/Mediator/Mediator.csproj
===================================================================
--- ACMServer/trunk/Mediator/Mediator.csproj 2008-05-05 11:38:55 UTC (rev 86)
+++ ACMServer/trunk/Mediator/Mediator.csproj 2008-05-05 12:59:58 UTC (rev 87)
@@ -7,8 +7,8 @@
<ProjectGuid>{60AAB414-BF4A-4A67-9FF2-D04C3B4BBA9B}</ProjectGuid>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>Gate</RootNamespace>
- <AssemblyName>Gate</AssemblyName>
+ <RootNamespace>Mediator</RootNamespace>
+ <AssemblyName>Mediator</AssemblyName>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@@ -63,6 +63,7 @@
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
+ <DesignTime>True</DesignTime>
</Compile>
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
Modified: ACMServer/trunk/Mediator/Program.cs
===================================================================
--- ACMServer/trunk/Mediator/Program.cs 2008-05-05 11:38:55 UTC (rev 86)
+++ ACMServer/trunk/Mediator/Program.cs 2008-05-05 12:59:58 UTC (rev 87)
@@ -2,7 +2,7 @@
using System.Collections.Generic;
using System.Windows.Forms;
-namespace Gate
+namespace Mediator
{
static class Program
{
Modified: ACMServer/trunk/Mediator/Properties/AssemblyInfo.cs
===================================================================
--- ACMServer/trunk/Mediator/Properties/AssemblyInfo.cs 2008-05-05 11:38:55 UTC (rev 86)
+++ ACMServer/trunk/Mediator/Properties/AssemblyInfo.cs 2008-05-05 12:59:58 UTC (rev 87)
@@ -5,11 +5,11 @@
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
-[assembly: AssemblyTitle("Gate")]
+[assembly: AssemblyTitle("Mediator")]
[assembly: AssemblyDescription("http://acm.lviv.ua")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("AcmContester")]
-[assembly: AssemblyProduct("Gate")]
+[assembly: AssemblyProduct("Mediator")]
[assembly: AssemblyCopyright("Copyright © AcmContester 2008")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
Modified: ACMServer/trunk/Mediator/Properties/Resources.Designer.cs
===================================================================
--- ACMServer/trunk/Mediator/Properties/Resources.Designer.cs 2008-05-05 11:38:55 UTC (rev 86)
+++ ACMServer/trunk/Mediator/Properties/Resources.Designer.cs 2008-05-05 12:59:58 UTC (rev 87)
@@ -8,10 +8,10 @@
// </auto-generated>
//------------------------------------------------------------------------------
-namespace Gate.Properties
-{
-
-
+namespace Mediator.Properties {
+ using System;
+
+
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
@@ -22,48 +22,40 @@
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- internal class Resources
- {
-
+ internal class Resources {
+
private static global::System.Resources.ResourceManager resourceMan;
-
+
private static global::System.Globalization.CultureInfo resourceCulture;
-
+
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
- internal Resources()
- {
+ internal Resources() {
}
-
+
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Resources.ResourceManager ResourceManager
- {
- get
- {
- if ((resourceMan == null))
- {
- global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Gate.Properties.Resources", typeof(Resources).Assembly);
+ internal static global::System.Resources.ResourceManager ResourceManager {
+ get {
+ if (object.ReferenceEquals(resourceMan, null)) {
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Mediator.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
-
+
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Globalization.CultureInfo Culture
- {
- get
- {
+ internal static global::System.Globalization.CultureInfo Culture {
+ get {
return resourceCulture;
}
- set
- {
+ set {
resourceCulture = value;
}
}
Modified: ACMServer/trunk/Mediator/Properties/Settings.Designer.cs
===================================================================
--- ACMServer/trunk/Mediator/Properties/Settings.Designer.cs 2008-05-05 11:38:55 UTC (rev 86)
+++ ACMServer/trunk/Mediator/Properties/Settings.Designer.cs 2008-05-05 12:59:58 UTC (rev 87)
@@ -8,21 +8,17 @@
// </auto-generated>
//------------------------------------------------------------------------------
-namespace Gate.Properties
-{
-
-
+namespace Mediator.Properties {
+
+
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "8.0.0.0")]
- internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
- {
-
+ internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
+
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
-
- public static Settings Default
- {
- get
- {
+
+ public static Settings Default {
+ get {
return defaultInstance;
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <br...@us...> - 2008-05-05 11:38:49
|
Revision: 86
http://acmcontester.svn.sourceforge.net/acmcontester/?rev=86&view=rev
Author: brus07
Date: 2008-05-05 04:38:55 -0700 (Mon, 05 May 2008)
Log Message:
-----------
?\208?\148?\208?\190?\209?\128?\208?\190?\208?\177?\208?\187?\208?\181?\208?\189?\208?\184?\208?\185 WebConnector, ?\208?\176?\208?\187?\208?\181 ?\209?\130?\208?\184?\208?\188?\209?\135?\208?\176?\209?\129?\208?\190?\208?\178?\208?\190 ?\208?\183?\209?\128?\208?\190?\208?\177?\208?\187?\208?\181?\208?\189?\208?\190, ?\209?\137?\208?\190 ?\208?\178?\209?\150?\208?\189 ?\208?\177?\208?\181?\209?\128?\208?\181 ?\209?\150?\208?\189?\209?\132?\208?\190?\209?\128?\208?\188?\208?\176?\209?\134?\209?\150?\209?\142 ?\208?\191?\208?\190 ?\209?\130?\208?\176?\208?\185?\208?\188?\208?\181?\209?\128?\209?\131 ?\209?\150?\208?\183 ?\209?\132?\208?\176?\208?\185?\208?\187?\208?\176 a.txt ?\209?\150 ?\208?\191?\208?\184?\209?\136?\208?\181 ?\208?\190?\209?\130?\209?\128?\208?\184?\208?\188?\208?\176?\208?\189?\209?\131 ?\209?\150?\208?\189?\209?\132?\208?\190?\209?\128?\208?\188?\208?\176?\209?\134?\209?\150?\209?\142 ?\209?\131 ?\209?\132?\208?\176?\208?\185?\208?\187?\209?\131 b.txt
\AcmContester.sln
\Library\Connector\SocketClient.cs
\Library\Connector\WebConnector.cs
\Mediator\Library\Connector\SocketServerSingleton.cs
\Mediator\Library\Connector\WebConnectorSignleton.cs
\Mediator\Library\Data\Submit.cs
\Mediator\Library\SocketGate.cs
\Mediator\Library\WebGate.cs
\Mediator\Form1.cs
\Tester\Form1.cs
Modified Paths:
--------------
ACMServer/trunk/AcmContester.sln
ACMServer/trunk/AcmContester.suo
ACMServer/trunk/Library/Connector/SocketClient.cs
ACMServer/trunk/Library/Connector/WebConnector.cs
ACMServer/trunk/Mediator/Form1.cs
ACMServer/trunk/Mediator/Library/Connector/SocketServerSingleton.cs
ACMServer/trunk/Mediator/Library/Connector/WebConnectorSignleton.cs
ACMServer/trunk/Mediator/Library/Data/Submit.cs
ACMServer/trunk/Mediator/Library/SocketGate.cs
ACMServer/trunk/Mediator/Library/WebGate.cs
ACMServer/trunk/Tester/Form1.cs
Modified: ACMServer/trunk/AcmContester.sln
===================================================================
--- ACMServer/trunk/AcmContester.sln 2008-05-05 08:26:54 UTC (rev 85)
+++ ACMServer/trunk/AcmContester.sln 2008-05-05 11:38:55 UTC (rev 86)
@@ -1,29 +1,32 @@
Microsoft Visual Studio Solution File, Format Version 9.00
# Visual Studio 2005
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tester", "Tester\Tester.csproj", "{3C6F91E7-56AA-4138-8A3F-FE70897153DA}"
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Library", "Library", "{5AC26E6C-CFBB-4262-B07E-71C9B5288630}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Checker", "Checker\Checker.csproj", "{052D9F77-17AF-42F3-BFBF-975A19383496}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Connector", "Library\Connector\Connector.csproj", "{211DD6A5-2D73-439E-8722-ED2C89ED1DDB}"
EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Resource", "Resource", "{E6E2D45E-F398-47F2-8A53-85C18D3BD82F}"
- ProjectSection(SolutionItems) = preProject
- Resource\EasySocket.dll = Resource\EasySocket.dll
- EndProjectSection
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mediator", "Mediator\Mediator.csproj", "{60AAB414-BF4A-4A67-9FF2-D04C3B4BBA9B}"
EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Library", "Library", "{5AC26E6C-CFBB-4262-B07E-71C9B5288630}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tester", "Tester\Tester.csproj", "{3C6F91E7-56AA-4138-8A3F-FE70897153DA}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Connector", "Library\Connector\Connector.csproj", "{211DD6A5-2D73-439E-8722-ED2C89ED1DDB}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Checker", "Checker\Checker.csproj", "{052D9F77-17AF-42F3-BFBF-975A19383496}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LibraryExtention", "Library\LibraryExtention\LibraryExtention.csproj", "{A8135069-F8BA-4E5D-835F-3FF3F350AA5D}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mediator", "Mediator\Mediator.csproj", "{60AAB414-BF4A-4A67-9FF2-D04C3B4BBA9B}"
-EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {211DD6A5-2D73-439E-8722-ED2C89ED1DDB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {211DD6A5-2D73-439E-8722-ED2C89ED1DDB}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {211DD6A5-2D73-439E-8722-ED2C89ED1DDB}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {211DD6A5-2D73-439E-8722-ED2C89ED1DDB}.Release|Any CPU.Build.0 = Release|Any CPU
+ {60AAB414-BF4A-4A67-9FF2-D04C3B4BBA9B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {60AAB414-BF4A-4A67-9FF2-D04C3B4BBA9B}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {60AAB414-BF4A-4A67-9FF2-D04C3B4BBA9B}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {60AAB414-BF4A-4A67-9FF2-D04C3B4BBA9B}.Release|Any CPU.Build.0 = Release|Any CPU
{3C6F91E7-56AA-4138-8A3F-FE70897153DA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3C6F91E7-56AA-4138-8A3F-FE70897153DA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3C6F91E7-56AA-4138-8A3F-FE70897153DA}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -32,18 +35,10 @@
{052D9F77-17AF-42F3-BFBF-975A19383496}.Debug|Any CPU.Build.0 = Debug|Any CPU
{052D9F77-17AF-42F3-BFBF-975A19383496}.Release|Any CPU.ActiveCfg = Release|Any CPU
{052D9F77-17AF-42F3-BFBF-975A19383496}.Release|Any CPU.Build.0 = Release|Any CPU
- {211DD6A5-2D73-439E-8722-ED2C89ED1DDB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {211DD6A5-2D73-439E-8722-ED2C89ED1DDB}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {211DD6A5-2D73-439E-8722-ED2C89ED1DDB}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {211DD6A5-2D73-439E-8722-ED2C89ED1DDB}.Release|Any CPU.Build.0 = Release|Any CPU
{A8135069-F8BA-4E5D-835F-3FF3F350AA5D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A8135069-F8BA-4E5D-835F-3FF3F350AA5D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A8135069-F8BA-4E5D-835F-3FF3F350AA5D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A8135069-F8BA-4E5D-835F-3FF3F350AA5D}.Release|Any CPU.Build.0 = Release|Any CPU
- {60AAB414-BF4A-4A67-9FF2-D04C3B4BBA9B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {60AAB414-BF4A-4A67-9FF2-D04C3B4BBA9B}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {60AAB414-BF4A-4A67-9FF2-D04C3B4BBA9B}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {60AAB414-BF4A-4A67-9FF2-D04C3B4BBA9B}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Modified: ACMServer/trunk/AcmContester.suo
===================================================================
(Binary files differ)
Modified: ACMServer/trunk/Library/Connector/SocketClient.cs
===================================================================
--- ACMServer/trunk/Library/Connector/SocketClient.cs 2008-05-05 08:26:54 UTC (rev 85)
+++ ACMServer/trunk/Library/Connector/SocketClient.cs 2008-05-05 11:38:55 UTC (rev 86)
@@ -21,11 +21,13 @@
public void Connect()
{
- client.ConnectToServerAsync();
+ if (client.IsConnected == false)
+ client.ConnectToServerAsync();
}
public void Disconnect()
{
- client.DisconnectFromServer();
+ if (client.IsConnected == true)
+ client.DisconnectFromServer();
}
public void Send(string message)
{
Modified: ACMServer/trunk/Library/Connector/WebConnector.cs
===================================================================
--- ACMServer/trunk/Library/Connector/WebConnector.cs 2008-05-05 08:26:54 UTC (rev 85)
+++ ACMServer/trunk/Library/Connector/WebConnector.cs 2008-05-05 11:38:55 UTC (rev 86)
@@ -1,13 +1,35 @@
using System;
+using System.Timers;
namespace AcmContester.Library.Connector
{
public class WebConnector
{
+ Timer timer = new Timer();
public delegate void DataArrivedDelegate(string s);
public event DataArrivedDelegate onDataArrived;
+ public WebConnector()
+ {
+ timer.Interval = 10 * 1000;
+ timer.Elapsed += new ElapsedEventHandler(OnTimedEvent);
+ timer.Enabled = true;
+ }
+
+ // Specify what you want to happen when the Elapsed event is
+ // raised.
+ private void OnTimedEvent(object source, ElapsedEventArgs e)
+ {
+ timer.Enabled = false;
+ object ob = GetInfoFromSite();
+ if (ob != null)
+ {
+ DataArrived(ob);
+ }
+ timer.Enabled = true;
+ }
+
private void DataArrived(object Data)
{
if (onDataArrived != null)
@@ -16,8 +38,37 @@
}
}
+ private object GetInfoFromSite()
+ {
+ try
+ {
+ string res = "";
+ using (System.IO.StreamReader sr = new System.IO.StreamReader("a.txt"))
+ {
+ res = sr.ReadToEnd();
+ }
+ if (res.Length == 0)
+ return null;
+ return res;
+ }
+ catch(Exception)
+ {
+ }
+ return null;
+ }
+
public void Send(string message)
{
+ try
+ {
+ using (System.IO.StreamWriter sr = new System.IO.StreamWriter("b.txt", true))
+ {
+ sr.WriteLine(message);
+ }
+ }
+ catch (Exception)
+ {
+ }
//TODO:
}
}
Modified: ACMServer/trunk/Mediator/Form1.cs
===================================================================
--- ACMServer/trunk/Mediator/Form1.cs 2008-05-05 08:26:54 UTC (rev 85)
+++ ACMServer/trunk/Mediator/Form1.cs 2008-05-05 11:38:55 UTC (rev 86)
@@ -32,7 +32,9 @@
private void button2_Click(object sender, EventArgs e)
{
- socket.Start();
+ AcmContester.Gate.Library.SocketGate sg = new AcmContester.Gate.Library.SocketGate();
+ AcmContester.Gate.Library.WebGate wg = new AcmContester.Gate.Library.WebGate();
+ //socket.Start();
}
private void button3_Click(object sender, EventArgs e)
Modified: ACMServer/trunk/Mediator/Library/Connector/SocketServerSingleton.cs
===================================================================
--- ACMServer/trunk/Mediator/Library/Connector/SocketServerSingleton.cs 2008-05-05 08:26:54 UTC (rev 85)
+++ ACMServer/trunk/Mediator/Library/Connector/SocketServerSingleton.cs 2008-05-05 11:38:55 UTC (rev 86)
@@ -1,7 +1,7 @@
using System;
using AcmContester.Library.Connector;
-namespace Gate.Library.Connector
+namespace AcmContester.Gate.Library.Connector
{
//TODO: \xEF\xEE\xF2\xF0\xB3\xE1\xED\xEE \xE7\xF0\xEE\xE1\xE8\xF2\xE8 \xE2\xB3\xE4\xEF\xEE\xE2\xB3\xE4\xED\xE8\xE9 \xB3\xED\xF2\xE5\xF0\xF4\xE5\xE9\xF1, \xF6\xE5\xE9 \xEA\xEB\xE0\xF1 \xB3 SocketServer \xEC\xE0\xFE\xF2\xFC \xE9\xEE\xE3\xEE \xED\xE0\xF1\xEB\xF3\xE4\xB3\xE2\xE0\xF2\xE8
/// <summary>
Modified: ACMServer/trunk/Mediator/Library/Connector/WebConnectorSignleton.cs
===================================================================
--- ACMServer/trunk/Mediator/Library/Connector/WebConnectorSignleton.cs 2008-05-05 08:26:54 UTC (rev 85)
+++ ACMServer/trunk/Mediator/Library/Connector/WebConnectorSignleton.cs 2008-05-05 11:38:55 UTC (rev 86)
@@ -1,11 +1,11 @@
using System;
using AcmContester.Library.Connector;
-namespace Gate.Library.Connector
+namespace AcmContester.Gate.Library.Connector
{
- class WebConnectorSignleton
+ class WebConnectorSingleton
{
- private static WebConnector instance = new WebConnector();
+ private static WebConnectorSingleton instance = new WebConnectorSingleton();
private WebConnector connector = new WebConnector();
@@ -13,12 +13,12 @@
public delegate void DataArrivedDelegate(string s);
public event DataArrivedDelegate onDataArrived;
- private WebConnectorSignleton()
+ private WebConnectorSingleton()
{
connector.onDataArrived += DataArrived;
}
- public static WebConnector GetWebConnector()
+ public static WebConnectorSingleton GetWebConnector()
{
return instance;
}
Modified: ACMServer/trunk/Mediator/Library/Data/Submit.cs
===================================================================
--- ACMServer/trunk/Mediator/Library/Data/Submit.cs 2008-05-05 08:26:54 UTC (rev 85)
+++ ACMServer/trunk/Mediator/Library/Data/Submit.cs 2008-05-05 11:38:55 UTC (rev 86)
@@ -20,5 +20,17 @@
{
return temp;
}
+
+ public override int GetHashCode()
+ {
+ //HACK:
+ int result = 0;
+ for (int i = 0; i < temp.Length; i++)
+ {
+ result *= 991;
+ result += (int)temp[i];
+ }
+ return result;
+ }
}
}
Modified: ACMServer/trunk/Mediator/Library/SocketGate.cs
===================================================================
--- ACMServer/trunk/Mediator/Library/SocketGate.cs 2008-05-05 08:26:54 UTC (rev 85)
+++ ACMServer/trunk/Mediator/Library/SocketGate.cs 2008-05-05 11:38:55 UTC (rev 86)
@@ -1,8 +1,8 @@
using System;
using AcmContester.Library.Connector;
-using Gate.Library.Connector;
using AcmContester.AcmLibraryExtention;
using AcmContester.Gate.Library.Data;
+using AcmContester.Gate.Library.Connector;
namespace AcmContester.Gate.Library
{
Modified: ACMServer/trunk/Mediator/Library/WebGate.cs
===================================================================
--- ACMServer/trunk/Mediator/Library/WebGate.cs 2008-05-05 08:26:54 UTC (rev 85)
+++ ACMServer/trunk/Mediator/Library/WebGate.cs 2008-05-05 11:38:55 UTC (rev 86)
@@ -1,12 +1,12 @@
using System;
using AcmContester.Gate.Library.Data;
-using Gate.Library.Connector;
+using AcmContester.Gate.Library.Connector;
namespace AcmContester.Gate.Library
{
class WebGate
{
- WebConnectorSignleton webConnector = WebConnectorSignleton.GetWebConnector();
+ WebConnectorSingleton webConnector = WebConnectorSingleton.GetWebConnector();
DataMediator mediator = DataMediator.GetMediator();
Modified: ACMServer/trunk/Tester/Form1.cs
===================================================================
--- ACMServer/trunk/Tester/Form1.cs 2008-05-05 08:26:54 UTC (rev 85)
+++ ACMServer/trunk/Tester/Form1.cs 2008-05-05 11:38:55 UTC (rev 86)
@@ -19,8 +19,11 @@
private void button1_Click(object sender, EventArgs e)
{
- socket = new SocketClient(textBox3.Text);
- socket.onDataArrived += DataArrived;
+ if (socket == null)
+ {
+ socket = new SocketClient(textBox3.Text);
+ socket.onDataArrived += DataArrived;
+ }
socket.Connect();
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <br...@us...> - 2008-05-05 08:26:49
|
Revision: 85
http://acmcontester.svn.sourceforge.net/acmcontester/?rev=85&view=rev
Author: brus07
Date: 2008-05-05 01:26:54 -0700 (Mon, 05 May 2008)
Log Message:
-----------
?\208?\148?\208?\190?\208?\180?\208?\176?\208?\189?\208?\184?\208?\185 ?\208?\186?\208?\187?\208?\176?\209?\129 WebConnector, ?\209?\143?\208?\186?\208?\184?\208?\185 ?\208?\188?\208?\176?\209?\148 ?\208?\189?\208?\176?\208?\191?\209?\128?\209?\143?\208?\188?\209?\131 ?\208?\191?\209?\128?\208?\176?\209?\134?\209?\142?\208?\178?\208?\176?\209?\130?\208?\184 ?\209?\150?\208?\183 Web'?\208?\190?\208?\188. ?\208?\134 ?\208?\178?\209?\150?\208?\180?\208?\191?\208?\190?\208?\178?\209?\150?\208?\180?\208?\189?\208?\190 ?\208?\180?\208?\190?\209?\128?\208?\190?\208?\177?\208?\184?\208?\178 ?\208?\186?\208?\187?\208?\176?\209?\129?\208?\184, ?\209?\137?\208?\190 ?\208?\188?\208?\176?\209?\142?\209?\130?\209?\140 ?\208?\183?\208?\178?\209?\143?\208?\183?\209?\131?\208?\178?\208?\176?\209?\130?\208?\184 ?\209?\150?\208?\183 ?\209?\134?\208?\184?\208?\188 (WebGate, WebConnectorSignleton).
\Library\Connector\Connector.csproj
\Library\Connector\WebConnector.cs
\Mediator\Mediator.csproj
\Mediator\Library\Connector\WebConnectorSignleton.cs
\Mediator\Library\WebGate.cs
Modified Paths:
--------------
ACMServer/trunk/Library/Connector/Connector.csproj
ACMServer/trunk/Mediator/Library/WebGate.cs
ACMServer/trunk/Mediator/Mediator.csproj
Added Paths:
-----------
ACMServer/trunk/Library/Connector/WebConnector.cs
ACMServer/trunk/Mediator/Library/Connector/WebConnectorSignleton.cs
Modified: ACMServer/trunk/Library/Connector/Connector.csproj
===================================================================
--- ACMServer/trunk/Library/Connector/Connector.csproj 2008-05-04 20:22:37 UTC (rev 84)
+++ ACMServer/trunk/Library/Connector/Connector.csproj 2008-05-05 08:26:54 UTC (rev 85)
@@ -40,6 +40,7 @@
<Compile Include="SocketClient.cs" />
<Compile Include="SocketServer.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
+ <Compile Include="WebConnector.cs" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Added: ACMServer/trunk/Library/Connector/WebConnector.cs
===================================================================
--- ACMServer/trunk/Library/Connector/WebConnector.cs (rev 0)
+++ ACMServer/trunk/Library/Connector/WebConnector.cs 2008-05-05 08:26:54 UTC (rev 85)
@@ -0,0 +1,24 @@
+using System;
+
+namespace AcmContester.Library.Connector
+{
+ public class WebConnector
+ {
+
+ public delegate void DataArrivedDelegate(string s);
+ public event DataArrivedDelegate onDataArrived;
+
+ private void DataArrived(object Data)
+ {
+ if (onDataArrived != null)
+ {
+ onDataArrived(Data.ToString());
+ }
+ }
+
+ public void Send(string message)
+ {
+ //TODO:
+ }
+ }
+}
Added: ACMServer/trunk/Mediator/Library/Connector/WebConnectorSignleton.cs
===================================================================
--- ACMServer/trunk/Mediator/Library/Connector/WebConnectorSignleton.cs (rev 0)
+++ ACMServer/trunk/Mediator/Library/Connector/WebConnectorSignleton.cs 2008-05-05 08:26:54 UTC (rev 85)
@@ -0,0 +1,41 @@
+using System;
+using AcmContester.Library.Connector;
+
+namespace Gate.Library.Connector
+{
+ class WebConnectorSignleton
+ {
+ private static WebConnector instance = new WebConnector();
+
+ private WebConnector connector = new WebConnector();
+
+
+ public delegate void DataArrivedDelegate(string s);
+ public event DataArrivedDelegate onDataArrived;
+
+ private WebConnectorSignleton()
+ {
+ connector.onDataArrived += DataArrived;
+ }
+
+ public static WebConnector GetWebConnector()
+ {
+ return instance;
+ }
+
+
+ public void Send(string message)
+ {
+ connector.Send(message);
+ }
+
+
+ private void DataArrived(string message)
+ {
+ if (onDataArrived != null)
+ {
+ onDataArrived(message);
+ }
+ }
+ }
+}
Modified: ACMServer/trunk/Mediator/Library/WebGate.cs
===================================================================
--- ACMServer/trunk/Mediator/Library/WebGate.cs 2008-05-04 20:22:37 UTC (rev 84)
+++ ACMServer/trunk/Mediator/Library/WebGate.cs 2008-05-05 08:26:54 UTC (rev 85)
@@ -1,16 +1,23 @@
using System;
using AcmContester.Gate.Library.Data;
+using Gate.Library.Connector;
namespace AcmContester.Gate.Library
{
class WebGate
{
+ WebConnectorSignleton webConnector = WebConnectorSignleton.GetWebConnector();
+
DataMediator mediator = DataMediator.GetMediator();
+ public WebGate()
+ {
+ webConnector.onDataArrived += DataArrived;
+ }
+
public void SendToWeb(Result data)
{
- //TODO
- data.ToString();
+ webConnector.Send(data.ToString());
}
private void DataArrived(string message)
Modified: ACMServer/trunk/Mediator/Mediator.csproj
===================================================================
--- ACMServer/trunk/Mediator/Mediator.csproj 2008-05-04 20:22:37 UTC (rev 84)
+++ ACMServer/trunk/Mediator/Mediator.csproj 2008-05-05 08:26:54 UTC (rev 85)
@@ -43,6 +43,7 @@
<DependentUpon>Form1.cs</DependentUpon>
</Compile>
<Compile Include="Library\Connector\SocketServerSingleton.cs" />
+ <Compile Include="Library\Connector\WebConnectorSignleton.cs" />
<Compile Include="Library\Data\DataMediator.cs" />
<Compile Include="Library\Data\Result.cs" />
<Compile Include="Library\Data\Submit.cs" />
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <br...@us...> - 2008-05-04 20:22:35
|
Revision: 84
http://acmcontester.svn.sourceforge.net/acmcontester/?rev=84&view=rev
Author: brus07
Date: 2008-05-04 13:22:37 -0700 (Sun, 04 May 2008)
Log Message:
-----------
Update version number (v. 2.96)
Modified Paths:
--------------
ACMServer/branches/Version_2/Poserednyk/MainUnit.pas
Modified: ACMServer/branches/Version_2/Poserednyk/MainUnit.pas
===================================================================
--- ACMServer/branches/Version_2/Poserednyk/MainUnit.pas 2008-05-04 16:43:04 UTC (rev 83)
+++ ACMServer/branches/Version_2/Poserednyk/MainUnit.pas 2008-05-04 20:22:37 UTC (rev 84)
@@ -1543,12 +1543,12 @@
if s='true' then
begin
GLog.Create('logfile.txt',MainForm.Memo01,true);
- MainForm.Caption:='ACMPoserednyk v. 2.95';
+ MainForm.Caption:='ACMPoserednyk v. 2.96';
end else
if s='false' then
begin
GLog.Create('logfile.txt',MainForm.Memo01,false);
- MainForm.Caption:='ACMPoserednyk v. 2.95';
+ MainForm.Caption:='ACMPoserednyk v. 2.96';
end else begin result:=i; exit; end;
GLog.Add('_____________________________________________________');
GLog.Add('ACMPoserednyk START');
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:42:59
|
Revision: 83
http://acmcontester.svn.sourceforge.net/acmcontester/?rev=83&view=rev
Author: brus07
Date: 2008-05-04 09:43:04 -0700 (Sun, 04 May 2008)
Log Message:
-----------
Added "epmtypr" in compiler folder
Added Paths:
-----------
ACMServer/branches/Version_2/Server/Compillers/Delphi7/emptypr/
ACMServer/branches/Version_2/Server/Compillers/Delphi7/emptypr/program.pas
ACMServer/branches/Version_2/Server/Compillers/vc6/
ACMServer/branches/Version_2/Server/Compillers/vc6/emptypr/
ACMServer/branches/Version_2/Server/Compillers/vc6/emptypr/program.cpp
Removed Paths:
-------------
ACMServer/branches/Version_2/Server/Compillers/vc6_full/
Added: ACMServer/branches/Version_2/Server/Compillers/Delphi7/emptypr/program.pas
===================================================================
--- ACMServer/branches/Version_2/Server/Compillers/Delphi7/emptypr/program.pas (rev 0)
+++ ACMServer/branches/Version_2/Server/Compillers/Delphi7/emptypr/program.pas 2008-05-04 16:43:04 UTC (rev 83)
@@ -0,0 +1,3 @@
+program emptypr;
+begin
+end.
Copied: ACMServer/branches/Version_2/Server/Compillers/vc6 (from rev 80, ACMServer/branches/Version_2/Server/Compillers/vc6_full)
Added: ACMServer/branches/Version_2/Server/Compillers/vc6/emptypr/program.cpp
===================================================================
--- ACMServer/branches/Version_2/Server/Compillers/vc6/emptypr/program.cpp (rev 0)
+++ ACMServer/branches/Version_2/Server/Compillers/vc6/emptypr/program.cpp 2008-05-04 16:43:04 UTC (rev 83)
@@ -0,0 +1,4 @@
+int main()
+{
+ return 0;
+}
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:35:08
|
Revision: 82
http://acmcontester.svn.sourceforge.net/acmcontester/?rev=82&view=rev
Author: brus07
Date: 2008-05-04 09:35:14 -0700 (Sun, 04 May 2008)
Log Message:
-----------
Added resources files
Added Paths:
-----------
ACMServer/branches/Version_2/Poserednyk/ACMPoserednyk.res
ACMServer/branches/Version_2/Server/ACMServer.res
Added: ACMServer/branches/Version_2/Poserednyk/ACMPoserednyk.res
===================================================================
(Binary files differ)
Property changes on: ACMServer/branches/Version_2/Poserednyk/ACMPoserednyk.res
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: ACMServer/branches/Version_2/Server/ACMServer.res
===================================================================
(Binary files differ)
Property changes on: ACMServer/branches/Version_2/Server/ACMServer.res
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|