Course request: Set description as mandatory field in course request form

Author: @nosolored
pull/5478/head
Nosolored SL 1 year ago committed by GitHub
parent cbab6d8af5
commit d307c15da4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 19
      main/create_course/add_course.php

@ -85,6 +85,17 @@ $form->addElement(
$form->applyFilter('title', 'html_filter');
$form->addRule('title', get_lang('ThisFieldIsRequired'), 'required');
if ($course_validation_feature) {
// Description of the requested course.
$form->addElement(
'textarea',
'description',
get_lang('Description'),
['rows' => '3']
);
$form->addRule('description', get_lang('ThisFieldIsRequired'), 'required');
}
if (!api_get_configuration_value('course_creation_form_set_course_category_mandatory')) {
$form->addButtonAdvancedSettings('advanced_params');
$form->addElement(
@ -171,14 +182,6 @@ if (!api_get_configuration_value('course_creation_form_hide_course_code')) {
// The teacher
$titular = &$form->addElement('hidden', 'tutor_name', '');
if ($course_validation_feature) {
// Description of the requested course.
$form->addElement(
'textarea',
'description',
get_lang('Description'),
['rows' => '3']
);
// Objectives of the requested course.
$form->addElement(
'textarea',

Loading…
Cancel
Save