|
|
@ -5076,7 +5076,10 @@ class CourseManager |
|
|
|
$my_course['price'] = $isThisCourseInSale['html']; |
|
|
|
$my_course['price'] = $isThisCourseInSale['html']; |
|
|
|
// set the Buy button instead register. |
|
|
|
// set the Buy button instead register. |
|
|
|
if ($isThisCourseInSale['verificator'] && !empty($my_course['register_button'])) { |
|
|
|
if ($isThisCourseInSale['verificator'] && !empty($my_course['register_button'])) { |
|
|
|
$my_course['register_button'] = $plugin->returnBuyCourseButton($course_info['real_id'], BuyCoursesPlugin::PRODUCT_TYPE_COURSE); |
|
|
|
$my_course['register_button'] = $plugin->returnBuyCourseButton( |
|
|
|
|
|
|
|
$course_info['real_id'], |
|
|
|
|
|
|
|
BuyCoursesPlugin::PRODUCT_TYPE_COURSE |
|
|
|
|
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
// end buycourse validation |
|
|
|
// end buycourse validation |
|
|
@ -5822,7 +5825,8 @@ class CourseManager |
|
|
|
/** |
|
|
|
/** |
|
|
|
* Generates a course code from a course title |
|
|
|
* Generates a course code from a course title |
|
|
|
* @todo Such a function might be useful in other places too. It might be moved in the CourseManager class. |
|
|
|
* @todo Such a function might be useful in other places too. It might be moved in the CourseManager class. |
|
|
|
* @todo the function might be upgraded for avoiding code duplications (currently, it might suggest a code that is already in use) |
|
|
|
* @todo the function might be upgraded for avoiding code duplications (currently, |
|
|
|
|
|
|
|
* it might suggest a code that is already in use) |
|
|
|
* @param string $title A course title |
|
|
|
* @param string $title A course title |
|
|
|
* @return string A proposed course code |
|
|
|
* @return string A proposed course code |
|
|
|
* + |
|
|
|
* + |
|
|
@ -6324,7 +6328,13 @@ class CourseManager |
|
|
|
if ($loadDirs) { |
|
|
|
if ($loadDirs) { |
|
|
|
$params['right_actions'] .= '<a id="document_preview_'.$course_info['real_id'].'_0" class="document_preview" href="javascript:void(0);">'.Display::return_icon('folder.png', get_lang('Documents'), array('align' => 'absmiddle'), ICON_SIZE_SMALL).'</a>'; |
|
|
|
$params['right_actions'] .= '<a id="document_preview_'.$course_info['real_id'].'_0" class="document_preview" href="javascript:void(0);">'.Display::return_icon('folder.png', get_lang('Documents'), array('align' => 'absmiddle'), ICON_SIZE_SMALL).'</a>'; |
|
|
|
$params['right_actions'] .= '<a href="'.api_get_path(WEB_CODE_PATH).'course_info/infocours.php?cidReq='.$course['code'].'">'.Display::return_icon('edit.png', get_lang('Edit'), array('align' => 'absmiddle'), ICON_SIZE_SMALL).'</a>'; |
|
|
|
$params['right_actions'] .= '<a href="'.api_get_path(WEB_CODE_PATH).'course_info/infocours.php?cidReq='.$course['code'].'">'.Display::return_icon('edit.png', get_lang('Edit'), array('align' => 'absmiddle'), ICON_SIZE_SMALL).'</a>'; |
|
|
|
$params['right_actions'] .= Display::div('', array('id' => 'document_result_'.$course_info['real_id'].'_0', 'class'=>'document_preview_container')); |
|
|
|
$params['right_actions'] .= Display::div( |
|
|
|
|
|
|
|
'', |
|
|
|
|
|
|
|
array( |
|
|
|
|
|
|
|
'id' => 'document_result_'.$course_info['real_id'].'_0', |
|
|
|
|
|
|
|
'class' => 'document_preview_container', |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
$params['right_actions'] .= '<a class="btn btn-default btn-sm" title="'.get_lang('Edit').'" href="'.api_get_path(WEB_CODE_PATH).'course_info/infocours.php?cidReq='.$course['code'].'">'.Display::returnFontAwesomeIcon('pencil').'</a>'; |
|
|
|
$params['right_actions'] .= '<a class="btn btn-default btn-sm" title="'.get_lang('Edit').'" href="'.api_get_path(WEB_CODE_PATH).'course_info/infocours.php?cidReq='.$course['code'].'">'.Display::returnFontAwesomeIcon('pencil').'</a>'; |
|
|
|
} |
|
|
|
} |
|
|
@ -6336,7 +6346,13 @@ class CourseManager |
|
|
|
if ($course_info['visibility'] != COURSE_VISIBILITY_CLOSED) { |
|
|
|
if ($course_info['visibility'] != COURSE_VISIBILITY_CLOSED) { |
|
|
|
if ($loadDirs) { |
|
|
|
if ($loadDirs) { |
|
|
|
$params['right_actions'] .= '<a id="document_preview_'.$course_info['real_id'].'_0" class="document_preview" href="javascript:void(0);">'.Display::return_icon('folder.png', get_lang('Documents'), array('align' => 'absmiddle'), ICON_SIZE_SMALL).'</a>'; |
|
|
|
$params['right_actions'] .= '<a id="document_preview_'.$course_info['real_id'].'_0" class="document_preview" href="javascript:void(0);">'.Display::return_icon('folder.png', get_lang('Documents'), array('align' => 'absmiddle'), ICON_SIZE_SMALL).'</a>'; |
|
|
|
$params['right_actions'] .= Display::div('', array('id' => 'document_result_'.$course_info['real_id'].'_0', 'class'=>'document_preview_container')); |
|
|
|
$params['right_actions'] .= Display::div( |
|
|
|
|
|
|
|
'', |
|
|
|
|
|
|
|
array( |
|
|
|
|
|
|
|
'id' => 'document_result_'.$course_info['real_id'].'_0', |
|
|
|
|
|
|
|
'class' => 'document_preview_container', |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
if ($course_info['status'] == COURSEMANAGER) { |
|
|
|
if ($course_info['status'] == COURSEMANAGER) { |
|
|
|
$params['right_actions'] .= '<a class="btn btn-default btn-sm" title="'.get_lang('Edit').'" href="'.api_get_path(WEB_CODE_PATH).'course_info/infocours.php?cidReq='.$course['code'].'">'.Display::returnFontAwesomeIcon('pencil').'</a>'; |
|
|
|
$params['right_actions'] .= '<a class="btn btn-default btn-sm" title="'.get_lang('Edit').'" href="'.api_get_path(WEB_CODE_PATH).'course_info/infocours.php?cidReq='.$course['code'].'">'.Display::returnFontAwesomeIcon('pencil').'</a>'; |
|
|
@ -6350,7 +6366,11 @@ class CourseManager |
|
|
|
$course_title_url = api_get_path(WEB_COURSE_PATH).$course_info['path'].'/?id_session=0'; |
|
|
|
$course_title_url = api_get_path(WEB_COURSE_PATH).$course_info['path'].'/?id_session=0'; |
|
|
|
$course_title = Display::url($course_info['title'], $course_title_url); |
|
|
|
$course_title = Display::url($course_info['title'], $course_title_url); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
$course_title = $course_info['title'].' '.Display::tag('span', get_lang('CourseClosed'), array('class'=>'item_closed')); |
|
|
|
$course_title = $course_info['title'].' '.Display::tag( |
|
|
|
|
|
|
|
'span', |
|
|
|
|
|
|
|
get_lang('CourseClosed'), |
|
|
|
|
|
|
|
array('class' => 'item_closed') |
|
|
|
|
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Start displaying the course block itself |
|
|
|
// Start displaying the course block itself |
|
|
|