Minor "course legal agreement" corrections

skala
Julio Montoya 13 years ago
parent 58c4229ce6
commit 78ddfb01a4
  1. 8
      main/course_info/infocours.php
  2. 8
      main/course_info/legal.php

@ -45,8 +45,7 @@ function is_settings_editable() {
return $GLOBALS['course_info_is_editable'];
}
/* MAIN CODE */
/* MAIN CODE */
if (!$is_allowedToEdit) {
api_not_allowed(true);
}
@ -149,7 +148,6 @@ $prof -> setSelected($s_selected_tutor);
$visual_code->freeze();
$form->applyFilter('visual_code', 'strtoupper');*/
$form->addElement('select', 'category_code', get_lang('Fac'), $categories, array('style'=>'width:350px', 'class'=>'chzn-select', 'id'=>'category_code'));
$form->addElement('select_language', 'course_language', array(get_lang('Ln'), get_lang('TipLang')));
@ -203,13 +201,11 @@ $form->addGroup($group, '', array(get_lang("Unsubscription")), '');
$form->add_textfield('course_registration_password', get_lang('CourseRegistrationPassword'), false, array('size' => '60'));
$form->addElement('checkbox', 'activate_legal', array(null, get_lang('ShowALegalNoticeWhenEnteringTheCourse')), get_lang('ActivateLegal'));
$form->addElement('textarea', 'legal', get_lang('CourseLegalAgreement'), array('cols'=>75, 'rows' => 10));
$form->addElement('textarea', 'legal', get_lang('CourseLegalAgreement'), array('class'=>'span6', 'rows' => 8));
$form->addElement('style_submit_button', null, get_lang('SaveSettings'), 'class="save"');
$form->addElement('html', '</div></div>');
// EMAIL NOTIFICATIONS
$form->addElement('html', '<div> <h3>'.Display::return_icon('mail.png', Security::remove_XSS(get_lang('EmailNotifications')),'',ICON_SIZE_SMALL).' '.Security::remove_XSS(get_lang('EmailNotifications')).'</h3><div>');

@ -8,7 +8,6 @@ $cidReset = true;
require_once '../inc/global.inc.php';
$this_section = SECTION_COURSES;
$course_code = isset($_REQUEST['course_code']) ? $_REQUEST['course_code'] : null;
$session_id = isset($_REQUEST['session_id']) ? intval($_REQUEST['session_id']) : null;
$user_id = api_get_user_id();
@ -17,14 +16,13 @@ if (empty($course_code)) {
api_not_allowed();
}
$course_info = CourseManager::get_course_information($course_code);
$course_legal = $course_info['legal'];
// Build the form
$form = new FormValidator('legal', 'GET', api_get_self().'?course_code='.$course_code.'&session_id='.$session_id);
$form->addElement('header', get_lang('CourseLegalAgreement'));
$form->addElement('label', null, $course_legal);
$form->addElement('hidden', 'course_code', $course_code);
$form->addElement('hidden', 'session_id', $session_id);
$form->addElement('checkbox', 'accept_legal', null, get_lang('AcceptLegal'));
@ -70,7 +68,5 @@ if (empty($session_id)) {
}
Display :: display_header($nameTools);
echo '<h2>'.get_lang('CourseLegalAgreement').'</h2>';
echo $course_legal;
$form->display();
Display :: display_footer();
Loading…
Cancel
Save