public function get_dataset_definitions_category($form) {
        global $CFG, $DB;
        $datasetdefs = array();
        $lnamemax = 30;
        if (!empty($form->category)) {
            $sql = "SELECT i.*, d.*
                      FROM {question_datasets} d, {question_dataset_definitions} i
                     WHERE i.id = d.datasetdefinition AND i.category = ?";
            if ($records = $DB->get_records_sql($sql, array($form->category))) {
                foreach ($records as $r) {
                    if (!isset ($datasetdefs["{$r->name}"])) {
                        $datasetdefs["{$r->name}"] = $r->itemcount;
                    }
                }
            }
        }
        return $datasetdefs;
    }
public function get_dataset_definitions_category($form) {
        global $CFG, $DB;
        $datasetdefs = array();
        $lnamemax = 30;
        if (!empty($form->category)) {
            $sql = "SELECT i.*, d.*
                      FROM {question_datasets} d, {question_dataset_definitions} i
                     WHERE i.id = d.datasetdefinition AND i.category = ?";
            if ($records = $DB->get_records_sql($sql, array($form->category))) {
                foreach ($records as $r) {
                    if (!isset ($datasetdefs["{$r->name}"])) {
                        $datasetdefs["{$r->name}"] = $r->itemcount;
                    }
                }
            }
        }
        return $datasetdefs;
    }
public function get_dataset_definitions_category ( $ form ) { global $ CFG , $ DB ; $ datasetdefs = array ( ) ; $ lnamemax = 30 ; if ( ! empty ( $ form -> category ) ) { $ sql = "SELECT i.*, d.*
                      FROM {question_datasets} d, {question_dataset_definitions} i
                     WHERE i.id = d.datasetdefinition AND i.category = ?" ; if ( $ records = $ DB -> get_records_sql ( $ sql , array ( $ form -> category ) ) ) { foreach ( $ records as $ r ) { if ( ! isset ( $ datasetdefs [ "{$r->name}" ] ) ) { $ datasetdefs [ "{$r->name}" ] = $ r -> itemcount ; } } } } return $ datasetdefs ; }
This function retrieve the item count of the available category shareable
wild cards that is added as a comment displayed when a wild card with
the same name is displayed in datasetdefinitions_form.php
This function retrieve the item count of the available category shareable wild cards that is added as a comment displayed when a wild card with the same name is displayed in datasetdefinitions_form . php