diff --git a/mod/quiz/format/xhtml/format.php b/mod/quiz/format/xhtml/format.php
new file mode 100755
index 00000000000..3970ebd1de2
--- /dev/null
+++ b/mod/quiz/format/xhtml/format.php
@@ -0,0 +1,127 @@
+id;
+
+ // add comment and div tags
+ $expout .= "\n";
+ $expout .= "
\n";
+
+ // add header
+ $expout .= "
$question->name \n";
+
+ // add question text
+ $expout .= "
$question->questiontext
\n";
+
+ // selection depends on question type
+ switch($question->qtype) {
+ case TRUEFALSE:
+ $st_true = get_string( 'true','quiz' );
+ $st_false = get_string( 'false','quiz' );
+ $expout .= "
\n";
+ break;
+ case MULTICHOICE:
+ $expout .= "
\n";
+ break;
+ case SHORTANSWER:
+ $expout .= "
\n";
+ break;
+ case NUMERICAL:
+ $expout .= '
\n';
+ $expout .= " \n";
+ $expout .= "
\n";
+ break;
+ case MATCH:
+ $expout .= "
";
+ break;
+ case DESCRIPTION:
+ break;
+ case MULTIANSWER:
+ $expout .= "\n";
+ break;
+ default:
+ notify("No handler for qtype $question->qtype for GIFT export" );
+ }
+ // close off div
+ $expout .= "
\n\n\n";
+ return $expout;
+}
+
+
+function presave_process( $content ) {
+ // override method to allow us to add xhtml headers and footers
+
+ $xp = "\n";
+ $xp .= "\n";
+ $xp .= "\n";
+ $xp .= "