--- ./wct_qti_lib.php 2006-06-26 06:29:32.000000000 -0400 +++ ./wct_qti_lib.php 2008-04-04 18:11:39.000000000 -0400 @@ -572,14 +599,21 @@ //err("
wct_qti_get_question_image - URI in XML: $imagematch[1]
"); $image = ($dirbase!='' ? substr($dirbase, 1+strlen($filebase)).'/' : '') . $imagematch[1]; //err("wct_qti_get_question_image - Result: $image
"); + + // Create directory if needed + if(preg_match('{^(.*)\/[^\/]*$}s', $image, $directory)) { + mkdir($CFG->dataroot.'/'.$courseid.'/'.$directory[1]); + } + copy($dirbase.'/'.$imagematch[1], $CFG->dataroot.'/'.$courseid.'/'.$image); }else{ $image = ''; } return $image; } - function decideItemType($obj){ global $logpage, $data; // This is clearly separated from the above decision so that it can be changed later.