public static function create_cartridge($toolid) {
        $cartridge = new \DOMDocument();
        $cartridge->load(realpath(__DIR__ . '/../xml/imslticc.xml'));
        $xpath = new \DOMXpath($cartridge);
        $xpath->registerNamespace('cc', 'http://www.imsglobal.org/xsd/imslticc_v1p0');
        $parameters = self::get_cartridge_parameters($toolid);
        self::set_xpath($xpath, $parameters);

        return $cartridge->saveXML();
    }
public static function create_cartridge($toolid) {
        $cartridge = new \DOMDocument();
        $cartridge->load(realpath(__DIR__ . '/../xml/imslticc.xml'));
        $xpath = new \DOMXpath($cartridge);
        $xpath->registerNamespace('cc', 'http://www.imsglobal.org/xsd/imslticc_v1p0');
        $parameters = self::get_cartridge_parameters($toolid);
        self::set_xpath($xpath, $parameters);

        return $cartridge->saveXML();
    }
public static function create_cartridge ( $ toolid ) { $ cartridge = new \ DOMDocument ( ) ; $ cartridge -> load ( realpath ( __DIR__ . '/../xml/imslticc.xml' ) ) ; $ xpath = new \ DOMXpath ( $ cartridge ) ; $ xpath -> registerNamespace ( 'cc' , 'http://www.imsglobal.org/xsd/imslticc_v1p0' ) ; $ parameters = self :: get_cartridge_parameters ( $ toolid ) ; self :: set_xpath ( $ xpath , $ parameters ) ; return $ cartridge -> saveXML ( ) ; }
Create an IMS cartridge for the tool.

@param int $toolid The id of the shared tool
@return string representing the generated cartridge
@since Moodle 3.2
Create an IMS cartridge for the tool .