public function get_slot_by_id($slotid) {
        if (!array_key_exists($slotid, $this->slots)) {
            throw new \coding_exception('The \'slotid\' could not be found.');
        }
        return $this->slots[$slotid];
    }
public function get_slot_by_id($slotid) {
        if (!array_key_exists($slotid, $this->slots)) {
            throw new \coding_exception('The \'slotid\' could not be found.');
        }
        return $this->slots[$slotid];
    }
public function get_slot_by_id ( $ slotid ) { if ( ! array_key_exists ( $ slotid , $ this -> slots ) ) { throw new \ coding_exception ( 'The \'slotid\' could not be found.' ) ; } return $ this -> slots [ $ slotid ] ; }
Get a slot by it's id. Throws an exception if it is missing.
@param int $slotid the slot id.
@return \stdClass the requested quiz_slots row.
Get a slot by it s id . Throws an exception if it is missing .