|
From: <lo...@us...> - 2010-03-26 11:04:38
|
Revision: 2399
http://qtitools.svn.sourceforge.net/qtitools/?rev=2399&view=rev
Author: loccy
Date: 2010-03-26 11:04:28 +0000 (Fri, 26 Mar 2010)
Log Message:
-----------
MQ: Functional simple choice quick creator wizard now integrated with MQ proper.
Modified Paths:
--------------
Mathqurate/trunk/mathqurate/src/main/java/org/qtitools/mathqurate/view/MQMain.java
Mathqurate/trunk/mathqurate/src/main/java/org/qtitools/mathqurate/view/RendererView.java
Mathqurate/trunk/mathqurate/src/main/java/org/qtitools/mathqurate/view/SimpleChoiceWizard.java
Mathqurate/trunk/mathqurate/src/main/java/org/qtitools/mathqurate/view/SnuggleTeXView.java
Mathqurate/trunk/mathqurate/src/main/resources/org/qtitools/mathqurate/resources/simpleChoiceTemplate.xml
Added Paths:
-----------
Mathqurate/trunk/mathqurate/src/main/resources/org/qtitools/mathqurate/resources/32px-wizard.png
Mathqurate/trunk/mathqurate/src/main/resources/org/qtitools/mathqurate/resources/latex-button.png
Mathqurate/trunk/mathqurate/src/main/resources/org/qtitools/mathqurate/resources/preview-simpleChoiceWizard.png
Modified: Mathqurate/trunk/mathqurate/src/main/java/org/qtitools/mathqurate/view/MQMain.java
===================================================================
--- Mathqurate/trunk/mathqurate/src/main/java/org/qtitools/mathqurate/view/MQMain.java 2010-03-25 16:30:23 UTC (rev 2398)
+++ Mathqurate/trunk/mathqurate/src/main/java/org/qtitools/mathqurate/view/MQMain.java 2010-03-26 11:04:28 UTC (rev 2399)
@@ -48,6 +48,7 @@
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;
+import org.apache.commons.io.FileUtils;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.CoolBarManager;
import org.eclipse.jface.action.MenuManager;
@@ -107,6 +108,8 @@
private static String passedFilename;
private static boolean spartacusMode = false;
+ private MQMain dis = this;
+
/**
* The Class AboutAction.
*/
@@ -145,6 +148,51 @@
}
/**
+ * The Class AboutAction.
+ */
+ private class SimpleChoiceQuickAction extends Action {
+
+ /** The _window. */
+ ApplicationWindow _window;
+
+ /**
+ * Instantiates a new about action.
+ *
+ * @param window
+ * the window
+ */
+ public SimpleChoiceQuickAction(ApplicationWindow window) {
+ _window = window;
+ setText("Quick Simple Choice Editor");
+ setToolTipText("Create a simple choice (multiple choice) question using the quick editor window.");
+
+ setImageDescriptor(ImageDescriptor.createFromURL(MQMain.class
+ .getClassLoader()
+ .getResource(
+ "org/qtitools/mathqurate/resources/32px-wizard.png")));
+
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.action.Action#run()
+ */
+ @Override
+ public void run() {
+ String newXml = SimpleChoiceWizard.makeMCQ();
+ File f = new File(MQMain.tmpdirpath+File.separator+"fromMCQWiz.xml");
+ try {
+ FileUtils.writeStringToFile(f, newXml, "UTF-8");
+ } catch (IOException e) {
+ // TODO Auto-generated catch block - should never happen
+ e.printStackTrace();
+ }
+ controller.importAssessmentItemType(f.getAbsolutePath());
+ }
+ }
+
+ /**
* The Class PreferencesAction.
*/
private class PreferencesAction extends Action {
@@ -1012,6 +1060,9 @@
/** The _about action. */
private AboutAction _aboutAction = new AboutAction(this);
+ /** The simple choice quick action */
+ private SimpleChoiceQuickAction _simpleChoiceQuickAction = new SimpleChoiceQuickAction(this);
+
/** The _preferences action */
private PreferencesAction _preferencesAction = new PreferencesAction(this);
@@ -1778,6 +1829,7 @@
menuManager.add(editMenu);
MenuManager viewMenu = new MenuManager("&Window");
+ viewMenu.add(_simpleChoiceQuickAction);
viewMenu.add(_metadataAction);
viewMenu.add(_itemBodyAction);
viewMenu.add(_processingEditorChooserAction);
@@ -2623,6 +2675,7 @@
editBar.add(_redoAction);
interactionBar = new ToolBarManager(style);
+ interactionBar.add(_simpleChoiceQuickAction);
interactionBar.add(_metadataAction);
interactionBar.add(_itemBodyAction);
interactionBar.add(_processingEditorChooserAction);
Modified: Mathqurate/trunk/mathqurate/src/main/java/org/qtitools/mathqurate/view/RendererView.java
===================================================================
--- Mathqurate/trunk/mathqurate/src/main/java/org/qtitools/mathqurate/view/RendererView.java 2010-03-25 16:30:23 UTC (rev 2398)
+++ Mathqurate/trunk/mathqurate/src/main/java/org/qtitools/mathqurate/view/RendererView.java 2010-03-26 11:04:28 UTC (rev 2399)
@@ -151,7 +151,7 @@
try {
client = new HttpClient();
- if (MQMain.mathQurateModel.isProxy())
+ if (false) //MQMain.mathQurateModel.isProxy())
{
client.getHostConfiguration().
setProxy(MQMain.mathQurateModel.getProxyHostname(),
@@ -201,7 +201,7 @@
// right. Poxy proxies.
- if (((MQMain.mathQurateModel.isProxy() != MQMain.mathQurateModel.wasProxy())) && (!MQMain.mathQurateModel.isProxySet()))
+ if (false)//(((MQMain.mathQurateModel.isProxy() != MQMain.mathQurateModel.wasProxy())) && (!MQMain.mathQurateModel.isProxySet()))
{
// better explain that monster of an if. If the proxy status has changed (ie isProxy != wasProxy) AND
// if we haven't aleady changed XULRunner's proxy settings, we'll need to update XULR's prefs
Modified: Mathqurate/trunk/mathqurate/src/main/java/org/qtitools/mathqurate/view/SimpleChoiceWizard.java
===================================================================
--- Mathqurate/trunk/mathqurate/src/main/java/org/qtitools/mathqurate/view/SimpleChoiceWizard.java 2010-03-25 16:30:23 UTC (rev 2398)
+++ Mathqurate/trunk/mathqurate/src/main/java/org/qtitools/mathqurate/view/SimpleChoiceWizard.java 2010-03-26 11:04:28 UTC (rev 2399)
@@ -41,6 +41,7 @@
import java.util.regex.Pattern;
import org.apache.commons.lang.WordUtils;
+import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.layout.GridDataFactory;
import org.eclipse.jface.layout.GridLayoutFactory;
import org.eclipse.jface.layout.LayoutConstants;
@@ -56,6 +57,8 @@
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.window.ApplicationWindow;
import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.FocusEvent;
+import org.eclipse.swt.events.FocusListener;
import org.eclipse.swt.events.MouseEvent;
import org.eclipse.swt.events.MouseListener;
import org.eclipse.swt.graphics.Image;
@@ -67,6 +70,7 @@
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.MessageBox;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.TableItem;
@@ -102,10 +106,13 @@
Image addImage;
Image removeImage;
+ Image latexImage;
+ Image previewImage;
Button ok;
Button cancel;
- Button editMaths;
+ Label editMaths;
+ Label previewButton;
ArrayList<String[]> values = new ArrayList<String[]>();
String[] newEntry = {
@@ -113,6 +120,8 @@
"Wrong",
};
+ String finalXml = null;
+
ArrayList<String[]> mathMLs = new ArrayList<String[]>();
SimpleChoiceWizard dis = this;
@@ -138,7 +147,11 @@
public void mouseUp(MouseEvent arg0) {
if (arg0.getSource() == cancel)
{
- close();
+ if (MessageDialog.openConfirm(dis.getShell(),"Are you sure?", "Cancelling will lose any work you may have done in the Simple Choice Wizard." +
+ " Are you sure?"))
+ {
+ close();
+ }
}
if ((arg0.getSource() == editMaths) && (!snuggle))
@@ -200,53 +213,78 @@
}
- if (arg0.getSource() == ok)
+ if (arg0.getSource() == previewButton)
{
- // get our array values
- ArrayList<Object[]> finalArray = new ArrayList<Object[]>();
-
- for (String[] value : values)
- {
- int correctVal = SimpleChoiceQuickCreator.WRONG;
- if (value[1].equals("Correct")) correctVal = SimpleChoiceQuickCreator.CORRECT;
- if (value[1].equals("\"Almost\"")) correctVal = SimpleChoiceQuickCreator.ALMOST;
- if (value[1].equals("Wrong")) correctVal = SimpleChoiceQuickCreator.WRONG;
-
- Object[] o = { putBackMathMLs(value[0]), correctVal };
- finalArray.add(o);
+ String xml = getXml();
+ //MQMain.mathQurateModel.setProxy(false); //temp
+ RendererView rendererView = new RendererView(
+ getShell());
+
+ try {
+ rendererView.uploadXml(xml);
+ } catch (Exception e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
}
- float correctScoreFloat = Float.valueOf(correctScore.getText().trim());
- float almostScoreFloat = Float.valueOf(almostScore.getText().trim());
- int hintDividerInt = Integer.valueOf(hintDivider.getText().trim());
- String titleString = title.getText().trim();
- String preambleString = preamble.getText().trim();
- String suffixString = suffix.getText().trim();
- String correctString = correctBlurb.getText().trim();
- String almostString = almostBlurb.getText().trim();
- String wrongString = wrongBlurb.getText().trim();
- String hintString = hintBlurb.getText().trim();
- String solutionString = solutionBlurb.getText().trim();
-
- titleString = putBackMathMLs(titleString);
- preambleString = putBackMathMLs(preambleString);
- suffixString = putBackMathMLs(suffixString);
- correctString = putBackMathMLs(correctString);
- almostString = putBackMathMLs(almostString);
- wrongString = putBackMathMLs(wrongString);
- hintString = putBackMathMLs(hintString);
- solutionString = putBackMathMLs(solutionString);
-
- SimpleChoiceQuickCreator.generateSimpleChoiceXML(finalArray, titleString, correctScoreFloat, almostScoreFloat,
- hintDividerInt, preambleString, suffixString, correctString, almostString,
- wrongString, hintString, solutionString);
-
- close();
+ rendererView.open();
}
+
+ if (arg0.getSource() == ok)
+ {
+ if (MessageDialog.openConfirm(dis.getShell(),"Are you sure?", "Proceeding will overwrite " +
+ "any existing question currently in the Mathqurate editor! Are you sure?"))
+ {
+ finalXml = getXml();
+ close();
+ }
+ }
}
};
+ public String getXml()
+ {
+ // get our array values
+ ArrayList<Object[]> finalArray = new ArrayList<Object[]>();
+
+ for (String[] value : values)
+ {
+ int correctVal = SimpleChoiceQuickCreator.WRONG;
+ if (value[1].equals("Correct")) correctVal = SimpleChoiceQuickCreator.CORRECT;
+ if (value[1].equals("\"Almost\"")) correctVal = SimpleChoiceQuickCreator.ALMOST;
+ if (value[1].equals("Wrong")) correctVal = SimpleChoiceQuickCreator.WRONG;
+
+ Object[] o = { putBackMathMLs(value[0]), correctVal };
+ finalArray.add(o);
+ }
+
+ float correctScoreFloat = Float.valueOf(correctScore.getText().trim());
+ float almostScoreFloat = Float.valueOf(almostScore.getText().trim());
+ int hintDividerInt = Integer.valueOf(hintDivider.getText().trim());
+ String titleString = title.getText().trim();
+ String preambleString = preamble.getText().trim();
+ String suffixString = suffix.getText().trim();
+ String correctString = correctBlurb.getText().trim();
+ String almostString = almostBlurb.getText().trim();
+ String wrongString = wrongBlurb.getText().trim();
+ String hintString = hintBlurb.getText().trim();
+ String solutionString = solutionBlurb.getText().trim();
+
+ titleString = putBackMathMLs(titleString);
+ preambleString = putBackMathMLs(preambleString);
+ suffixString = putBackMathMLs(suffixString);
+ correctString = putBackMathMLs(correctString);
+ almostString = putBackMathMLs(almostString);
+ wrongString = putBackMathMLs(wrongString);
+ hintString = putBackMathMLs(hintString);
+ solutionString = putBackMathMLs(solutionString);
+
+ return SimpleChoiceQuickCreator.generateSimpleChoiceXML(finalArray, titleString, correctScoreFloat, almostScoreFloat,
+ hintDividerInt, preambleString, suffixString, correctString, almostString,
+ wrongString, hintString, solutionString);
+ }
+
public String putBackMathMLs(String s)
{
Pattern p = Pattern.compile("#maths\\d+#");
@@ -398,6 +436,14 @@
"/org/qtitools/mathqurate/resources/32px-Crystal_Clear_action_edit_remove.png"));
removeImage = new Image(parentShell.getDisplay(),removeImage.getImageData().scaledTo(18,18));
+
+ latexImage = new Image(parentShell.getDisplay(),
+ SimpleChoiceWizard.class.getResourceAsStream(
+ "/org/qtitools/mathqurate/resources/latex-button.png"));
+
+ previewImage = new Image(parentShell.getDisplay(),
+ SimpleChoiceWizard.class.getResourceAsStream(
+ "/org/qtitools/mathqurate/resources/preview-simpleChoiceWizard.png"));
}
/* (non-Javadoc)
@@ -424,7 +470,7 @@
{
// title text text
new Label(parent,SWT.NONE).setText("Question Title");
- title = new Text(parent,SWT.WRAP);
+ title = new Text(parent,SWT.WRAP | SWT.BORDER);
GridData titlelayout = new GridData(SWT.DEFAULT,SWT.DEFAULT);
titlelayout.horizontalAlignment = GridData.FILL;
titlelayout.grabExcessHorizontalSpace = true;
@@ -434,7 +480,7 @@
// preamble text
new Label(parent,SWT.NONE).setText("Question Text");
- preamble = new Text(parent,SWT.WRAP);
+ preamble = new Text(parent,SWT.WRAP | SWT.BORDER);
preambleLayout = new GridData(1,50);
preambleLayout.horizontalAlignment = GridData.FILL;
preambleLayout.grabExcessHorizontalSpace = true;
@@ -445,7 +491,8 @@
tableViewer.setInput(values);
tableViewer.refresh();
tableViewer.getTable().setToolTipText(toolTipWrap("This table is where you should enter the potential "+
- "answers to your question. In the first column fill out " +
+ "answers to your question. Click the + and - buttons to add" +
+ "and delete rows respectively. In the first column fill out " +
"the text for the possible answer. In the second column, "+
"select whether the question is correct, \"almost "+
"correct\", or wrong. (The \"almost\" option allows you to "+
@@ -461,75 +508,16 @@
tableLayout.grabExcessVerticalSpace = true;
tableViewer.getControl().setLayoutData(tableLayout);
-/* Composite choiceBit = new Composite(parent, SWT.BORDER);
- {
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- layout.makeColumnsEqualWidth = false;
-
- layout.horizontalSpacing = 10;
- layout.verticalSpacing = 0;
- layout.marginTop = 0;
- layout.marginBottom = 0;
-
- choiceBit.setLayout(layout);
- new Label(choiceBit,SWT.NONE).setText("Choice text");
- new Label(choiceBit,SWT.NONE).setText("Correct?");
- //new Label(choiceBit,SWT.NONE).setText("");
-
- GridData inputWidth = new GridData(GridData.FILL_HORIZONTAL);
- inputWidth.widthHint = 300;
- choiceInput = new Text(choiceBit,SWT.NONE);
- choiceInput.setLayoutData(inputWidth);
-
- choiceCorrect = new Combo(choiceBit,SWT.READ_ONLY);
- choiceCorrect.add("Correct");
- choiceCorrect.add("\"Almost\"");
- choiceCorrect.add("Wrong");
- choiceCorrect.select(2);
- //choiceCorrect.pack();
-
- Composite choiceButtons = new Composite(choiceBit, SWT.NONE);
- {
- GridLayout choiceLayout = new GridLayout();
- choiceLayout.numColumns = 4;
- choiceLayout.marginHeight = 0;
- choiceLayout.marginWidth = 0;
- layout.horizontalSpacing = 0;
- layout.verticalSpacing = 0;
- layout.marginTop = 0;
- layout.marginBottom = 0;
-
- choiceButtons.setLayout(choiceLayout);
-
- mathML = new Button(choiceButtons,SWT.NONE);
- mathML.setText("MathML");
-
- html = new Button(choiceButtons,SWT.NONE);
- html.setText("HTML");
-
- clear = new Button(choiceButtons,SWT.NONE);
- clear.setText("Clear");
- }
-
- addButton = new Button(choiceBit,SWT.NONE);
- GridData abgd = new GridData();
- abgd.horizontalAlignment = SWT.RIGHT;
- addButton.setText("+");
- addButton.setLayoutData(abgd);
-
- addButton.addMouseListener(listener);
-
- } */
-
// Suffix text
new Label(parent,SWT.NONE).setText("Question Suffix Text");
- suffix = new Text(parent,SWT.WRAP);
+ suffix = new Text(parent,SWT.WRAP | SWT.BORDER);
//GridData suffixLay = new GridData(1,50);
//preambleLayout.horizontalAlignment = GridData.FILL;
//preambleLayout.grabExcessHorizontalSpace = true;
suffix.setLayoutData(preambleLayout);
-
+ suffix.setToolTipText(toolTipWrap("Any text here will be displayed at the bottom of your question. "+
+ "You might want to use this to indicate to the student how many marks the question is worth."));
+
GridLayoutFactory.fillDefaults().numColumns(1).margins(
LayoutConstants.getMargins()).generateLayout(parent);
@@ -538,27 +526,34 @@
Composite secondParent = new Composite(twoPanes,SWT.BORDER);
{
new Label(secondParent,SWT.NONE).setText("Response for correct answer");
- correctBlurb = new Text(secondParent,SWT.WRAP);
+ correctBlurb = new Text(secondParent,SWT.WRAP | SWT.BORDER);
correctBlurb.setLayoutData(preambleLayout);
correctBlurb.setText("Well done! That is correct!");
-
+ correctBlurb.setToolTipText(toolTipWrap("This text is displayed if the student selects the correct answer."));
+
new Label(secondParent,SWT.NONE).setText("Response for \"almost correct\" answer");
- almostBlurb = new Text(secondParent,SWT.WRAP);
+ almostBlurb = new Text(secondParent,SWT.WRAP | SWT.BORDER);
almostBlurb.setLayoutData(preambleLayout);
almostBlurb.setText("Almost right, but not quite!");
+ almostBlurb.setToolTipText(toolTipWrap("This text is displayed if the student selects an \"almost correct\" " +
+ "answer. If none of your answers are marked as \"almost correct\" then this will never be used."));
new Label(secondParent,SWT.NONE).setText("Response for wrong answer");
- wrongBlurb = new Text(secondParent,SWT.WRAP);
+ wrongBlurb = new Text(secondParent,SWT.WRAP | SWT.BORDER);
wrongBlurb.setLayoutData(preambleLayout);
wrongBlurb.setText("Sorry, that's the wrong answer.");
-
+ wrongBlurb.setToolTipText(toolTipWrap("This text is displayed if the student selects the wrong answer."));
+
new Label(secondParent,SWT.NONE).setText("Hint text");
- hintBlurb = new Text(secondParent,SWT.WRAP);
+ hintBlurb = new Text(secondParent,SWT.WRAP | SWT.BORDER);
hintBlurb.setLayoutData(preambleLayout);
-
+ hintBlurb.setToolTipText(toolTipWrap("This text is displayed when the student requests a hint. Use it to give them a clue to the correct answer."));
+
new Label(secondParent,SWT.NONE).setText("Solution text");
- solutionBlurb = new Text(secondParent,SWT.WRAP);
+ solutionBlurb = new Text(secondParent,SWT.WRAP | SWT.BORDER);
solutionBlurb.setLayoutData(preambleLayout);
+ hintBlurb.setToolTipText(toolTipWrap("This text is displayed if the student asked for the solution. If you don't wish to allow the student " +
+ "this option,you might wish to simply put something like \"Sorry, the solution is not available\" here."));
GridLayoutFactory.fillDefaults().numColumns(1).margins(
LayoutConstants.getMargins()).generateLayout(secondParent);
@@ -568,9 +563,10 @@
RowLayout oddLayout = new RowLayout();
scoreField.setLayout(oddLayout);
new Label(scoreField,SWT.NONE).setText("Score for correct answer ");
- correctScore = new Text(scoreField,SWT.NONE);
+ correctScore = new Text(scoreField,SWT.NONE | SWT.BORDER);
correctScore.setText("10");
correctScore.setLayoutData(new RowData(40,SWT.DEFAULT));
+ correctScore.setToolTipText(toolTipWrap("Enter the score/marks gained for selecting the correct answer."));
}
Composite almostField = new Composite(secondParent,SWT.NONE);
@@ -578,9 +574,11 @@
RowLayout oddLayout = new RowLayout();
almostField.setLayout(oddLayout);
new Label(almostField,SWT.NONE).setText("Score for \"almost\" correct ");
- almostScore = new Text(almostField,SWT.NONE);
+ almostScore = new Text(almostField,SWT.NONE | SWT.BORDER);
almostScore.setText("5");
almostScore.setLayoutData(new RowData(40,SWT.DEFAULT));
+ almostScore.setToolTipText(toolTipWrap("Enter the score gained for an \"almost correct\" " +
+ "answer. If none of your answers are marked as \"almost correct\" then this will never be used."));
}
Composite dividerField = new Composite(secondParent,SWT.NONE);
@@ -588,17 +586,35 @@
RowLayout oddLayout = new RowLayout();
dividerField.setLayout(oddLayout);
new Label(dividerField,SWT.NONE).setText("Hint score divider ");
- hintDivider = new Text(dividerField,SWT.NONE);
+ hintDivider = new Text(dividerField,SWT.NONE | SWT.BORDER);
hintDivider.setText("2");
hintDivider.setLayoutData(new RowData(40,SWT.DEFAULT));
+ hintDivider.setToolTipText(toolTipWrap("Enter a number by which the student's final score will" +
+ "be divided if they have to use the hint option. The default number 2 will half their" +
+ "final mark. Enter 1 if you don't want to deduct marks for using the hint option."));
}
}
-
+
+ Composite graphicsButtons = new Composite(twoPanes,SWT.NONE);
+ {
+ graphicsButtons.setLayout(new RowLayout());
+ editMaths = new Label(graphicsButtons,SWT.TOP);
+ //editMaths.setText("Edit Maths");
+ editMaths.setImage(latexImage);
+ editMaths.addMouseListener(listener);
+ editMaths.setToolTipText(toolTipWrap("Click this to insert a new maths area, or, highlight an existing" +
+ " maths area and click this to edit."));
+ previewButton = new Label(graphicsButtons,SWT.TOP);
+ //editMaths.setText("Edit Maths");
+ previewButton.setImage(previewImage);
+ previewButton.addMouseListener(listener);
+ previewButton.setToolTipText(toolTipWrap("Click this to preview your question in the current MathAssessEngine (you can change this in Mathqurate's settings)."));
+ }
+ GridDataFactory.fillDefaults()./*span(2, 1).*/align(SWT.LEFT,
+ SWT.TOP).applyTo(graphicsButtons);
+
Composite buttonBar = new Composite(twoPanes, SWT.NONE);
{
- editMaths = new Button(buttonBar,SWT.NONE);
- editMaths.setText("Edit Maths");
- editMaths.addMouseListener(listener);
ok = new Button(buttonBar,SWT.NONE);
@@ -614,7 +630,7 @@
GridLayoutFactory.fillDefaults().numColumns(3).generateLayout(
buttonBar);
}
- GridDataFactory.fillDefaults().span(2, 1).align(SWT.RIGHT,
+ GridDataFactory.fillDefaults()./*span(2, 1).*/align(SWT.RIGHT,
SWT.BOTTOM).applyTo(buttonBar);
@@ -832,8 +848,8 @@
*/
@Override
protected void initializeBounds() {
- getShell().setMinimumSize(750,600);
- getShell().setSize(900, 600);
+ getShell().setMinimumSize(750,650);
+ getShell().setSize(900, 650);
getShell().setLocation(0, 0);
}
@@ -844,6 +860,15 @@
sw.open();
}
+ public static String makeMCQ()
+ {
+ SimpleChoiceWizard sw = new SimpleChoiceWizard(new Shell());
+ sw.setBlockOnOpen(true);
+ sw.setShellStyle(SWT.APPLICATION_MODAL | SWT.TITLE | SWT.RESIZE);
+ sw.open();
+ return sw.finalXml;
+ }
+
/* public static void main(String[] args)
{
putBackMathMLs("#maths12112#");
Modified: Mathqurate/trunk/mathqurate/src/main/java/org/qtitools/mathqurate/view/SnuggleTeXView.java
===================================================================
--- Mathqurate/trunk/mathqurate/src/main/java/org/qtitools/mathqurate/view/SnuggleTeXView.java 2010-03-25 16:30:23 UTC (rev 2398)
+++ Mathqurate/trunk/mathqurate/src/main/java/org/qtitools/mathqurate/view/SnuggleTeXView.java 2010-03-26 11:04:28 UTC (rev 2399)
@@ -412,8 +412,8 @@
@Override
protected void initializeBounds() {
- getShell().setMinimumSize(400,400);
- //getShell().setSize(900, 600);
+ getShell().setMinimumSize(300,300);
+ getShell().setSize(450, 400);
getShell().setLocation(0, 0);
}
Added: Mathqurate/trunk/mathqurate/src/main/resources/org/qtitools/mathqurate/resources/32px-wizard.png
===================================================================
(Binary files differ)
Property changes on: Mathqurate/trunk/mathqurate/src/main/resources/org/qtitools/mathqurate/resources/32px-wizard.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: Mathqurate/trunk/mathqurate/src/main/resources/org/qtitools/mathqurate/resources/latex-button.png
===================================================================
(Binary files differ)
Property changes on: Mathqurate/trunk/mathqurate/src/main/resources/org/qtitools/mathqurate/resources/latex-button.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: Mathqurate/trunk/mathqurate/src/main/resources/org/qtitools/mathqurate/resources/preview-simpleChoiceWizard.png
===================================================================
(Binary files differ)
Property changes on: Mathqurate/trunk/mathqurate/src/main/resources/org/qtitools/mathqurate/resources/preview-simpleChoiceWizard.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Modified: Mathqurate/trunk/mathqurate/src/main/resources/org/qtitools/mathqurate/resources/simpleChoiceTemplate.xml
===================================================================
--- Mathqurate/trunk/mathqurate/src/main/resources/org/qtitools/mathqurate/resources/simpleChoiceTemplate.xml 2010-03-25 16:30:23 UTC (rev 2398)
+++ Mathqurate/trunk/mathqurate/src/main/resources/org/qtitools/mathqurate/resources/simpleChoiceTemplate.xml 2010-03-26 11:04:28 UTC (rev 2399)
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<assessmentItem xmlns="http://www.imsglobal.org/xsd/imsqti_v2p1" xmlns:lip="http://www.imsglobal.org/xsd/imslip_v1p0" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:ma="http://mathassess.qtitools.org/xsd/mathassess" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" adaptive="true" identifier="pn-123" timeDependent="false" title="{{TITLE}}" toolName="Mathqurate" toolVersion="0.9.7">
+<assessmentItem xmlns="http://www.imsglobal.org/xsd/imsqti_v2p1" xmlns:lip="http://www.imsglobal.org/xsd/imslip_v1p0" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:ma="http://mathassess.qtitools.org/xsd/mathassess" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" adaptive="true" identifier="pn-123" timeDependent="false" title="{{TITLE}}" toolName="Mathqurate" toolVersion="0.9.7" xsi:schemaLocation="http://www.imsglobal.org/xsd/imsqti_v2p1 imsqti_v2p1.xsd http://mathassess.qtitools.org/xsd/mathassess mathassess.xsd">
<!--<responseDeclaration cardinality="record" identifier="RESPONSE"/>-->
<responseDeclaration identifier="RESPONSE"
cardinality="single" baseType="identifier">
@@ -12,7 +12,7 @@
<responseDeclaration baseType="boolean" cardinality="single" identifier="SOLREQUEST"/>
<outcomeDeclaration baseType="identifier" cardinality="multiple" identifier="FEEDBACK"/>
<outcomeDeclaration baseType="identifier" cardinality="single" identifier="EMPTY"/>
- <outcomeDeclaration baseType="float" cardinality="single" identifier="SCORE">
+ <outcomeDeclaration baseType="float" cardinality="single" identifier="SCORE" normalMaximum="{{CORRECTMARK}}">
<defaultValue>
<value>0</value>
</defaultValue>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|