[kde-edu]: Help needed: Python/Perl/Ruby-skript

Carsten Niehaus cniehaus at gmx.de
Fri May 7 22:58:14 CEST 2004


Hi

In the attached file (I hope 10kb is ok to attach!) You see the questions in 
Kalziums old format. As the new version uses XML I need a skript to convert 
the old file. I can do it with vim but that takes ages. 
If someone has the time and the abilities to write a nice script that would be 
great. 

* The "grade" can always be set to 2, I will look through all questions anyway 
and adjust it. 
* The "true" answers is in the  old format the String after "A=".
* The two "Alternative"-Strings are always wrong. 
* The [q1]-information is no longer needed so it can be removed.
* All questions are currently stored in the "kalziumrc" file

New:
      <task grade="2">
                <question text="Which of these old molecules is not an 
alcohol" />
                <answer type="true" text="Propanal" />
                <answer type="false" text="Methnol" />
                <answer type="false" text="Pentanol" />
        </task>

Old:
[q1]
Q=Which of these molecules is not an alcohol?
A=Propanal
Alternative1=Methanol
Alternative2=Pentanol

Carsten
-------------- next part --------------
A non-text attachment was scrubbed...
Name: questions.xml
Type: text/xml
Size: 348 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kde-edu/attachments/20040507/af4b3906/questions.xml


More information about the kde-edu mailing list