示例#1
0
文件: profile.php 项目: rhertzog/lcs
        }
        if (claro_is_platform_admin()) {
            $dialogBox->info(get_lang('As a platform administrator, you can edit any field you want, even if this field isn\'t editable for other users.<br />You can check the list of editable fields in your platform\'s configuration.'));
        }
        break;
}
// Display
$out = '';
$out .= claro_html_tool_title($nameTools, null, $cmdList) . $dialogBox->render();
switch ($display) {
    case DISP_PROFILE_FORM:
        // Display form profile
        if (trim($profileText) != '') {
            $out .= '<div class="info profileEdit">' . $profileText . '</div>';
        }
        $out .= user_html_form($userId);
        break;
    case DISP_MOREINFO_FORM:
        // Display request course creator form
        $out .= '<form action="' . $_SERVER['PHP_SELF'] . '" method="post">' . "\n" . '<input type="hidden" name="cmd" value="exMoreInfo" />' . "\n" . '<table>' . "\n";
        foreach ($extraInfoDefList as $extraInfoDef) {
            $currentValue = array_key_exists($extraInfoDef['propertyId'], $userInfo) ? $userInfo[$extraInfoDef['propertyId']] : $extraInfoDef['defaultValue'];
            $requirement = (bool) (true == $extraInfoDef['required']);
            $labelExtraInfoDef = $extraInfoDef['label'];
            $out .= form_input_text('extraInfoList[' . claro_htmlentities($extraInfoDef['propertyId']) . ']', $currentValue, get_lang($labelExtraInfoDef), $requirement);
        }
        $out .= '<tr valign="top">' . "\n" . '<td>' . get_lang('Submit') . ': </td>' . "\n" . '<td>' . '<input type="submit" value="' . get_lang('Ok') . '" />&nbsp; ' . "\n" . claro_html_button($_SERVER['PHP_SELF'], get_lang('Cancel')) . "\n" . '</td>' . '</tr>' . "\n" . form_row('&nbsp;', '<small>' . get_lang('<span class="required">*</span> denotes required field') . '</small>') . '</table>' . "\n" . '</form>' . "\n";
        break;
    case DISP_REQUEST_COURSE_CREATOR_STATUS:
        $out .= '<p>' . get_lang('Fill in the text area to motivate your request and then submit the form to send it to platform administrators') . '</p>';
        // Display request course creator form
示例#2
0
        $out .= '<br />' . "\n" . get_lang('An email has been sent to help you remember your username and password.');
    }
    $out .= '</p>' . "\n";
    if (claro_is_allowed_to_create_course()) {
        $out .= '<p>' . get_lang('You can now create your  course') . '</p>' . "\n";
    } else {
        $out .= '<p>' . get_lang('You can now select, in the list, the courses you want to access') . '</p>' . "\n";
    }
    $out .= '<form action="../../index.php?cidReset=1" >' . '<input type="submit" name="next" value="' . get_lang('Next') . '" />' . "\n" . '</form>' . "\n";
} elseif (DISP_REGISTRATION_AGREEMENT == $display) {
    if (trim($agreementText) != '') {
        $out .= '<div class="info">' . $agreementText . '</div>';
    }
    $out .= '<br />' . '<form action="' . $_SERVER['PHP_SELF'] . '" >' . '<input type="hidden" name="cmd" value="agree" />' . "\n" . '<input type="submit" name="next" value="' . get_lang('Ok') . '" />&nbsp;' . "\n" . claro_html_button(get_conf('urlAppend') . '/index.php', get_lang('Cancel')) . '</form>' . "\n";
} elseif (DISP_REGISTRATION_NOT_ALLOWED == $display) {
    $out .= claro_html_msg_list(array(array('info' => get_lang('Subscription not allowed'))));
    $out .= '<br />' . '<form action="' . get_conf('rootWeb', '/') . '" >' . '<input type="submit" name="next" value="' . get_lang('Ok') . '" />' . "\n" . '</form>' . "\n";
} elseif (DISP_REGISTRATION_FORM == $display) {
    // If registration failed display error message
    if (count($messageList) > 0) {
        $dialogBox = new DialogBox();
        $dialogBox->error(implode('<br />', $messageList));
        $out .= $dialogBox->render();
    }
    if (trim($subscriptionText) != '') {
        $out .= '<div class="info subscribe">' . $subscriptionText . '</div>';
    }
    $out .= user_html_form();
}
$claroline->display->body->appendContent($out);
echo $claroline->display->render();