protected function get_context_by_category_id($category) {
        global $DB;
        $contextid = $DB->get_field('question_categories', 'contextid', array('id'=>$category));
        $context = context::instance_by_id($contextid, IGNORE_MISSING);
        return $context;
    }
protected function get_context_by_category_id($category) {
        global $DB;
        $contextid = $DB->get_field('question_categories', 'contextid', array('id'=>$category));
        $context = context::instance_by_id($contextid, IGNORE_MISSING);
        return $context;
    }
protected function get_context_by_category_id ( $ category ) { global $ DB ; $ contextid = $ DB -> get_field ( 'question_categories' , 'contextid' , array ( 'id' => $ category ) ) ; $ context = context :: instance_by_id ( $ contextid , IGNORE_MISSING ) ; return $ context ; }
Get question context by category id
@param int $category
@return object $context
Get question context by category id