protected function get_subscription_from_rowdata($rowdata) {
        $sub = new \stdClass();
        $sub->id = $rowdata->subid;
        $sub->userid = $rowdata->subuserid;
        $sub->courseid = $rowdata->subcourseid;
        $sub->cmid = $rowdata->subcmid;
        $sub->inactivedate = $rowdata->subinactivedate;
        return $sub;
    }