public static function extract_archive($archive_path, $to_path = '')
 {
     $to_path = empty($to_path) ? MoodleUtil::create_temp_directory() : $to_path;
     $zipper = new zip_packer();
     if ($zipper->extract_to_pathname($archive_path, $to_path)) {
         return $to_path;
     } else {
         return false;
     }
 }
 public function init()
 {
     $this->question_count = 0;
     $this->manifest = new ImsCpmanifestWriter();
     $manifest = $this->manifest->add_manifest();
     $this->manifest_organization = $manifest->add_organizations()->add_organization();
     $this->manifest_resources = $manifest->add_resources();
     if (!($this->temp = MoodleUtil::create_temp_directory())) {
         return $this->notify_lang('cannotcreatepath');
     } else {
         return true;
     }
 }