MDL-20442 - now you can switch to ignore empty submits
authorAndreas Grabs <info@grabs-edv.de>
Thu, 13 May 2010 10:48:24 +0000 (10:48 +0000)
committerAndreas Grabs <info@grabs-edv.de>
Thu, 13 May 2010 10:48:24 +0000 (10:48 +0000)
MDL-14534 - now you can remove 'Not selected' option

mod/feedback/backup/moodle2/backup_feedback_stepslib.php
mod/feedback/export.php
mod/feedback/import.php

index 957283d..12b728d 100644 (file)
@@ -72,7 +72,8 @@ class backup_feedback_activity_structure_step extends backup_activity_structure_
                                                 'typ',
                                                 'hasvalue',
                                                 'position',
-                                                'required'));
+                                                'required',
+                                                'options'));
 
         $trackings = new backup_nested_element('trackings');
 
index e8c4390..e043da5 100644 (file)
@@ -101,6 +101,16 @@ function feedback_get_xml_data($feedbackid) {
         //end of presentation
         $data .= $space.$space.$space.'</PRESENTATION>'."\n";
 
+        //start of options
+        $data .= $space.$space.$space.'<OPTIONS>'."\n";
+        //start of CDATA
+        $data .= $space.$space.$space.$space.'<![CDATA[';
+        $data .= $item->options;
+        //end of CDATA
+        $data .= ']]>'."\n";
+        //end of options
+        $data .= $space.$space.$space.'</OPTIONS>'."\n";
+
         //end of item
         $data .= $space.$space.'</ITEM>'."\n";
     }
index d74f921..37e92ea 100644 (file)
             $newitem->typ = $typ;
             $newitem->name = trim($item['#']['ITEMTEXT'][0]['#']);
             $newitem->label = trim($item['#']['ITEMLABEL'][0]['#']);
+            $newitem->options = trim($item['#']['OPTIONS'][0]['#']);
             $newitem->presentation = trim($item['#']['PRESENTATION'][0]['#']);
             //check old types of radio, check, and so on
             switch($oldtyp) {