<input type="checkbox" name="allow_test_import" id="allow_test_import" checked="checked" />
<label for="allow_test_import"><?php echo _AT('test_import_package'); ?></label> <br />
<input type="checkbox" name="allow_a4a_import" id="allow_a4a_import" checked="checked" />
- <label for="allow_a4a_import"><?php echo _AT('a4a_import_package'); ?></label>
+ <label for="allow_a4a_import"><?php echo _AT('a4a_import_package'); ?></label><br />
+ <input type="checkbox" name="ignore_validation" id="ignore_validation" value="1" />
+ <label for="ignore_validation"><?php echo _AT('ignore_validation'); ?></label> <br />
</div>
<div class="row">
<xs:element name="response_xy" type="response_xyType" minOccurs="0" maxOccurs="0" />\r
<xs:element name="response_str" type="response_strType" />\r
<xs:element name="response_num" type="response_numType" minOccurs="0" maxOccurs="0" />\r
- <xs:element name="response_grp" type="response_grpType" minOccurs="0" maxOccurs="0" />\r
+ <xs:element name="response_grp" type="response_grpType" />\r
<xs:element ref="response_extension" minOccurs="0" maxOccurs="0" />\r
</xs:choice>\r
<xs:attribute name="class" type="xs:string" default="Block" />\r
*/
// Check if all the files exists in the manifest, iff it's a IMS CC package.
if ($content_type == 'IMS Common Cartridge') {
+ //If user chooses to ignore validation.
+ if(isset($_POST['ignore_validation']) && $_POST['ignore_validation']==1) {
+ $skip_ims_validation = true;
+ }
checkResources($import_path);
}
if (is_array($xml->choices[$loopcounter])){
foreach ($xml->choices[$loopcounter] as $choiceNum=>$choiceOpt){
if (sizeof($test_obj['groups'] )>0 && is_array($xml->answers[$loopcounter])) {
- foreach ($xml->answers[$loopcounter] as $ansNum=>$ansOpt){
- if ($choiceNum == $ansOpt){
- //Not exactly efficient, worst case N^2
- $test_obj['answers'][$ansNum] = $i;
- }
- }
+ if (!empty($xml->answers[$loopcounter])){
+ foreach ($xml->answers[$loopcounter] as $ansNum=>$ansOpt){
+ if ($choiceNum == $ansOpt){
+ //Not exactly efficient, worst case N^2
+ $test_obj['answers'][$ansNum] = $i;
+ }
+ }
+ }
} else {
//save answer(s)
if (is_array($xml->answers[$loopcounter]) && in_array($choiceNum, $xml->answers[$loopcounter])){
case 'FIB-string':
return 3;
break;
+ case 'Drag-and-drop':
+ return 5;
+ break;
case 'Multiple-response':
return 7;
break;
<?php endfor; ?>
</select>
- <?php echo $row['choice_'.$i]; ?></li>
+ <?php echo AT_print($row['choice_'.$i], 'tests_questions.question'); ?></li>
<?php endif; ?>
<?php endfor; ?>
</ul>
<ol style="position: absolute; list-style-type: upper-alpha; top: 10px; left: 310px" id="a">
<?php for ($i=0; $i < 10; $i++): ?>
<?php if ($row['option_'. $i] != ''): ?>
- <li class="answer" id="a<?php echo $i; ?>" value="<?php echo $i; ?>"><?php echo $_letters[$i]; ?>. <?php echo $row['option_'.$i]; ?></li>
+ <li class="answer" id="a<?php echo $i; ?>" value="<?php echo $i; ?>"><?php echo $_letters[$i]; ?>. <?php echo AT_print($row['option_'.$i], 'tests_questions.question'); ?></li>
<?php endif; ?>
<?php endfor; ?>
</ol>