visible in test items

visible in test items

by Steve Strong -
Number of replies: 6
OUCH!!! This REALLY ticks me off!

I am using Moodle to teach Computer Science and format the questions using HTML format, use the regular moodle forms and <xmp> tags to format code within the questions.

All of a sudden all of the questions formated this way have these stupid break tags at the end of every line.

(can you tell I'm upset?)

How do I get rid of them????
steve
Average of ratings: -
In reply to Steve Strong

Re: visible in test items

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Sorry you're upset - I'll give you a full refund on the purchase price. wink

Which question type was it and which Moodle version was it?

The XMP tag is very old and actually isn't even supported by Moodle. Try the PRE tag.
    if (isadmin()) {
if (moodle_needs_upgrading()) {
redirect("$CFG->wwwroot/$CFG->admin/index.php");
}
}


In reply to Martin Dougiamas

Re: visible in test items

by Steve Strong -
changing from <xmp> to <pre> works great, but extra lines get added.

remember that the tag showing in <xmp> was <br />???

hmmm

anyhow, thanks!
steve
In reply to Steve Strong

Re: visible in test items

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
If extra lines are being added then I suspect you are not using HTML format at all, but Moodle auto-format.  See the little format selection menu under the textarea where you type the question.
In reply to Martin Dougiamas

Re: visible in test items

by Steve Strong -
not exactly, but close: the items in question were ORIGINALLY written using Moodle format, but were re-written using html format.  It appears to me that I can't remove the break tags added by the Moodle format to enforce line breaks.  True? 

On a related note, <pre> does not allow <big> tags to be displayed instead of interpreted by the browser, but <xmp> does.  So, while use of the <pre> tags prevented the display of the <br /> tags added by the Moodle format, they don't remove the break tags and they don't allow me to display all of the tags I'd like to teach my students.

Just trying to help smile
steve
In reply to Steve Strong

Re: visible in test items

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
I'm a bit confused about what you're doing there, but in any case I can recommend enabling the HTML editor and just using that.  It will convert < and > to entities and so "just work".
In reply to Martin Dougiamas

Re: visible in test items

by Steve Strong -
What we need to do is be able to display html tags and java code without the tags being interpreted (and not displayed) by the browser and without losing the formating of the java source code.

It seems that the <br /> tags put in by the Moodle editor can't be removed after we change the test items to be html format.

Does this make more sense now or am I missing something?
steve