use Chamilo\CoreBundle\Component\Utils\ActionIcon;
use Chamilo\CoreBundle\Component\Utils\ActionIcon;
use Chamilo\CoreBundle\Component\Utils\StateIcon;
$cidReset = true;
$cidReset = true;
require_once __DIR__.'/../inc/global.inc.php';
require_once __DIR__.'/../inc/global.inc.php';
@ -246,39 +247,19 @@ function get_course_visibility_icon($visibility)
$style = 'margin-bottom:0;margin-right:5px;';
$style = 'margin-bottom:0;margin-right:5px;';
switch ($visibility) {
switch ($visibility) {
case 0:
case 0:
return Display::return_icon(
return Display::getMdiIcon(StateIcon::CLOSED_VISIBILITY, 'ch-tool-icon', $style, ICON_SIZE_SMALL, get_lang('Closed - the course is only accessible to the teachers'));
'bullet_red.png',
get_lang('Closed - the course is only accessible to the teachers'),
['style' => $style]
);
break;
break;
case 1:
case 1:
return Display::return_icon(
return Display::getMdiIcon(StateIcon::PRIVATE_VISIBILITY, 'ch-tool-icon', $style, ICON_SIZE_SMALL, get_lang('Private access (access authorized to group members only)'));
'bullet_orange.png',
get_lang('Private access (access authorized to group members only)'),
['style' => $style]
);
break;
break;
case 2:
case 2:
return Display::return_icon(
return Display::getMdiIcon(StateIcon::OPEN_VISIBILITY, 'ch-tool-icon', $style, ICON_SIZE_SMALL, get_lang('Open - access allowed for users registered on the platform'));
'bullet_green.png',
get_lang('Open - access allowed for users registered on the platform'),
['style' => $style]
);
break;
break;
case 3:
case 3:
return Display::return_icon(
return Display::getMdiIcon(StateIcon::PUBLIC_VISIBILITY, 'ch-tool-icon', $style, ICON_SIZE_SMALL, get_lang('Public - access allowed for the whole world'));
'bullet_blue.png',
get_lang('Public - access allowed for the whole world'),
['style' => $style]
);
break;
break;
case 4:
case 4:
return Display::return_icon(
return Display::getMdiIcon(StateIcon::HIDDEN_VISIBILITY, 'ch-tool-icon', $style, ICON_SIZE_SMALL, get_lang('Hidden - Completely hidden to all users except the administrators'));
'bullet_grey.png',
get_lang('Hidden - Completely hidden to all users except the administrators'),
' <ahref="?delete_course_request='.$id.'"script="onclick:if (!confirm(\''.addslashes(api_htmlentities(sprintf(get_lang('The course request %s is going to be deleted. Is it OK to proceed?'), $code), ENT_QUOTES)).'\')) return false;">'.
Display::return_icon(
Display::getMdiIcon(
'delete.png',
ActionIcon::DELETE,
get_lang('Delete this course request'),
'ch-tool-icon',
[
'vertical-align: middle;',
'style' => 'vertical-align: middle;',
ICON_SIZE_SMALL,
'onclick' => 'javascript: if (!confirm(\''.addslashes(api_htmlentities(sprintf(get_lang('The course request %s is going to be deleted. Is it OK to proceed?'), $code), ENT_QUOTES)).'\')) return false;',
' <ahref="?accept_course_request='.$id.'"script="onclick:if (!confirm(\''.addslashes(api_htmlentities(sprintf(get_lang('A new course %s is going to be created. Is it OK to proceed?'), $code), ENT_QUOTES)).'\')) return false;">'.
Display::return_icon(
Display::getMdiIcon(
'accept.png',
ActionIcon::ACCEPT,
get_lang('Accept this course'),
'ch-tool-icon',
[
'vertical-align: middle;',
'style' => 'vertical-align: middle;',
ICON_SIZE_SMALL,
'onclick' => 'javascript: if (!confirm(\''.addslashes(api_htmlentities(sprintf(get_lang('A new course %s is going to be created. Is it OK to proceed?'), $code), ENT_QUOTES)).'\')) return false;',
get_lang('Accept this course')
]
).
).
'</a>';
'</a>';
if (!CourseRequestManager::additional_info_asked($id)) {
if (!CourseRequestManager::additional_info_asked($id)) {
$result .= ' <ahref="?request_info='.$id.'"script="onclick:if (!confirm(\''.addslashes(api_htmlentities(sprintf(get_lang('Additional information about %s course request is going to be asked through an e-mail message. Is it OK to proceed?'), $code), ENT_QUOTES)).'\')) return false;">'.
Display::return_icon(
Display::getMdiIcon(
'request_info.gif',
ActionIcon::INFORMATION,
get_lang('Ask for additional information'),
'ch-tool-icon',
[
'vertical-align: middle;',
'style' => 'vertical-align: middle;',
ICON_SIZE_SMALL,
'onclick' => 'javascript: if (!confirm(\''.addslashes(api_htmlentities(sprintf(get_lang('Additional information about %s course request is going to be asked through an e-mail message. Is it OK to proceed?'), $code), ENT_QUOTES)).'\')) return false;',
$result .= ' <ahref="?delete_course_request='.$id.'"script="onclick:if (!confirm(\''.addslashes(api_htmlentities(sprintf(get_lang('The course request %s is going to be deleted. Is it OK to proceed?'), $code), ENT_QUOTES)).'\')) return false;">'.
Display::return_icon(
Display::getMdiIcon(
'delete.png',
ActionIcon::DELETE,
get_lang('Delete this course request'),
'ch-tool-icon',
[
'vertical-align: middle;',
'style' => 'vertical-align: middle;',
ICON_SIZE_SMALL,
'onclick' => 'javascript: if (!confirm(\''.addslashes(api_htmlentities(sprintf(get_lang('The course request %s is going to be deleted. Is it OK to proceed?'), $code), ENT_QUOTES)).'\')) return false;',
Display::return_icon('accept.png', get_lang('Accept this course'), ['style' => 'vertical-align: middle;', 'onclick' => 'javascript: if (!confirm(\''.addslashes(api_htmlentities(sprintf(get_lang('A new course %s is going to be created. Is it OK to proceed?'), $code), ENT_QUOTES)).'\')) return false;'], 16).'</a>'.
'ch-tool-icon',
' <ahref="?reject_course_request='.$id.'">'.
'vertical-align: middle;',
Display::return_icon('error.png', get_lang('Reject this course request'), ['style' => 'vertical-align: middle;', 'onclick' => 'javascript: if (!confirm(\''.addslashes(api_htmlentities(sprintf(get_lang('The course request %s is going to be rejected. Is it OK to proceed?'), $code), ENT_QUOTES)).'\')) return false;'], 16).'</a>';
ICON_SIZE_SMALL,
get_lang('Edit')
).'</a>'.
' <ahref="?accept_course_request='.$id.'"script="onclick: if (!confirm(\''.addslashes(api_htmlentities(sprintf(get_lang('A new course %s is going to be created. Is it OK to proceed?'), $code), ENT_QUOTES)).'\')) return false;">'.
Display::getMdiIcon(
StateIcon::COMPLETE,
'ch-tool-icon',
'vertical-align: middle;',
ICON_SIZE_TINY,
get_lang('Accept this course')
).'</a>'.
' <ahref="?reject_course_request='.$id.'"script="onclick:if (!confirm(\''.addslashes(api_htmlentities(sprintf(get_lang('The course request %s is going to be rejected. Is it OK to proceed?'), $code), ENT_QUOTES)).'\')) return false;">'.
Display::getMdiIcon(
'trash-can-outline',
'ch-tool-icon',
'vertical-align: middle;',
ICON_SIZE_TINY,
get_lang('Reject this course request')
).'</a>';
if (!CourseRequestManager::additional_info_asked($id)) {
if (!CourseRequestManager::additional_info_asked($id)) {
$result .= ' <ahref="?request_info='.$id.'"script="onclick:if (!confirm(\''.addslashes(api_htmlentities(sprintf(get_lang('Additional information about %s course request is going to be asked through an e-mail message. Is it OK to proceed?'), $code), ENT_QUOTES)).'\')) return false;">'.
Display::return_icon('request_info.gif', get_lang('Ask for additional information'), ['style' => 'vertical-align: middle;', 'onclick' => 'javascript: if (!confirm(\''.addslashes(api_htmlentities(sprintf(get_lang('Additional information about %s course request is going to be asked through an e-mail message. Is it OK to proceed?'), $code), ENT_QUOTES)).'\')) return false;']).'</a>';
Display::getMdiIcon(
ActionIcon::INFORMATION,
'ch-tool-icon',
'vertical-align: middle;',
ICON_SIZE_SMALL,
get_lang('Ask for additional information'),
).'</a>';
}
}
if (DELETE_ACTION_ENABLED) {
if (DELETE_ACTION_ENABLED) {
$message = addslashes(api_htmlentities(sprintf(get_lang('The course request %s is going to be deleted. Is it OK to proceed?'), $code), ENT_QUOTES));
$message = addslashes(api_htmlentities(sprintf(get_lang('The course request %s is going to be deleted. Is it OK to proceed?'), $code), ENT_QUOTES));
<divclass="description"><?phpechoget_lang('This section is only visible on installations from source code, not in packaged versions of the platform. It will allow you to quickly populate your platform with test data. Use with care (data is really inserted) and only on development or testing installations.');?></div>
<divclass="description"><?phpechoget_lang('This section is only visible on installations from source code, not in packaged versions of the platform. It will allow you to quickly populate your platform with test data. Use with care (data is really inserted) and only on development or testing installations.');?></div>
use Chamilo\CoreBundle\Component\Utils\ActionIcon;
use Chamilo\CoreBundle\Component\Utils\ObjectIcon;
// resetting the course id
// resetting the course id
$cidReset = true;
$cidReset = true;
@ -54,7 +54,7 @@ $course = $_POST['course'];
if (empty($annee) && empty($course)) {
if (empty($annee) && empty($course)) {
Display::display_header($tool_name);
Display::display_header($tool_name);
echo '<divstyle="align:center">';
echo '<divstyle="align:center">';
echo Display::return_icon('group.gif', get_lang('Select a filter to find a matching string at the end of the OU attribute'));
echo Display::getMdiIcon(ObjectIcon::GROUP, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Select a filter to find a matching string at the end of the OU attribute'));
echo get_lang('Select a filter to find a matching string at the end of the OU attribute');
echo get_lang('Select a filter to find a matching string at the end of the OU attribute');
//echo '<em>'.get_lang('In order to do this, you must enter the year, the component and the component's step').'</em><br/>';
//echo '<em>'.get_lang('In order to do this, you must enter the year, the component and the component's step').'</em><br/>';
///echo get_lang('Follow each of these steps, step by step').'<br/>';
///echo get_lang('Follow each of these steps, step by step').'<br/>';
@ -68,7 +68,7 @@ if (empty($annee) && empty($course)) {
} elseif (!empty($annee) && empty($course)) {
} elseif (!empty($annee) && empty($course)) {
Display::display_header($tool_name);
Display::display_header($tool_name);
echo '<divstyle="align:center">';
echo '<divstyle="align:center">';
echo Display::return_icon('course.png', get_lang('Select a course in which you would like to register the users you are going to select next')).' '.get_lang('Select a course in which you would like to register the users you are going to select next').'<br/>';
echo Display::getMdiIcon(ObjectIcon::COURSE, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Select a course in which you would like to register the users you are going to select next')).' '.get_lang('Select a course in which you would like to register the users you are going to select next').'<br/>';
echo Display::return_icon('group.gif', get_lang('Select a filter to find a matching string at the end of the OU attribute')).' '.get_lang('Select a filter to find a matching string at the end of the OU attribute');
echo Display::getMdiIcon(ObjectIcon::GROUP, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Select a filter to find a matching string at the end of the OU attribute')).' '.get_lang('Select a filter to find a matching string at the end of the OU attribute');
Display::return_icon('shared_setting.png', get_lang('Change setting visibility for the other portals'), null, ICON_SIZE_MEDIUM).'</a></div>'
Display::getMdiIcon(StateIcon::SHARED_VISIBILITY, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Change setting visibility for the other portals')).'</a></div>'
Display::return_icon('shared_setting_na.png', get_lang('Change setting visibility for the other portals'), null, ICON_SIZE_MEDIUM).'</a></div>'
Display::getMdiIcon(StateIcon::SHARED_VISIBILITY, 'ch-tool-icon-disabled', null, ICON_SIZE_MEDIUM, get_lang('Change setting visibility for the other portals')).'</a></div>'
);
);
}
}
} else {
} else {
@ -1389,13 +1389,13 @@ function generateSettingsForm($settings, $settings_by_access_list)
$form->addElement(
$form->addElement(
'html',
'html',
'<divclass="float-right">'.
'<divclass="float-right">'.
Display::return_icon('shared_setting.png', get_lang('Change setting visibility for the other portals'), null, ICON_SIZE_MEDIUM).'</div>'
Display::getMdiIcon(StateIcon::SHARED_VISIBILITY, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Change setting visibility for the other portals')).'</div>'
);
);
} else {
} else {
$form->addElement(
$form->addElement(
'html',
'html',
'<divclass="float-right">'.
'<divclass="float-right">'.
Display::return_icon('shared_setting_na.png', get_lang('Change setting visibility for the other portals'), null, ICON_SIZE_MEDIUM).'</div>'
Display::getMdiIcon(StateIcon::SHARED_VISIBILITY, 'ch-tool-icon-disabled', null, ICON_SIZE_MEDIUM, get_lang('Change setting visibility for the other portals')).'</div>'
);
);
}
}
}
}
@ -1662,7 +1662,7 @@ function generateSettingsForm($settings, $settings_by_access_list)
use Chamilo\CoreBundle\Component\Utils\ActionIcon;
use Chamilo\CoreBundle\Component\Utils\ObjectIcon;
$cidReset = true;
$cidReset = true;
require_once __DIR__.'/../inc/global.inc.php';
require_once __DIR__.'/../inc/global.inc.php';
@ -43,7 +43,7 @@ function validate_filter() {
Display :: display_header($tool_name);
Display :: display_header($tool_name);
$link_add_group = '<ahref="usergroups.php">'.
$link_add_group = '<ahref="usergroups.php">'.
Display::return_icon('multiple.gif', get_lang('Enrolment by classes')).get_lang('Enrolment by classes').'</a>';
Display::getMdiIcon(ObjectIcon::MULTI_ELEMENT, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Enrolment by classes')).get_lang('Enrolment by classes').'</a>';
.' <ahref="add_users_to_usergroup.php?id=\'+options.rowId+\'">'.Display::return_icon('user_to_class.png', get_lang('Subscribe users to class'), null, ICON_SIZE_MEDIUM).'</a>'
.' <ahref="add_users_to_usergroup.php?id=\'+options.rowId+\'">'.Display::getMdiIcon(ObjectIcon::USER, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Subscribe users to class')).'</a>'
.' <ahref="add_courses_to_usergroup.php?id=\'+options.rowId+\'">'.Display::return_icon('course_to_class.png', get_lang('Subscribe class to courses'), null, ICON_SIZE_MEDIUM).'</a>'
.' <ahref="add_courses_to_usergroup.php?id=\'+options.rowId+\'">'.Display::getMdiIcon(ObjectIcon::COURSE, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Subscribe class to courses')).'</a>'