public function get_context_from_competency(competency $competency) {
        $frameworkid = $competency->get('competencyframeworkid');
        if (!isset($this->frameworkscontexts[$frameworkid])) {
            $framework = $this->get_framework_from_competency($competency);
            $this->frameworkscontexts[$frameworkid] = $framework->get_context();
        }
        return $this->frameworkscontexts[$frameworkid];
    }