Skip to content

Commit

Permalink
Course request: Set description as mandatory field in course request …
Browse files Browse the repository at this point in the history
…form

Author: @nosolored
  • Loading branch information
nosolored committed Apr 26, 2024
1 parent cbab6d8 commit d307c15
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions main/create_course/add_course.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,17 @@ function setFocus(){
$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(
Expand Down Expand Up @@ -171,14 +182,6 @@ function setFocus(){
// 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',
Expand Down

0 comments on commit d307c15

Please sign in to comment.