fix buttons catalog of courses CT#7539

1.10.x
aragonc 10 years ago
parent c5bb43bb74
commit 0f198aa631
  1. 2
      main/inc/lib/course.lib.php
  2. 7
      main/template/default/auth/courses_categories.php

@ -4559,7 +4559,7 @@ class CourseManager
if ($access_link && in_array('register', $access_link)) {
$my_course['extra_info']['register_button'] = Display::url(get_lang('Subscribe'),
api_get_path(WEB_COURSE_PATH) . $course_info['path'] . '/index.php?action=subscribe&sec_token=' . $stok,
array('class' => 'btn btn-primary'));
array('class' => 'btn btn-success btn-block btn-sm'));
}
if ($access_link && in_array('enter',

@ -208,6 +208,7 @@ $code = isset($code) ? $code : null;
$course_open = ($course['visibility'] == COURSE_VISIBILITY_OPEN_PLATFORM);
$course_private = ($course['visibility'] == COURSE_VISIBILITY_REGISTERED);
$course_closed = ($course['visibility'] == COURSE_VISIBILITY_CLOSED);
$course_subscribe_allowed = ($course['subscribe'] == 1);
$course_unsubscribe_allowed = ($course['unsubscribe'] == 1);
$count_connections = $course['count_connections'];
@ -229,14 +230,12 @@ $code = isset($code) ? $code : null;
// if user registered as student
if ($user_registerd_in_course_as_student) {
if (!$course_closed) {
//$html .= return_goto_button($course);
if ($course_unsubscribe_allowed) {
$html .= return_unregister_button($course, $stok, $search_term, $code);
}
$html .= return_already_registered_label('student');
$html .= return_description_button($course, $icon_title);
}
$html .= return_description_button($course, $icon_title);
} elseif ($user_registerd_in_course_as_teacher) {
// if user registered as teacher
//$html .= return_goto_button($course);
@ -255,8 +254,8 @@ $code = isset($code) ? $code : null;
$html .= return_register_button($course, $stok, $code, $search_term);
}
}
$html .= return_description_button($course, $icon_title);
}
$html .= return_description_button($course, $icon_title);
}
$html .= '</div>';

Loading…
Cancel
Save