public function importQTIFile($qtiFile, core_kernel_classes_Class $itemClass, $validate = true)
    {
        $report = null;

        try {

            $qtiModel = $this->createQtiItemModel($qtiFile, $validate);
            $rdfItem = $this->createRdfItem($itemClass, $qtiModel);

            $report = \common_report_Report::createSuccess(__('The IMS QTI Item was successfully imported.'), $rdfItem);

        } catch (ValidationException $ve) {
            $report = \common_report_Report::createFailure(__('The IMS QTI Item could not be imported.'));
            $report->add($ve->getReport());
        }

        return $report;
    }
public function importQTIFile($qtiFile, core_kernel_classes_Class $itemClass, $validate = true)
    {
        $report = null;

        try {

            $qtiModel = $this->createQtiItemModel($qtiFile, $validate);
            $rdfItem = $this->createRdfItem($itemClass, $qtiModel);

            $report = \common_report_Report::createSuccess(__('The IMS QTI Item was successfully imported.'), $rdfItem);

        } catch (ValidationException $ve) {
            $report = \common_report_Report::createFailure(__('The IMS QTI Item could not be imported.'));
            $report->add($ve->getReport());
        }

        return $report;
    }
public function importQTIFile ( $ qtiFile , core_kernel_classes_Class $ itemClass , $ validate = true ) { $ report = null ; try { $ qtiModel = $ this -> createQtiItemModel ( $ qtiFile , $ validate ) ; $ rdfItem = $ this -> createRdfItem ( $ itemClass , $ qtiModel ) ; $ report = \ common_report_Report :: createSuccess ( __ ( 'The IMS QTI Item was successfully imported.' ) , $ rdfItem ) ; } catch ( ValidationException $ ve ) { $ report = \ common_report_Report :: createFailure ( __ ( 'The IMS QTI Item could not be imported.' ) ) ; $ report -> add ( $ ve -> getReport ( ) ) ; } return $ report ; }
Short description of method importQTIFile

@access public
@author Joel Bout, <joel.bout@tudor.lu>
@param $qtiFile
@param core_kernel_classes_Class $itemClass
@param bool $validate
@throws \common_Exception
@throws \common_ext_ExtensionException
@throws common_exception_Error
@return common_report_Report
Short description of method importQTIFile