public static function delete_template($id, $deleteplans = true) {
        $params = self::validate_parameters(self::delete_template_parameters(), array(
            'id' => $id,
            'deleteplans' => $deleteplans,
        ));

        $template = api::read_template($params['id']);
        self::validate_context($template->get_context());

        return api::delete_template($params['id'], $params['deleteplans']);
    }
public static function delete_template($id, $deleteplans = true) {
        $params = self::validate_parameters(self::delete_template_parameters(), array(
            'id' => $id,
            'deleteplans' => $deleteplans,
        ));

        $template = api::read_template($params['id']);
        self::validate_context($template->get_context());

        return api::delete_template($params['id'], $params['deleteplans']);
    }
public static function delete_template ( $ id , $ deleteplans = true ) { $ params = self :: validate_parameters ( self :: delete_template_parameters ( ) , array ( 'id' => $ id , 'deleteplans' => $ deleteplans , ) ) ; $ template = api :: read_template ( $ params [ 'id' ] ) ; self :: validate_context ( $ template -> get_context ( ) ) ; return api :: delete_template ( $ params [ 'id' ] , $ params [ 'deleteplans' ] ) ; }
Delete a learning plan template

@param int $id The learning plan template id
@param boolean $deleteplans True to delete the plans associated to template or false to unlink them
@return boolean
Delete a learning plan template