$errorsCount++; } if ($errorCount > 0) { $dialogBox->error(get_lang('Error while saving notification preferences')); } else { $dialogBox->success(get_lang('Notification preferences saved')); } //force refresh of course data in session! $courseData = claro_get_course_data(claro_get_current_course_id(), true); } else { $courseData = claro_get_course_data(claro_get_current_course_id(), false); } } catch (Exception $ex) { $dialogBox->error($ex->getMessage()); } //init other vars if (!isset($courseData['notify_submissions'])) { $courseData['notify_submissions'] = get_conf('mail_notification', false) && get_conf('automatic_mail_notification', false) ? '1' : '0'; } if (!isset($courseData['notify_feedbacks'])) { $courseData['notify_feedbacks'] = get_conf('mail_notification', false) && get_conf('automatic_mail_notification', false) ? '1' : '0'; } //display $out = ''; $nameTools = get_lang('Assignments preferences'); $out .= claro_html_tool_title($nameTools); $out .= $dialogBox->render(); $out .= '<form method="post" action="' . $_SERVER['PHP_SELF'] . '">' . "\n" . claro_form_relay_context() . "\n" . '<table border="0" width="50%" cellspacing="0" cellpadding="4"><tbody>' . "\n" . '<input type="hidden" name="claroFormId" value="' . uniqid('') . '" />' . "\n" . '<input name="cmd" type="hidden" value="savePrefs" />' . "\n" . '<ul class="tabTitle"><li>' . get_lang('Notifications to users') . '</li></ul>' . "\n" . '<tr>' . "\n" . '<td width="35%" valign="top" align="right">' . get_lang('Notify course managers of new assignments') . "\n" . '</td>' . "\n" . '<td width="20%" style="text-align:left;padding-left:30px;">' . "\n" . '<input id="submissions_yes" type="radio" value="1" name="submission" ' . ($courseData['notify_submissions'] == '1' ? 'checked="checked" />' : '/>') . "\n" . '<label for="submissions_yes">' . get_lang('Yes') . '</label><br/>' . "\n" . '<input id="submissions_no" type="radio" value="0" name="submission" ' . ($courseData['notify_submissions'] == '0' ? 'checked="checked" />' : '/>') . "\n" . '<label for="submissions_no">' . get_lang('No') . '</label>' . "\n" . '</td>' . "\n" . '<td align="left"><em>' . get_lang('Choose "Yes" to receive an email every time a submission is made') . '</em></td>' . "\n" . '</tr>' . "\n" . '<tr>' . "\n" . '<td width="30%" valign="top" align="right">' . get_lang('Notify students of feedbacks') . "\n" . '</td>' . "\n" . '<td width="20%" style="text-align:left;padding-left:30px;">' . "\n" . '<input id="feedbacks_yes" type="radio" value="1" name="feedback" ' . ($courseData['notify_feedbacks'] == '1' ? 'checked="checked" />' : '/>') . "\n" . '<label for="feedbacks_yes">' . get_lang('Yes') . '</label><br/>' . "\n" . '<input id="feedbacks_no" type="radio" value="0" name="feedback" ' . ($courseData['notify_feedbacks'] == '0' ? 'checked="checked" />' : '/>') . "\n" . '<label for="feedbacks_no">' . get_lang('No') . '</label>' . "\n" . '</td>' . "\n" . '<td align="left"><em>' . get_lang('Choose "Yes" to notify students when you add feedback information to their works') . '</em></td>' . "\n" . '</tr>' . "\n" . '<tr><td colspan="3"> </td></tr>' . "\n" . '<tr><td colspan="3" style="text-align:center;">' . "\n" . '<input value="' . get_lang('Ok') . '" type="submit" name="submit"/> ' . "\n" . claro_html_button(Url::Contextualize('work.php'), get_lang('Cancel')) . '</td>' . "\n" . '</tr>' . "\n" . '</tbody></table>' . "\n"; ClaroBreadCrumbs::getInstance()->prepend(get_lang('Assignments'), Url::Contextualize('work.php')); $claroline->display->body->appendContent($out); echo $claroline->display->render();
} if (isset($_REQUEST['tutorUnregistration'])) { //RECHECK if subscribe is aivailable if ($isTutorUnregAllowed) { if (isset($_REQUEST['doUnreg'])) { //RECHECK if subscribe is aivailable if ($isTutorUnregAllowed) { $sql = "UPDATE `" . $tbl_group_team . "`\n SET \n `tutor` = NULL\n WHERE\n `id` = " . (int) claro_get_current_group_id(); if (claro_sql_query($sql)) { // REFRESH THE SCRIPT TO COMPUTE NEW PERMISSIONS ON THE BASSIS OF THIS CHANGE claro_redirect(dirname($_SERVER['PHP_SELF']) . '/group.php?gidReset=1&tutorUnregDone=1'); exit; } } } else { $dialogBox->form(get_lang('Confirm your unsubscription as tutor from the group "<b>%group_name</b>"', array('%group_name' => claro_get_current_group_data('name'))) . "\n" . '<form action="' . claro_htmlspecialchars($_SERVER['PHP_SELF']) . '" method="post">' . "\n" . claro_form_relay_context() . '<input type="hidden" name="tutorUnregistration" value="1" />' . "\n" . '<input type="hidden" name="doUnreg" value="1" />' . "\n" . '<br />' . "\n" . '<input type="submit" value="' . get_lang("Ok") . '" />' . "\n" . claro_html_button(claro_htmlspecialchars(Url::Contextualize($_SERVER['PHP_SELF'])), get_lang("Cancel")) . "\n" . '</form>' . "\n"); } } } /******************************** * GROUP INFORMATIONS RETRIVIAL ********************************/ /*---------------------------------------------------------------------------- GET GROUP MEMBER LIST ----------------------------------------------------------------------------*/ $groupMemberList = get_group_user_list(claro_get_current_group_id(), claro_get_current_course_id()); /*---------------------------------------------------------------------------- GET TUTOR(S) DATA ----------------------------------------------------------------------------*/ $sql = "SELECT user_id AS id, nom AS lastName, prenom AS firstName, email\n FROM `" . $tbl_user . "` user\n WHERE user.user_id='" . claro_get_current_group_data('tutorId') . "'"; $tutorDataList = claro_sql_query_fetch_all($sql);
if ($textOrFilePresent && ($showAfterEndDate || $showAfterPost)) { $out .= '<fieldset>' . "\n" . '<legend>' . '<b>' . get_lang('Feedback') . '</b>' . '</legend>'; if ($assignment->getAutoFeedbackText() != '') { $out .= claro_parse_user_text($assignment->getAutoFeedbackText()); } if ($assignment->getAutoFeedbackFilename() != '') { $target = get_conf('open_submitted_file_in_new_window') ? 'target="_blank"' : ''; $out .= '<p><a href="' . claro_htmlspecialchars(Url::Contextualize($assignment->getAssigDirWeb() . $assignment->getAutoFeedbackFilename())) . '" ' . $target . '>' . $assignment->getAutoFeedbackFilename() . '</a></p>'; } $out .= '</fieldset>' . '<br />' . "\n"; } if ($is_allowedToEditAll) { // Submission download requested if ($cmd == 'rqDownload' && (claro_is_platform_admin() || get_conf('allow_download_all_submissions'))) { require_once $includePath . '/lib/form.lib.php'; $downloadForm = '<strong>' . get_lang('Download') . '</strong>' . "\n" . '<form action="' . get_module_url('CLWRK') . '/export.php?assigId=' . $req['assignmentId'] . '" method="POST">' . "\n" . claro_form_relay_context() . '<input type="hidden" name="cmd" value="exDownload" />' . "\n" . '<input type="radio" name="downloadMode" id="downloadMode_from" value="from" checked /><label for="downloadMode_from">' . get_lang('Submissions posted or modified after date :') . '</label><br />' . "\n" . claro_html_date_form('day', 'month', 'year', time(), 'long') . ' ' . claro_html_time_form('hour', 'minute', time() - fmod(time(), 86400) - 3600) . '<small>' . get_lang('(d/m/y hh:mm)') . '</small>' . '<br /><br />' . "\n" . '<input type="radio" name="downloadMode" id="downloadMode_all" value="all" /><label for="downloadMode_all">' . get_lang('All submissions') . '</label><br /><br />' . "\n" . '<input type="checkbox" name="downloadOnlyCurrentMembers" id="downloadOnlyCurrentMembers_id" value="yes" checked="checked" /><label for="downloadOnlyCurrentMembers_id">' . get_lang('Download only submissions from current course members') . '</label><br /><br />' . "\n" . '<input type="checkbox" name="downloadScore" id="downloadScore_id" value="yes" checked="checked" /><label for="downloadScore_id">' . get_lang('Download score') . '</label><br /><br />' . "\n" . '<input type="submit" value="' . get_lang('OK') . '" /> ' . "\n" . claro_html_button('work_list.php?assigId=' . $req['assignmentId'], get_lang('Cancel')) . '</form>' . "\n"; $dialogBox->form($downloadForm); } } // Render dialog box $out .= $dialogBox->render(); /** * Submitter (User or group) listing */ $headerUrl = $workPager->get_sort_url_list(Url::Contextualize($_SERVER['PHP_SELF'] . '?assigId=' . $req['assignmentId'])); $out .= $workPager->disp_pager_tool_bar(Url::Contextualize($_SERVER['PHP_SELF'] . "?assigId=" . $req['assignmentId'])) . '<table class="claroTable emphaseLine" width="100%">' . "\n" . '<thead>' . "\n" . '<tr class="headerX">' . "\n" . '<th>' . '<a href="' . $headerUrl['name'] . '">' . get_lang('Author(s)') . '</a>' . '</th>' . "\n" . '<th>' . '<a href="' . $headerUrl['last_edit_date'] . '">' . get_lang('Last submission') . '</a>' . '</th>' . "\n" . '<th>' . '<a href="' . $headerUrl['submissionCount'] . '">' . get_lang('Submissions') . '</a>' . '</th>' . "\n" . '<th>' . '<a href="' . $headerUrl['feedbackCount'] . '">' . get_lang('Feedbacks') . '</a>' . '</th>' . "\n"; if ($is_allowedToEditAll) { $out .= '<th>' . '<a href="' . $headerUrl['maxScore'] . '">' . get_lang('Best score') . '</a>' . '</th>' . "\n"; } $out .= '</tr>' . "\n" . '</thead>' . "\n" . '<tbody>'; foreach ($workList as $thisWrk) {
/** * display the form to edit answers * * @param $exId exercise id, required to get stay in the exercise context if required after posting the form * @param $askDuplicate display or not the form elements allowing to choose if the question must be duplicated or modified in all exercises * @author Sebastien Piraux <*****@*****.**> * @return string html code for display of answer edition form */ public function getFormHtml($exId = null, $askDuplicate) { $html = '<form method="post" action="./edit_answers.php?exId=' . $exId . '&quId=' . $this->questionId . '">' . "\n" . '<input type="hidden" name="cmd" value="exEdit" />' . "\n" . '<input type="hidden" name="step" value="' . $this->step . '" />' . "\n" . claro_form_relay_context() . "\n"; if ($this->step > 1) { $html .= '<input type="hidden" name="answer" value="' . claro_htmlspecialchars($this->answerText) . '" />' . "\n" . '<input type="hidden" name="type" value="' . claro_htmlspecialchars($this->type) . '" />' . "\n" . '<input type="hidden" name="wrongAnswerList" value="' . claro_htmlspecialchars(implode("\n", $this->wrongAnswerList)) . '" />' . "\n\n"; if (!empty($exId) && $askDuplicate) { if (isset($_REQUEST['duplicate'])) { $html .= '<input type="hidden" name="duplicate" value="' . claro_htmlspecialchars($_REQUEST['duplicate']) . '" />' . "\n"; } } $html .= '<p>' . get_lang('Please give a weighting to each blank') . ' :</p>' . "\n" . '<table border="0" cellpadding="5" width="500">' . "\n"; $i = 0; foreach ($this->answerList as $correctAnswer) { $value = isset($this->gradeList[$i]) ? $this->gradeList[$i] : '0'; $html .= '<tr>' . "\n" . '<td width="50%">' . $correctAnswer . '</td>' . "\n" . '<td width="50%">' . '<input type="text" name="grade[' . $i . ']" size="5" value="' . $value . '" />' . '</td>' . "\n" . '</tr>' . "\n\n"; $i++; } $html .= '</table>' . "\n\n" . '<input type="submit" name="cmdBack" value="< ' . get_lang('Back') . '" /> ' . '<input type="submit" name="cmdOk" value="' . get_lang('Ok') . '" /> ' . claro_html_button('./edit_question.php?exId=' . $exId . '&quId=' . $this->questionId, get_lang("Cancel")); } else { // populate fields of other steps $i = 0; foreach ($this->gradeList as $grade) { $html .= '<input type="hidden" name="grade[' . $i . ']" value="' . $grade . '" />' . "\n"; $i++; } if (!empty($exId) && $askDuplicate) { $html .= '<p>' . html_ask_duplicate() . '</p>' . "\n"; } // answer $text = $this->addslashesEncodedBrackets($this->answerText); $text = $this->answerDecode($text); $html .= '<p>' . get_lang('Please type your text below, use brackets %mask to define one or more blanks', array('%mask' => '[...]')) . ' :</p>' . "\n" . claro_html_textarea_editor('answer', $text) . "\n" . '<p>' . get_lang('Fill type') . ' :</p>' . "\n" . '<p>' . "\n" . '<input type="radio" name="type" id="textFill" value="' . TEXTFIELD_FILL . '"' . ($this->type == TEXTFIELD_FILL ? 'checked="checked"' : '') . ' /><label for="textFill">' . get_lang('Fill text field') . '</label><br />' . "\n" . '<input type="radio" name="type" id="listboxFill" value="' . LISTBOX_FILL . '"' . ($this->type == LISTBOX_FILL ? 'checked="checked"' : '') . ' /><label for="listboxFill">' . get_lang('Select in drop down list') . '</label><br />' . "\n" . '</p>' . "\n" . '<p>' . get_lang('Add wrong answers for drop down lists <small>(Optionnal. One wrong answer by line.)</small>') . '</p>' . '<textarea name="wrongAnswerList" cols="30" rows="5">' . claro_htmlspecialchars($this->answerDecode(implode("\n", $this->wrongAnswerList))) . '</textarea>' . "\n" . '<p>' . "\n" . '<input type="submit" name="cmdNext" value="' . get_lang('Next') . ' >" /> ' . claro_html_button(Url::Contextualize('./edit_question.php?exId=' . $exId . '&quId=' . $this->questionId), get_lang("Cancel")) . '</p>' . "\n"; } $html .= '</form>'; return $html; }
} $nameTools = get_lang('Create/edit document'); $out = ''; $out .= claro_html_tool_title(array('mainTitle' => get_lang('Documents and Links'), 'subTitle' => get_lang('Create/edit document'))); /*======================================================================== CREATE DOCUMENT ========================================================================*/ if ($cmd == 'rqMkHtml') { $out .= '<form action="' . claro_htmlspecialchars(get_module_entry_url('CLDOC')) . '" method="post">' . "\n" . claro_form_relay_context() . "\n" . '<input type="hidden" name="cmd" value="exMkHtml" />' . "\n" . '<input type="hidden" name="cwd" value="' . claro_htmlspecialchars(strip_tags($cwd)) . '" />' . "\n" . '<p>' . "\n" . '<b>' . get_lang('Document name') . ' : </b><br />' . "\n" . '<input type="text" name="fileName" size="80" />' . "\n" . '</p>' . "\n" . '<p>' . "\n" . '<b>' . get_lang('Document content') . ' : </b>' . "\n"; if (!empty($_REQUEST['htmlContent'])) { $content = $_REQUEST['htmlContent']; } else { $content = ""; } $out .= claro_html_textarea_editor('htmlContent', $content); // the second argument _REQUEST['htmlContent'] for the case when we have to // get to the editor because of an error at creation // (eg forgot to give a file name) $out .= '</p>' . "\n" . '<p>' . "\n" . '<input type="submit" value="' . get_lang('Ok') . '" /> ' . claro_html_button(claro_htmlspecialchars(Url::Contextualize('./document.php?cmd=exChDir&file=' . strip_tags($cwd))), get_lang('Cancel')) . '</p>' . "\n" . '</form>' . "\n"; } elseif ($cmd == "rqEditHtml" && !empty($file)) { if (is_parent_path($baseWorkDir, $file)) { $fileContent = implode("\n", file($baseWorkDir . $file)); } else { claro_die('WRONG PATH'); } $fileContent = get_html_body_content($fileContent); $out .= '<form action="' . claro_htmlspecialchars(get_module_entry_url('CLDOC')) . '" method="post">' . "\n" . claro_form_relay_context() . "\n" . '<input type="hidden" name="cmd" value="exEditHtml" />' . "\n" . '<input type="hidden" name="file" value="' . claro_htmlspecialchars(base64_encode($file)) . '" />' . "\n" . '<b>' . get_lang('Document name') . ' : </b><br />' . "\n" . $file . "\n" . '</p>' . "\n" . '<p>' . "\n" . '<b>' . get_lang('Document content') . ' : </b>' . "\n" . claro_html_textarea_editor('htmlContent', $fileContent) . "\n" . '</p>' . '<p>' . '<input type="submit" value="' . get_lang('Ok') . '" /> ' . "\n" . claro_html_button(claro_htmlspecialchars(Url::Contextualize('./document.php?cmd=rqEdit&file=' . base64_encode($file))), get_lang('Cancel')) . "\n" . '</p>' . "\n" . '</form>' . "\n"; } $out .= '<br />' . "\n" . '<br />' . "\n"; $claroline->display->body->appendContent($out); echo $claroline->display->render();
case 'error': break; case 'exExport': $out .= '<blockquote>' . get_lang("Wiki %TITLE% exported to course documents. (this file is visible)", array('%TITLE%' => $wikiTitle)) . '</blockquote>'; $cmdList[] = array('name' => get_lang("Go to documents tool"), 'url' => claro_htmlspecialchars(Url::Contextualize(get_module_url('CLDOC') . '/document.php?gidReset=1'))); $cmdList[] = array('name' => get_lang("Go back to Wiki list"), 'url' => claro_htmlspecialchars(Url::Contextualize($_SERVER['PHP_SELF']))); break; // edit form // edit form case 'rqEdit': $out .= claro_disp_wiki_properties_form($wikiId, $wikiTitle, $wikiDesc, $groupId, $wikiACL); break; // delete form // delete form case 'rqDelete': $out .= '<form method="post" action="' . claro_htmlspecialchars(Url::Contextualize($_SERVER['PHP_SELF'])) . '" id="rqDelete">' . "\n" . '<div style="padding: 5px">' . "\n" . '<input type="hidden" name="wikiId" value="' . $wikiId . '" />' . "\n" . claro_form_relay_context() . "\n" . '<input type="submit" name="action[exDelete]" value="' . get_lang("Continue") . '" />' . "\n" . claro_html_button(claro_htmlspecialchars(Url::Contextualize($_SERVER['PHP_SELF'])), get_lang("Cancel")) . '</div>' . "\n" . '</form>' . "\n"; break; // list wiki // list wiki case 'exSearch': case 'list': //find the wiki with recent modification from the notification system if (claro_is_user_authenticated()) { $date = $claro_notifier->get_notification_date(claro_get_current_user_id()); $modified_wikis = $claro_notifier->get_notified_ressources(claro_get_current_course_id(), $date, claro_get_current_user_id(), claro_get_current_group_id(), claro_get_current_tool_id()); } else { $modified_wikis = array(); } // if admin, display add new wiki link $out .= '<p>'; if ($groupId && claro_is_group_member() || $is_allowedToAdmin) {
/** * prepare display */ /** * Display */ $out = ''; /** * Information edit for create or edit a category */ switch ($view) { case DISP_ANALYSE: $out .= claro_html_tool_title(array('mainTitle' => 'ANALYSE RESULT', 'subTitle' => 'Tree Structure ')) . claro_html_msg_list($analyseTreeResultMsg, 1) . $dgDataAnalyseResult->render() . ($errorCounter ? claro_html_button($_SERVER['PHP_SELF'] . '?cmd=repairTree', 'Repair', 'Run repair task on the tree ? ') : '') . claro_html_tool_title('Course ownance') . $dgCourseOwnanceCheck->render(); break; case DISP_REPAIR_RESULT: $out .= claro_html_tool_title(array('mainTitle' => 'REPAIR RESULT', 'subTitle' => 'Tree Structure ')) . claro_html_msg_list($repairResultMsg, 1) . claro_html_button($_SERVER['PHP_SELF'] . '?cmd=', 'Analyse'); break; default: $out .= '<div>' . __LINE__ . ': $view = <pre>' . var_export($view, 1) . '</PRE></div>'; } $claroline->display->body->appendContent($out); echo $claroline->display->render(); /** * Return course list which have an unexisting category as parent * * @author Christophe Gesché <*****@*****.**> * @since 1.8 * * @return array('Course code'=>string, 'Unknow faculty'=>string) */ function checkCourseOwnance()
<label for="individual"> ' . get_lang('Individual') . '</label> <br /> <input type="radio" name="assignment_type" id="group" value="GROUP" ' . ($assignment->getAssignmentType() == "GROUP" ? 'checked="checked"' : '') . ' /> <label for="group"> ' . get_lang('Groups (from groups tool, only group members can post)') . '</label>' . '</dd>' . '<dt>' . get_lang('Start date') . '</dt>' . '<dd>' . claro_html_date_form('startDay', 'startMonth', 'startYear', $assignment_data['start_date'], 'long') . ' ' . claro_html_time_form('startHour', 'startMinute', $assignment_data['start_date']) . '<p class="notice">' . get_lang('(d/m/y hh:mm)') . '</p>' . '</dd>' . '<dt>' . get_lang('End date') . '</dt>' . '<dd>' . claro_html_date_form('endDay', 'endMonth', 'endYear', $assignment_data['end_date'], 'long') . ' ' . claro_html_time_form('endHour', 'endMinute', $assignment_data['end_date']) . '<p class="notice">' . get_lang('(d/m/y hh:mm)') . '</p>' . '</dd>' . '<dt>' . get_lang('Allow late upload') . '</dt>' . '<dd> <input type="radio" name="allow_late_upload" id="allowUpload" value="YES" ' . ($assignment->getAllowLateUpload() == "YES" ? 'checked="checked"' : '') . ' /> <label for="allowUpload"> ' . get_lang('Yes, allow users to submit works after end date') . '</label> <br /> <input type="radio" name="allow_late_upload" id="preventUpload" value="NO" ' . ($assignment->getAllowLateUpload() == "NO" ? 'checked="checked"' : '') . ' /> <label for="preventUpload"> ' . get_lang('No, prevent users submitting work after the end date') . '</label>' . '</dd>' . '<dt>' . get_lang('Default works visibility') . '</dt>' . '<dd> <input type="radio" name="def_submission_visibility" id="visible" value="VISIBLE" ' . ($assignment->getDefaultSubmissionVisibility() == "VISIBLE" ? 'checked="checked"' : '') . ' /> <label for="visible"> ' . get_lang('Visible for all users') . '</label> <br /> <input type="radio" name="def_submission_visibility" id="invisible" value="INVISIBLE" ' . ($assignment->getDefaultSubmissionVisibility() == "INVISIBLE" ? 'checked="checked"' : '') . ' /> <label for="invisible"> ' . get_lang('Only visible for teacher(s) and submitter(s)') . '</label>' . '<br /><br /> <input type="checkbox" name="submission_visibility_applies_to_all" id="submission_visibility_applies_to_all_id" value="yes" /> <label for="submission_visibility_applies_to_all_id"> ' . get_lang('Apply default visibility also to sumissions already posted') . '</label>' . '</dd>' . '<dt> </dt>' . '<dd>' . '<input type="submit" name="submitAssignment" value="' . get_lang('Ok') . '" /> ' . claro_html_button(isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '.', get_lang('Cancel')) . '</dd>' . '</dl>' . '</fieldset>' . '</form>'; } } /*-------------------------------------------------------------------- ASSIGNMENT LIST --------------------------------------------------------------------*/ // if we don't display assignment form if (!isset($displayAssigForm) || !$displayAssigForm) { $headerUrl = $assignmentPager->get_sort_url_list($_SERVER['PHP_SELF']); $out .= $assignmentPager->disp_pager_tool_bar($_SERVER['PHP_SELF']); $out .= '<table class="claroTable" width="100%">' . "\n" . '<tr class="headerX">' . '<th><a href="' . $headerUrl['title'] . '">' . get_lang('Title') . '</a></th>' . "\n" . '<th><a href="' . $headerUrl['assignment_type'] . '">' . get_lang('Type') . '</a></th>' . "\n" . '<th><a href="' . $headerUrl['start_date_unix'] . '">' . get_lang('Start date') . '</a></th>' . "\n" . '<th><a href="' . $headerUrl['end_date_unix'] . '">' . get_lang('End date') . '</a></th>' . "\n"; $colspan = 4; if (isset($_REQUEST['submitGroupWorkUrl']) && !empty($_REQUEST['submitGroupWorkUrl'])) { $out .= '<th>' . get_lang('Publish') . '</th>' . "\n"; $colspan++; }
} $addToURL = isset($_REQUEST['addToURL']) ? $_REQUEST['addToURL'] : ''; $dialogBox = new DialogBox(); //TABLES //declare needed tables // Deal with interbreadcrumbs ClaroBreadCrumbs::getInstance()->prepend(get_lang('Administration'), get_path('rootAdminWeb')); $nameTools = get_lang('User list'); $offset = isset($_REQUEST['offset']) ? $_REQUEST['offset'] : 0; //------------------------------------ // Execute COMMAND section //------------------------------------ switch ($cmd) { case 'rqResetAllPasswords': $dialogBox->question(get_lang('Do you really want to reset all the passwords ?') . '<br />' . '<small>' . get_lang('The platform administrators and course creators password will remain unchanged') . '</small>' . '<br />'); $dialogBox->form(' <form method="post" action="' . claro_htmlspecialchars($_SERVER['PHP_SELF']) . '">' . '<input type="hidden" name="cmd" value="exResetAllPasswords" />' . '<input id="sendEmail" type="checkbox" name="sendEmail" value="yes" checked="checked" />' . '<label for="sendEmail">' . get_lang('send new password by email') . '</label>' . '<br />' . '<small>' . get_lang('Only the users with a valid address will receive their password by email') . '</small>' . '<br />' . '<input type="submit" value="' . get_lang('Yes') . '" />' . claro_html_button($_SERVER['PHP_SELF'], get_lang('Cancel')) . '</form>'); $dialogBox->warning('<em>' . get_lang('This may take some time, please wait until the end of the process...') . '</em>'); break; case 'exResetAllPasswords': $userList = getAllStudentUserId(); $failedMailList = array(); $failedList = array(); $sendEmail = isset($_REQUEST['sendEmail']) && $_REQUEST['sendEmail'] ? true : false; foreach ($userList as $user) { $mailSent = FALSE; $userInfo = user_get_properties($user['id']); if (!$userInfo['isPlatformAdmin'] && !$userInfo['isCourseCreator']) { $userInfo['password'] = mk_password(8); if (user_set_properties($user['id'], array('password' => $userInfo['password']))) { if ($sendEmail && user_send_registration_mail($user['id'], $userInfo)) { $mailSent = TRUE;
?> /> <label for="<?php echo $groupTool['label']; ?> "> <?php echo get_lang(claro_get_module_name($groupTool['label'])); ?> </label> </span> </td> </tr> <?php } ?> <tr> <td valign="top"> <input type="submit" name="properties" value="<?php echo get_lang("Ok"); ?> " /> <?php echo claro_html_button(claro_htmlspecialchars($_SERVER['HTTP_REFERER']), get_lang("Cancel")); ?> </td> </tr> </table> </form>
/** * Display form profile * @return string */ public function displayProfileForm() { $form = '<form action="' . $_SERVER['PHP_SELF'] . '" method="post" >' . claro_form_relay_context() . '<input type="hidden" name="profile_id" value="' . $this->id . '" />' . "\n" . '<input type="hidden" name="claroFormId" value="' . uniqid('') . '" />' . "\n" . '<input type="hidden" name="cmd" value="exSave" />' . "\n" . '<table>'; // Display name $form .= '<tr valign="top">' . "\n" . '<td align="right">' . "\n" . '<label for="name">' . "\n" . get_lang('Name') . "\n" . ' :' . "\n" . '</label>' . "\n" . '</td>'; if ($this->isRequired()) { $form .= '<td>' . claro_htmlspecialchars($this->getName()) . '</td>'; } else { $form .= '<td>' . "\n" . '<input type="text" id="name" name="name" value="' . $this->getName() . '"/>' . "\n" . '</td>'; } $form .= '</tr>'; // Display description $form .= '<tr valign="top">' . "\n" . '<td align="right">' . "\n" . '<label for="description">' . get_lang('Description') . ' :</label>' . "\n" . '</td>' . "\n" . '<td >' . "\n" . '<textarea cols="60" rows="3" id="description" name="description">' . $this->getDescription() . '</textarea>' . "\n" . '</td>' . "\n" . '</tr>'; // Display type // TODO after 1.8 /* $form .= ' <tr valign="top"> <td align="right">' . get_lang('Type') . ' :</td> <td><input type="text" name="type" value="' . $this->type . '"/></td> </tr>'; $form .= '<input type="hidden" name="type" value="' . PROFILE_TYPE_COURSE . '" />' ; // Display 'is course manager' $form .= ' <tr valign="top"> <td align="right"><label for="isCourseManager">' . get_lang('Course manager') . ' :</label></td> <td><input type="checkbox" id="isCourseManager" name="isCourseManager" value="1" ' . ($this->isCourseManager?'checked="checked"':'') . '/></td> </tr>'; // Display 'is tutor' $form .= ' <tr valign="top"> <td align="right"><label for="isTutor">' . get_lang('Tutor') . ' :</label></td> <td><input type="checkbox" id="isTutor" name="isTutor" value="1" ' . ($this->isTutor?'checked="checked"':'') . '/></td> </tr>'; */ // Display 'is locked' $form .= ' <tr valign="top"> <td align="right"><label for="isLocked">' . get_lang('Locked') . ' :</label></td> <td><input type="checkbox" id="isLocked" name="isLocked" value="1" ' . ($this->isLocked ? 'checked="checked"' : '') . '/></td> </tr>'; /* // Display is 'user public' $form .= ' <tr valign="top"> <td align="right"><label for="isUserPublic">' . get_lang('Display in user list') . ' :</label></td> <td><input type="checkbox" id="isUserPublic" name="isUserPublic" value="1" ' . ($this->isUserPublic?'checked="checked"':'') . '/></td> </tr>'; // Display is 'mailing list' $form .= ' <tr valign="top"> <td align="right"><label for="isEmailNotify">' . get_lang('Email notification') . ' :</label></td> <td><input type="checkbox" id="isEmailNotify" name="isEmailNotify" value="1" ' . ($this->isEmailNotify?'checked="checked"':'') . '/></td> </tr>'; */ // Display submit button $form .= ' <tr> <td align="right"> </td> <td><input type="submit" name="submitProfile" value="' . get_lang('Ok') . '" /> ' . claro_html_button(isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '.', get_lang('Cancel')) . '</td></tr> </table> </form>'; return $form; }
/** * display the form to edit answers * * @param $exId exercise id, required to get stay in the exercise context if required after posting the form * @param $askDuplicate display or not the form elements allowing to choose if the question must be duplicated or modified in all exercises * @author Sebastien Piraux <*****@*****.**> * @return string html code for display of answer edition form */ public function getFormHtml($exId = null, $askDuplicate = false) { $html = '<form method="post" action="./edit_answers.php?exId=' . $exId . '&quId=' . $this->questionId . '">' . "\n" . '<input type="hidden" name="cmd" value="exEdit" />' . "\n" . '<input type="hidden" name="claroFormId" value="' . uniqid('') . '" />' . "\n" . claro_form_relay_context() . "\n" . '<table class="claroTable">' . "\n"; if (!empty($exId) && $askDuplicate) { $html .= html_ask_duplicate(); } $html .= '<thead>' . "\n" . '<tr>' . "\n" . '<th>' . get_lang('Expected choice') . '</th>' . "\n" . '<th>' . get_lang('Answer') . '</th>' . "\n" . '<th>' . get_lang('Comment') . '</th>' . "\n" . '<th>' . get_lang('Weighting') . '</th>' . "\n" . '</tr>' . "\n" . '</thead>' . "\n" . '<tr>' . "\n" . '<td valign="top" align="center">' . '<input name="correctAnswer" id="trueCorrect" ' . ($this->correctAnswer == "TRUE" ? 'checked="checked"' : '') . 'type="radio" value="true" />' . '</td>' . "\n" . '<td valign="top"><label for="trueCorrect">' . get_lang('True') . '</label></td>' . "\n" . '<td>' . claro_html_textarea_editor('trueFeedback', $this->trueFeedback, 10, 25, '', 'simple') . '</td>' . "\n" . '<td valign="top"><input name="trueGrade" size="5" value="' . $this->trueGrade . '" type="text" /></td>' . "\n" . '</tr>' . "\n\n" . '<tr>' . "\n" . '<td valign="top" align="center">' . '<input name="correctAnswer" id="falseCorrect" ' . ($this->correctAnswer == "FALSE" ? 'checked="checked"' : '') . 'type="radio" value="false" />' . '</td>' . "\n" . '<td valign="top"><label for="falseCorrect">' . get_lang('False') . '</label></td>' . "\n" . '<td>' . claro_html_textarea_editor('falseFeedback', $this->falseFeedback, 10, 25, '', 'simple') . '</td>' . "\n" . '<td valign="top"><input name="falseGrade" size="5" value="' . $this->falseGrade . '" type="text" /></td>' . "\n" . '</tr>' . "\n\n" . '<tr>' . "\n" . '<td colspan="4" align="center">' . '<input type="submit" name="cmdOk" value="' . get_lang('Ok') . '" /> ' . claro_html_button(Url::Contextualize('./edit_question.php?exId=' . $exId . '&quId=' . $this->questionId), get_lang("Cancel")) . '</td>' . "\n" . '</tr>' . "\n\n" . '</table>' . "\n\n" . '</form>'; return $html; }
/** * Function to create the different elements of the configuration form to display * * @param array $property_list * @param string $section_selected * @param string $url_params appeded to POST query * @return the HTML code to display web form to edit config file */ function display_form($property_list = null, $section_selected = null, $url_params = null) { $form = ''; // get section list $section_list = $this->get_def_section_list(); if (!empty($section_list)) { if (empty($section_selected) || !in_array($section_selected, $section_list)) { $section_selected = current($section_list); } // display start form $form .= '<form method="post" action="' . $_SERVER['PHP_SELF'] . '?config_code=' . $this->config_code . claro_htmlspecialchars($url_params) . '" name="editConfClass" >' . "\n" . claro_form_relay_context() . '<input type="hidden" name="config_code" value="' . claro_htmlspecialchars($this->config_code) . '" />' . "\n" . '<input type="hidden" name="section" value="' . claro_htmlspecialchars($section_selected) . '" />' . "\n" . '<input type="hidden" name="cmd" value="save" />' . "\n"; $form .= '<table border="0" cellpadding="5" width="100%">' . "\n"; if ($section_selected != 'viewall') { $section_list = array($section_selected); } foreach ($section_list as $thisSection) { if ($thisSection == 'viewall') { continue; } // section array $section = $this->conf_def['section'][$thisSection]; if ($section_selected == 'viewall') { $form .= '<tr><td colspan="3">' . "\n"; $form .= '<ul class="tabTitle">' . "\n"; $form .= '<li><a href="#">' . claro_htmlspecialchars(get_lang($this->conf_def['section'][$thisSection]['label'])) . '</a></li>' . "\n"; $form .= '</ul>' . "\n"; $form .= '</td></tr>' . "\n"; } // display description of the section if (!empty($section['description'])) { $form .= '<tr><td colspan="3"><p class="configSectionDesc" ><em>' . get_lang($section['description']) . '</em></p></td></tr>'; } // display each property of the section if (is_array($section['properties'])) { foreach ($section['properties'] as $name) { if (key_exists($name, $this->conf_def_property_list)) { if (is_array($this->conf_def_property_list[$name])) { if (isset($property_list[$name])) { // display elt with new content $form .= $this->display_form_elt($name, $property_list[$name]); } else { // display elt with current content $form .= $this->display_form_elt($name, $this->property_list[$name]); } } } else { $form .= 'Error in section "' . $thisSection . '", "' . $name . '" doesn\'t exist in property list'; } } // foreach $section['properties'] as $name } // is_array($section['properties']) } // display submit button $form .= '<tr>' . "\n" . '<td style="text-align: right">' . get_lang('Save') . ' :</td>' . "\n" . '<td colspan="2"><input type="submit" value="' . get_lang('Ok') . '" /> ' . claro_html_button($this->backUrl, get_lang('Cancel')) . '</td>' . "\n" . '</tr>' . "\n"; // display end form $form .= '</table>' . "\n" . '</form>' . "\n"; } return $form; }
} $out = ''; $out .= $dialogBox->render(); $out .= claro_html_tool_title($nameTools, null, $toolList); if ($displayForm) { $out .= '<form method="post" action="' . $_SERVER['PHP_SELF'] . '" >' . "\n\n" . claro_form_relay_context() . '<input type="hidden" name="cmd" value="exEdit" />' . "\n" . '<input type="hidden" name="catId" value="' . $catId . '" />' . "\n" . '<input type="hidden" name="claroFormId" value="' . uniqid('') . '" />' . "\n"; $out .= '<table border="0" cellpadding="5">' . "\n"; //-- // title $out .= '<tr>' . "\n" . '<td valign="top"><label for="title">' . get_lang('Title') . ' <span class="required">*</span> :</label></td>' . "\n" . '<td><input type="text" name="title" id="title" size="60" maxlength="200" value="' . $form['title'] . '" /></td>' . "\n" . '</tr>' . "\n\n"; // description $out .= '<tr>' . "\n" . '<td valign="top"><label for="description">' . get_lang('Description') . ' :</label></td>' . "\n" . '<td>' . claro_html_textarea_editor('description', $form['description']) . '</td>' . "\n" . '</tr>' . "\n\n"; //-- $out .= '<tr>' . "\n" . '<td> </td>' . "\n" . '<td><small>' . get_lang('<span class="required">*</span> denotes required field') . '</small></td>' . "\n" . '</tr>' . "\n\n"; //-- buttons $out .= '<tr>' . "\n" . '<td> </td>' . "\n" . '<td>' . '<input type="submit" name="" id="" value="' . get_lang('Ok') . '" /> ' . claro_html_button(Url::Contextualize($_SERVER['PHP_SELF']), get_lang("Cancel")) . '</td>' . "\n" . '</tr>' . "\n\n"; $out .= '</table>' . "\n\n" . '</form>' . "\n\n"; } //-- pager $out .= $myPager->disp_pager_tool_bar($_SERVER['PHP_SELF']); //-- list $out .= '<table class="claroTable emphaseLine" border="0" align="center" cellpadding="2" cellspacing="2" width="100%">' . "\n\n" . '<thead>' . "\n" . '<tr>' . "\n" . '<th>' . get_lang('Title') . '</th>' . "\n"; $colspan = 1; if ($is_allowedToEdit) { $out .= '<th>' . get_lang('Modify') . '</th>' . "\n" . '<th>' . get_lang('Delete') . '</th>' . "\n"; $colspan = 3; } $out .= '</tr>' . "\n" . '</thead>' . "\n\n" . '<tbody>' . "\n\n"; if (!empty($questionCategoryList)) { foreach ($questionCategoryList as $aCategory) { $out .= '<tr>' . "\n" . '<td>' . $aCategory['title'] . '</a>' . '</td>' . "\n";
$out .= '<style> .message {background-color: #E6E6E6; color: #339933;font-size: 0.9 em;} </style>'; $out .= 'La synchronisation : <br /> <ul> <li> ajoute les élèves présents dans le ldap mais absents de la plateforme et les affecte à leur classe : <span id="cr0" class="message"></span></li> <li> ajoute les profs présents dans le ldap mais absents de la plateforme et les affecte à la classe Profs : <span id="cr1"class="message"></span></li> <li> supprime les élèves qui ne sont plus dans l\'annuaire : <span id="cr2"class="message"></span></li> <li> supprime les profs qui ne sont plus dans l\'annuaire : <span id="cr3"class="message"></span></li> <li> déclare "orphelins" les cours des profs supprimés : <span id="cr4"class="message"></span></li> </ul> <div id="mess" class="message"></div>'; if ($cmd == '') { $out .= '<form action="' . $_SERVER['PHP_SELF'] . '" method="post" >' . "\n" . claro_form_relay_context() . form_input_hidden('cmd', 'synchronisation'); $out .= ' <br /><input type="submit" value="' . get_lang('Ok') . '" /> ' . claro_html_button($_SERVER['HTTP_REFERER'], get_lang('Cancel')); $out .= '</form>' . "\n"; } } $claroline->display->body->appendContent($out); echo $claroline->display->render(); /*===================================================================== Main Section =====================================================================*/ if ($cmd == 'synchronisation') { $db = @mysql_connect($dbHost, $dbLogin, $dbPass, false, CLIENT_FOUND_ROWS) or die('<center>' . 'WARNING ! SYSTEM UNABLE TO CONNECT TO THE DATABASE SERVER.' . '</center>'); /*===================================================================== Suppression des eleves absents du ldap =====================================================================*/ //recherche de la liste des eleves $Sql = "SELECT username, user_id FROM cl_user WHERE isCourseCreator='0' and isPlatformAdmin ='0'";
foreach ($formCategoryList as $thisFormCategory) { if ($forumSettingList['cat_id'] == $thisFormCategory['cat_id']) { $selectedState = ' selected="selected" '; } else { $selectedState = ''; } $catSelectBox .= '<option value="' . $thisFormCategory['cat_id'] . '"' . $selectedState . '>' . htmlspecialchars($thisFormCategory['cat_title']) . '</option>'; } $catSelectBox .= '</select><br />' . "\n"; } else { $catSelectBox = ''; } $formForumNameValue = isset($_REQUEST['forumName']) ? $_REQUEST['forumName'] : $forumSettingList['forum_name']; $formForumDescriptionValue = isset($_REQUEST['forumDesc']) ? $_REQUEST['forumDesc'] : $forumSettingList['forum_desc']; $formForumPostUnallowedState = $_REQUEST['cmd'] == 'exEdForum' ? isset($_REQUEST['forumPostUnallowed']) ? ' checked="checked" ' : '' : ($forumSettingList['forum_access'] == 0 ? ' checked="checked" ' : ''); $htmlEditForum = '<strong>' . get_lang('Edit forum') . '</strong>' . "\n" . '<form action="' . $_SERVER['PHP_SELF'] . '" method="post">' . "\n" . '<input type="hidden" name="cmd" value="exEdForum" />' . "\n" . '<input type="hidden" name="claroFormId" value="' . uniqid('') . '" />' . "\n" . '<input type="hidden" name="forumId" value="' . $forumSettingList['forum_id'] . '" />' . "\n" . '<label for="forumName">' . get_lang('Name') . ': </label><br />' . "\n" . '<input type="text" name="forumName" id="forumName"' . ' value="' . htmlspecialchars($formForumNameValue) . '" /><br />' . "\n" . '<label for="forumDesc">' . get_lang('Description') . ' : </label><br />' . "\n" . '<textarea name="forumDesc" id="forumDesc" cols="50" rows="3">' . "\n" . htmlspecialchars($formForumDescriptionValue) . '</textarea><br />' . "\n" . $catSelectBox . "\n" . '<br />' . "\n" . '<input type="checkbox" id="forumPostUnallowed" name="forumPostUnallowed" ' . $formForumPostUnallowedState . ' />' . "\n" . '<label for="forumPostUnallowed">' . get_lang('Locked') . ' <small>(' . get_lang('No new post allowed') . ')</small></label><br />' . "\n" . '<br />' . "\n" . '<input type="submit" value="' . get_lang('Ok') . '" /> ' . claro_html_button($_SERVER['PHP_SELF'], get_lang('Cancel')) . '</form>' . "\n\n"; $dialogBox->form($htmlEditForum); } if ($cmd == 'exDelCat') { if (delete_category($_REQUEST['catId'])) { $dialogBox->success(get_lang('Category deleted')); } else { $dialogBox->error(get_lang('Unable to delete category')); if (claro_failure::get_last_failure() == 'GROUP_FORUMS_CATEGORY_REMOVALE_FORBIDDEN') { $dialogBox->error(get_lang('Group forums category can\'t be deleted')); } elseif (claro_failure::get_last_failure() == 'GROUP_FORUM_REMOVALE_FORBIDDEN') { $dialogBox->error(get_lang('You can not remove a group forum. You have to remove the group first')); } } } if ($cmd == 'exDelForum') {
$dialogBox->success(get_lang('Your password has been emailed to') . ' : ' . $emailTo); } else { $dialogBox->error(get_lang('The system is unable to send you an e-mail.') . '<br />' . get_lang('Please contact') . ' : ' . '<a href="mailto:' . get_conf('administrator_email') . '?BODY=' . $emailTo . '">' . get_lang('Platform administrator') . '</a>'); } } } else { $dialogBox->error(get_lang('There is no user account with this email address.')); } if ($extAuthPasswordCount > 0) { if ($extAuthPasswordCount == count($userList)) { $dialogBox->warning(get_lang('Your password(s) is (are) recorded in an external authentication system outside the platform.')); } else { $dialogBox->warning(get_lang('Passwords of some of your user account(s) are recorded an in external authentication system outside the platform.')); } $dialogBox->info(get_lang('For more information take contact with the platform administrator.')); } } //////////////////////////////////////////////////// // display section $out = ''; // display title $out .= claro_html_tool_title($nameTools); // display message box if (!$passwordFound) { $dialogBox->title(get_lang('Enter your email so we can send you your password.')); $dialogBox->form('<form action="' . $_SERVER['PHP_SELF'] . '" method="post">' . '<input type="hidden" name="searchPassword" value="1" />' . '<label for="Femail">' . get_lang('Email') . ' : </label>' . '<br />' . '<input type="text" name="Femail" id="Femail" size="50" maxlength="100" value="' . claro_htmlspecialchars($emailTo) . '" />' . '<br /><br />' . '<input type="submit" name="retrieve" value="' . get_lang('Ok') . '" /> ' . claro_html_button(get_conf('urlAppend') . '/index.php', get_lang('Cancel')) . '</form>'); } $out .= $dialogBox->render(); // display form $claroline->display->body->appendContent($out); echo $claroline->display->render();
$dialogBox->form('<form action="' . $_SERVER['PHP_SELF'] . '" method="GET">' . "\n" . '<input type="hidden" name="claroFormId" value="' . uniqid('') . '" />' . '<input name="cmd" type="hidden" value="rqInstall" />' . "\n" . get_lang('Where is your package ?') . '<br />' . "\n" . (get_conf('can_install_upload_module', true) ? '<input name="selectInput" value="upload" id="zipOnYouComputerServer" type="radio" checked="checked" />' . '<label for="zipOnYouComputerServer" >' . get_lang('Package on your computer (zip only)') . '</label>' . '<br />' : '') . (get_conf('can_install_local_module', false) ? '<input name="selectInput" value="local" id="packageOnServer" type="radio" />' . '<label for="packageOnServer" >' . get_lang('Package on server (zipped or not)') . '</label>' . '<br />' : '') . (get_conf('can_install_curl_module', false) ? '<input name="selectInput" value="curl" id="zipOnThirdServer" type="radio" />' . '<label for="zipOnThirdServer" >' . get_lang('Package on the net (zip only)') . '</label>' . '<br />' : '') . '<br />' . "\n" . '<br />' . "\n" . '<input value="' . get_lang('Next') . '" type="submit" /> ' . "\n" . claro_html_button($_SERVER['PHP_SELF'], get_lang('Cancel')) . '</form>' . "\n"); } } switch ($_cleanInput['selectInput']) { case 'upload': $dialogBox->warning('<p>' . "\n" . get_lang('Imported modules must consist of a zip file and be compatible with your Claroline version.') . '<br />' . "\n" . get_lang('Find more available modules on <a href="http://www.claroline.net/">Claroline.net</a>.') . '</p>' . "\n\n"); $dialogBox->form('<form enctype="multipart/form-data" action="' . $_SERVER['PHP_SELF'] . '" method="post">' . "\n" . '<input type="hidden" name="claroFormId" value="' . uniqid('') . '" />' . "\n" . '<input name="cmd" type="hidden" value="exInstall" />' . "\n" . '<input name="uploadedModule" type="file" /><br />' . "\n" . '<input name="activateOnInstall" id="activateOnInstall" type="checkbox" />' . "\n" . '<label for="activateOnInstall" >' . get_lang('Activate module on install') . '</label>' . '<br />' . "\n" . '<fieldset>' . '<legend>' . get_lang('The following options will only work for course tool modules :') . '</legend>' . '<input name="notAutoActivateInCourses" id="autoActivateInCourses" type="checkbox" />' . "\n" . '<label for="notAutoActivateInCourses" >' . get_lang('This tool must be activated manualy in each course') . '</label>' . '<br />' . "\n" . '<input name="activableOnlyByPlatformAdmin" id="activableOnlyByPlatformAdmin" type="checkbox" />' . "\n" . '<label for="activableOnlyByPlatformAdmin" >' . get_lang('Make this tool activable only by the platform administrator <small>(available if the previous option is checked)</small>') . '</label>' . '<br />' . "\n" . '<input name="visibleOnInstall" id="visibleOnInstall" type="checkbox" />' . "\n" . '<label for="visibleOnInstall" >' . get_lang('Visible in all courses on install <small>(this can take some time depending on the number of courses in your campus)</small>') . '</label>' . '</fieldset>' . '<br />' . "\n" . '<br />' . "\n" . '<input value="' . get_lang('Upload and Install module') . '" type="submit" /> ' . "\n" . claro_html_button($_SERVER['PHP_SELF'], get_lang('Cancel')) . '</form>' . "\n"); break; case 'local': $dialogBox->warning('<p>' . "\n" . get_lang('Imported modules must be compatible with your Claroline version.') . '<br />' . "\n" . get_lang('Find more available modules on <a href="http://www.claroline.net/">Claroline.net</a>.') . '</p>' . "\n\n"); $dialogBox->form('<form enctype="multipart/form-data" action="' . $_SERVER['PHP_SELF'] . '" method="GET">' . "\n" . '<input type="hidden" name="claroFormId" value="' . uniqid('') . '" />' . '<input name="cmd" type="hidden" value="exInstall" />' . "\n" . get_lang('Path to zip file or package directory on server') . ': <br />' . "\n" . '<input size="80" name="packageCandidatePath" type="text" /><br />' . "\n" . '<input name="activateOnInstall" id="activateOnInstall" type="checkbox" />' . '<label for="activateOnInstall" >' . get_lang('Activate module on install') . '</label>' . '<br />' . '<input name="visibleOnInstall" id="visibleOnInstall" type="checkbox" />' . '<label for="visibleOnInstall" >' . get_lang('Visible on each course on install <small>(tool only)</small>') . '</label>' . '<br />' . "\n" . '<br />' . "\n" . '<br /><input value="' . get_lang('Install module') . '" type="submit" /> ' . "\n" . claro_html_button($_SERVER['PHP_SELF'], get_lang('Cancel')) . '</form>' . "\n"); break; case 'curl': $dialogBox->error('<p>' . "\n" . get_lang('This feature is not ready.') . '</p>' . "\n\n"); $dialogBox->warning('<p>' . "\n" . get_lang('Imported modules must consist of a zip file and be compatible with your Claroline version.') . '<br />' . "\n" . get_lang('Find more available modules on <a href="http://www.claroline.net/">Claroline.net</a>.') . '</p>' . "\n\n"); $dialogBox->form('<form action="' . $_SERVER['PHP_SELF'] . '" method="GET">' . "\n" . '<input type="hidden" name="claroFormId" value="' . uniqid('') . '" />' . '<input name="cmd" type="hidden" value="exInstall" />' . "\n" . get_lang('Url of package') . '<br />' . "\n" . '<input name="packageCandidateUrl" size="80" type="text" /><br />' . "\n" . '<input name="activateOnInstall" id="activateOnInstall" type="checkbox" />' . '<label for="activateOnInstall" >' . get_lang('Activate module on install') . '</label>' . '<br />' . '<input name="visibleOnInstall" id="visibleOnInstall" type="checkbox" />' . '<label for="visibleOnInstall" >' . get_lang('Visible on each course on install <small>(tool only)</small>') . '</label>' . '<br />' . "\n" . '<br />' . "\n" . '<input value="' . get_lang('Fetch and install module') . '" type="submit" /> ' . "\n" . claro_html_button($_SERVER['PHP_SELF'], get_lang('Cancel')) . '</form>' . "\n"); break; } break; // rqInstall // rqInstall case 'exLocalRemove': if (isset($_REQUEST['moduleDir'])) { $moduleDir = str_replace('../', '', $_REQUEST['moduleDir']); $moduleRepositorySys = get_path('rootSys') . 'module/'; $modulePath = $moduleRepositorySys . $moduleDir . '/'; if (file_exists($modulePath)) { if (claro_delete_file($modulePath)) { $dialogBox->success('<p>' . "\n" . get_lang('Module files deleted') . '</p>' . "\n"); } else { $dialogBox->error('<p>' . "\n" . get_lang('Error while deleting module files') . '</p>' . "\n");
?> " method="post"> <input type="hidden" name="claroFormId" value="<?php echo uniqid(''); ?> " /> <input type="hidden" name="cmd" value="<?php echo $this->nextCommand; ?> " /> <input type="hidden" name="catId" value="<?php echo $this->catId; ?> " /> <label for="catName"><?php echo get_lang('Name'); ?> : </label><br /> <input type="text" name="catName" id="catName" value="<?php echo $this->catName; ?> " /><br /><br /> <input type="submit" value="<?php echo get_lang('Ok'); ?> " /> <?php echo claro_html_button(claro_htmlspecialchars(Url::Contextualize($_SERVER['PHP_SELF'])), get_lang('Cancel')); ?> </form>
/** * Generate html code of Wiki properties edit form * @param int wikiId ID of the wiki * @param string title wiki tile * @param string desc wiki description * @param int groupId id of the group the wiki belongs to * (0 for a course wiki) * @param array acl wiki access control list * @param string script callback script url * @return string html code of the wiki properties form */ function claro_disp_wiki_properties_form($wikiId = 0, $title = '', $desc = '', $groupId = 0, $acl = null, $script = null) { $title = $title != '' ? $title : get_lang("New Wiki"); $desc = $desc != '' ? $desc : get_lang("Enter the description of your wiki here"); if (is_null($acl) && $groupId == 0) { $acl = WikiAccessControl::defaultCourseWikiACL(); } elseif (is_null($acl) && $groupId != 0) { $acl = WikiAccessControl::defaultGroupWikiACL(); } // process ACL $group_read_checked = $acl['group_read'] == true ? ' checked="checked"' : ''; $group_edit_checked = $acl['group_edit'] == true ? ' checked="checked"' : ''; $group_create_checked = $acl['group_create'] == true ? ' checked="checked"' : ''; $course_read_checked = $acl['course_read'] == true ? ' checked="checked"' : ''; $course_edit_checked = $acl['course_edit'] == true ? ' checked="checked"' : ''; $course_create_checked = $acl['course_create'] == true ? ' checked="checked"' : ''; $other_read_checked = $acl['other_read'] == true ? ' checked="checked"' : ''; $other_edit_checked = $acl['other_edit'] == true ? ' checked="checked"' : ''; $other_create_checked = $acl['other_create'] == true ? ' checked="checked"' : ''; $script = is_null($script) ? Url::Contextualize($_SERVER['PHP_SELF']) : $script; $form = '<form method="post" id="wikiProperties" action="' . claro_htmlspecialchars($script) . '">' . "\n" . '<fieldset>' . "\n" . '<legend>' . get_lang("Wiki description") . '</legend>' . "\n" . '<!-- wikiId = 0 if creation, != 0 if edition -->' . "\n" . '<p class="notice">' . get_lang('You can choose a title and a description for the wiki :') . '</p>' . "\n" . '<input type="hidden" name="wikiId" value="' . $wikiId . '" />' . "\n" . '<!-- groupId = 0 if course wiki, != 0 if group_wiki -->' . "\n" . '<input type="hidden" name="groupId" value="' . $groupId . '" />' . "\n" . '<dl>' . "\n" . '<dt><label for="wikiTitle">' . get_lang("Title of the wiki") . '</label></dt>' . "\n" . '<dd><input type="text" name="title" id="wikiTitle" size="80" maxlength="254" value="' . claro_htmlspecialchars($title) . '" /></dd>' . "\n" . '<dt><label for="wikiDesc">' . get_lang("Description of the Wiki") . '</label></dt>' . "\n" . '<dd><textarea id="wikiDesc" name="desc" cols="80" rows="10">' . $desc . '</textarea></dd>' . "\n" . '</dl>' . '</fieldset>' . "\n\n" . '<fieldset id="acl">' . "\n" . '<legend>' . get_lang("Access control management") . '</legend>' . "\n" . '<p class="notice">' . get_lang('You can set access rights for users using the following grid :') . '</p>' . "\n" . '<table style="text-align: center; padding: 5px;" id="wikiACL">' . "\n" . '<tr class="matrixAbs">' . "\n" . '<td><!-- empty --></td>' . "\n" . '<td>' . get_lang("Read Pages") . '</td>' . "\n" . '<td>' . get_lang("Edit Pages") . '</td>' . "\n" . '<td>' . get_lang("Create Pages") . '</td>' . "\n" . '</tr>' . "\n" . '<tr>' . "\n" . '<td class="matrixOrd">' . get_lang("Course members") . '</td>' . "\n" . '<td><input type="checkbox" onclick="updateBoxes(\'course\',\'read\');" id="course_read" name="acl[course_read]"' . $course_read_checked . ' /></td>' . "\n" . '<td><input type="checkbox" onclick="updateBoxes(\'course\',\'edit\');" id="course_edit" name="acl[course_edit]"' . $course_edit_checked . ' /></td>' . "\n" . '<td><input type="checkbox" onclick="updateBoxes(\'course\',\'create\');" id="course_create" name="acl[course_create]"' . $course_create_checked . ' /></td>' . "\n" . '</tr>' . "\n"; if ($groupId != 0) { $form .= '<!-- group acl row hidden if groupId == 0, set all to false -->' . "\n" . '<tr>' . "\n" . '<td class="matrixOrd">' . get_lang("Group members") . '</td>' . "\n" . '<td><input type="checkbox" onclick="updateBoxes(\'group\',\'read\');" id="group_read" name="acl[group_read]"' . $group_read_checked . ' /></td>' . "\n" . '<td><input type="checkbox" onclick="updateBoxes(\'group\',\'edit\');" id="group_edit" name="acl[group_edit]"' . $group_edit_checked . ' /></td>' . "\n" . '<td><input type="checkbox" onclick="updateBoxes(\'group\',\'create\');" id="group_create" name="acl[group_create]"' . $group_create_checked . ' /></td>' . "\n" . '</tr>' . "\n"; } $form .= '<tr>' . "\n" . '<td class="matrixOrd">' . get_lang("Others (*)") . '</td>' . "\n" . '<td><input type="checkbox" onclick="updateBoxes(\'other\',\'read\');" id="other_read" name="acl[other_read]"' . $other_read_checked . ' /></td>' . "\n" . '<td><input type="checkbox" onclick="updateBoxes(\'other\',\'edit\');" id="other_edit" name="acl[other_edit]"' . $other_edit_checked . ' /></td>' . "\n" . '<td><input type="checkbox" onclick="updateBoxes(\'other\',\'create\');" id="other_create" name="acl[other_create]"' . $other_create_checked . ' /></td>' . "\n" . '</tr>' . "\n" . '</table>' . "\n" . '<p class="notice">' . get_lang("(*) anonymous users, users who are not members of this course...") . '</p>' . "\n" . '</fieldset>' . "\n\n"; if ($groupId != 0) { $form .= '<input type="hidden" name="gidReq" value="' . $groupId . '" />' . "\n"; } $form .= claro_form_relay_context() . "\n"; $form .= '<input type="submit" name="action[exEdit]" value="' . get_lang("Ok") . '" />' . "\n" . claro_html_button(claro_htmlspecialchars(Url::Contextualize($_SERVER['PHP_SELF'] . '?action=list')), get_lang("Cancel")) . "\n"; $form .= '</form>' . "\n"; return $form; }
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = */ if ('exChVis' == $cmd && $courseContext) { $_REQUEST['file'] = secure_file_path($_REQUEST['file']); update_db_info('update', $_REQUEST['file'], array('visibility' => $_REQUEST['vis'])); //notify claroline that visibility changed if ($_REQUEST['vis'] == 'v') { $eventNotifier->notifyCourseEvent("document_visible", claro_get_current_course_id(), claro_get_current_tool_id(), $_REQUEST['file'], claro_get_current_group_id(), "0"); } else { $eventNotifier->notifyCourseEvent("document_invisible", claro_get_current_course_id(), claro_get_current_tool_id(), $_REQUEST['file'], claro_get_current_group_id(), "0"); } } } // END is Allowed to Edit if ('rqSearch' == $cmd) { $searchMsg = !empty($cwd) ? '<br />' . get_lang('Search in %currentDirectory', array('%currentDirectory' => claro_htmlspecialchars($cwd))) : ''; $dialogBox->form('<form action="' . claro_htmlspecialchars($_SERVER['PHP_SELF']) . '" method="post">' . "\n" . claro_form_relay_context() . '<input type="hidden" name="cmd" value="exSearch" />' . "\n" . '<input type="text" id="searchPattern" name="searchPattern" class="inputSearch" />' . "\n" . '<input type="hidden" name="cwd" value="' . claro_htmlspecialchars($cwd) . '" />' . "\n" . '<input type="submit" value="' . get_lang('Search') . '" /> ' . claro_html_button(claro_htmlspecialchars(Url::Contextualize($_SERVER['PHP_SELF'] . '?cmd=exChDir&file=' . base64_encode($cwd))), get_lang("Cancel")) . $searchMsg . '</form>' . "\n"); } if ('exDownload' == $cmd) { if (claro_is_user_authenticated() && (claro_is_allowed_to_edit() || get_conf('cldoc_allowNonManagersToDownloadFolder', true)) || get_conf('cldoc_allowNonManagersToDownloadFolder', true) && get_conf('cldoc_allowAnonymousToDownloadFolder', true)) { /* * PREPARE THE FILE COLLECTION */ if (isset($_REQUEST['file'])) { $requestDownloadPath = $baseWorkDir . secure_file_path($_REQUEST['file']); $searchDownloadPattern = ''; } elseif (isset($_REQUEST['searchPattern'])) { $requestDownloadPath = $baseWorkDir; $searchDownloadPattern = $_REQUEST['searchPattern']; } if (!$is_allowedToEdit && $courseContext) { // Build an exclude file list to prevent simple user
</label> </dd> <dt><?php echo get_lang('Quiz end message'); ?> </dt> <dd> <div style="width:700px;"><?php echo claro_html_textarea_editor('quizEndMessage', $this->data['quizEndMessage']); ?> </div> </dd> </dl> </div> </fieldset> <div style="padding-top: 5px;"> <small><?php echo get_lang('<span class="required">*</span> denotes required field'); ?> </small> </div> <div style="text-align: center;"> <input type="submit" name="" id="" value="<?php echo get_lang('Ok'); ?> " /> <?php echo claro_html_button(Url::Contextualize('../exercise.php'), get_lang('Cancel')); ?> </div> </form>
?> " method="POST"> <fieldset> <input type="hidden" name="cmd" value="exReg" /> <input type="hidden" name="course" value="<?php echo $this->courseCode; ?> " /> <dl> <dt><?php echo get_lang('Enrolment key'); ?> </dt> <dd> <input type="text" name="registrationKey" /> </dd> </dl> </fieldset> <p> <input type="submit" value="<?php echo get_lang('Ok'); ?> " /> <?php echo claro_html_button($_SERVER['PHP_SELF'] . '?cmd=rqReg', get_lang('Cancel')); ?> </p> </form>
echo $this->nextCommand; ?> " /> <input type="hidden" name="topic" value="<?php echo $this->topicId; ?> " /> <input type="hidden" name="forum" value="<?php echo $this->forumId; ?> " /> <?php echo claro_form_relay_context(); ?> <label for="title"><strong><?php echo get_lang('New topic title'); ?> : </strong></label><br /> <input type="text" name="title" id="title" value="<?php echo $this->topicTitle; ?> " /><br /><br /> <input type="submit" value="<?php echo get_lang('Ok'); ?> " /> <?php echo claro_html_button(claro_htmlspecialchars(Url::Contextualize($_SERVER['PHP_SELF'] . '?forum=' . $this->forumId)), get_lang('Cancel')); ?> </form>
$tbl_exercise = Database::get_course_table(TABLE_QUIZ_TEST); $tbl_question = Database::get_course_table(TABLE_QUIZ_QUESTION); $tbl_rel_exercise_question = Database::get_course_table(TABLE_QUIZ_TEST_QUESTION); // tool libraries include_once '../exercise.class.php'; //Tool title $nameTools = get_lang('ImportExercise'); //bredcrump $interbredcrump[] = array('url' => '../exercice.php', 'name' => get_lang('Exercises')); //---------------------------------- // EXECUTE COMMAND //---------------------------------- $cmd = isset($_REQUEST['cmd']) ? $_REQUEST['cmd'] : 'show_import'; switch ($cmd) { case 'show_import': $display = '<p>' . get_lang('Imported exercises must consist of a zip or an XML file (IMS-QTI) and be compatible with your Claroline version.') . '<br>' . '</p>' . '<form enctype="multipart/form-data" action="" method="post">' . '<input name="cmd" type="hidden" value="import" />' . '<input name="uploadedExercise" type="file" /><br><br>' . get_lang('Import exercise') . ' : ' . '<input value="' . get_lang('Ok') . '" type="submit" /> ' . claro_html_button($_SERVER['PHP_SELF'], get_lang('Cancel')) . '<br><br>' . '<small>' . get_lang('Max file size') . ' : 2 MB</small>' . '</form>'; break; case 'import': //include needed librabries for treatment $result_log = import_exercise($_FILES['uploadedExercise']['name']); //display the result message (fail or success) $dialogBox = ''; foreach ($result_log as $log) { $dialogBox .= $log . '<br>'; } break; } //---------------------------------- // FIND INFORMATION //---------------------------------- //empty!
/** * build an html form listing all directories of a given directory and file to move * * @param file string: filename to o move * @param baseWorkDir string: complete path to root directory to prupose as target for move */ function form_dir_list($file, $baseWorkDir) { $dirList = index_and_sort_dir($baseWorkDir); $dialogBox = '<strong>' . get_lang('Move') . '</strong>' . "\n" . "<form action=\"" . $_SERVER['PHP_SELF'] . "\" method=\"post\">\n" . claro_form_relay_context() . "<input type=\"hidden\" name=\"cmd\" value=\"exMv\" />\n" . "<input type=\"hidden\" name=\"file\" value=\"" . base64_encode($file) . "\" />\n" . "<label for=\"destiantion\">" . get_lang('Move <i>%filename</i> to', array('%filename' => basename($file))) . "</label> \n" . "<select name=\"destination\">\n"; if (dirname($file) == '/' || dirname($file) == '\\') { $dialogBox .= '<option value="" class="invisible">root</option>' . "\n"; } else { $dialogBox .= '<option value="" >root</option>' . "\n"; } $bwdLen = strlen($baseWorkDir); // base directories length, used under /* build html form inputs */ if ($dirList) { while (list(, $pathValue) = each($dirList)) { $pathValue = substr($pathValue, $bwdLen); // truncate confidential informations $dirname = basename($pathValue); // extract $pathValue directory name /* compute de the display tab */ $tab = ''; // $tab reinitialisation $depth = substr_count($pathValue, '/'); // The number of nombre '/' indicates the directory deepness for ($h = 0; $h < $depth; $h++) { $tab .= '  '; } if ($file == $pathValue or dirname($file) == $pathValue) { $dialogBox .= '<option class="invisible" value="' . $pathValue . '">' . $tab . ' > ' . $dirname . '</option>' . "\n"; } else { $dialogBox .= '<option value="' . $pathValue . '">' . $tab . ' > ' . $dirname . '</option>' . "\n"; } } } $dialogBox .= '</select>' . "\n" . '<br /><br />' . '<input type="submit" value="' . get_lang('Ok') . '" /> ' . claro_html_button($_SERVER['PHP_SELF'] . '?cmd=exChDir&file=' . claro_htmlspecialchars(claro_dirname($file)), get_lang('Cancel')) . '</form>' . "\n"; return $dialogBox; }
<input type="submit" name="applyChange" id="applyChange" value="<?php echo get_lang('Ok'); ?> " /> <?php if (claro_is_in_a_course()) { ?> <input type="submit" name="applySearch" id="applySearch" value="<?php echo get_lang('Search'); ?> " /> <?php } ?> <?php echo claro_html_button($this->cancelUrl, get_lang('Cancel')); ?> </dt> <dd></dd> </dl> </form> <p class="notice"> <?php echo get_lang('<span class="required">*</span> denotes required field'); ?> </p>
$out .= '<p>' . "\n" . get_lang('Dear %firstname %lastname, your personal settings have been registered.', array('%firstname' => $userData['firstname'], '%lastname' => $userData['lastname'])) . "\n"; if ($mailSent) { $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') . '" /> ' . "\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(); }
// 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') . '" /> ' . "\n" . claro_html_button($_SERVER['PHP_SELF'], get_lang('Cancel')) . "\n" . '</td>' . '</tr>' . "\n" . form_row(' ', '<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 $out .= '<form action="' . $_SERVER['PHP_SELF'] . '" method="post">' . "\n" . '<input type="hidden" name="cmd" value="exCCstatus" />' . "\n" . '<table>' . "\n" . form_input_textarea('explanation', '', get_lang('Comment'), true, 6) . '<tr valign="top">' . "\n" . '<td>' . get_lang('Submit') . ': </td>' . "\n" . '<td><input type="submit" value="' . get_lang('Ok') . '" /> ' . "\n" . claro_html_button($_SERVER['PHP_SELF'], get_lang('Cancel')) . "\n" . '</td></tr>' . "\n" . '</table>' . "\n" . '</form>' . "\n"; break; case DISP_REQUEST_REVOQUATION: if (get_conf('can_request_revoquation')) { $out .= '<form action="' . $_SERVER['PHP_SELF'] . '" method="post">' . "\n" . '<input type="hidden" name="cmd" value="exRevoquation" />' . "\n" . '<table>' . "\n" . form_input_text('loginToDelete', '', get_lang('Username'), true) . form_input_password('passwordToDelete', '', get_lang('Password'), true) . form_input_textarea('explanation', '', get_lang('Comment'), true, 6) . '<tr valign="top">' . "\n" . '<td>' . get_lang('Delete my account') . ': </td>' . "\n" . '<td>' . '<input type="submit" value="' . get_lang('Ok') . '" /> ' . "\n" . claro_html_button($_SERVER['PHP_SELF'], get_lang('Cancel')) . "\n" . '</td></tr>' . "\n" . '</table>' . "\n" . '</form>' . "\n"; } break; } // end switch display $claroline->display->body->appendContent($out); echo $claroline->display->render();
if (get_conf('confirm_not_anonymous', 'TRUE') == 'TRUE') { ?> class="confirmAnonymous"<?php } ?> type="checkbox" name="anonymous_post" value="1"<?php echo $checked; ?> /> </td> </tr> <?php } ?> <tr valign="top"><td> </td> <td><input class="confirm" type="submit" name="submit" value="<?php echo get_lang('Ok'); ?> " /> <?php if ($this->editMode != "add") { echo claro_html_button(claro_htmlspecialchars(Url::Contextualize($_SERVER['PHP_SELF'] . '?topic=' . $this->topicId)), get_lang('Cancel')); } else { echo claro_html_button(claro_htmlspecialchars(Url::Contextualize(get_module_url('CLFRM') . '/viewforum.php?forum=' . $this->forumId)), get_lang('Cancel')); } ?> </td> </tr> </tbody> </table> </form>