$PAGE->set_url('/blocks/intuitel/IntuitelProxy.php');
    $cmid = required_param('cmid', PARAM_INT);
    session_write_close();
    // Release the session to avoid block requests while waiting intuitel response.
    $adaptor = Intuitel::getAdaptorInstance();
    // Location.
    $dpi = optional_param('pixel_density', null, PARAM_INTEGER);
    if ($dpi != null) {
        $adaptor->registerEnvironment('dDensity', "{$dpi}", $USER, time());
    }
    /*
     * Some LEARNERUPDATE requests are only for reloading LOREs after a TUG answer
     * INTUITEL prefers to not receive LoIDs in this case.
     */
    $ignorelo = optional_param('ignoreLo', false, PARAM_BOOL);
    $html = block_intuitel_forward_learner_update_request($cmid, $courseid, $USER->id, $ignorelo);
    // If this is used in a iFrame send Moodle's headers to get styling.
    $includeheaders = optional_param('includeHeaders', false, PARAM_BOOL);
    if ($includeheaders) {
        $url = new moodle_url('/blocks/intuitel/IntuitelProxy.php');
        $url->param('_intuitel_intent', $action);
        $url->param('courseid', $courseid);
        $url->param('cmdid', $cmid);
        $PAGE->set_url($url);
        // TODO theme styling makes this to render out of the viewable area.
        // TODO include CSS manually to change  typography and style??
        echo $html;
    } else {
        echo $html;
    }
} else {
 public function generate_inline_code($args)
 {
     global $USER;
     $html = block_intuitel_forward_learner_update_request($args['cmid'], $args['courseid'], $USER->id);
     return $html;
 }