|
|
@ -39,27 +39,29 @@ $load_dirs = api_get_setting('show_documents_preview'); |
|
|
|
$displayMyCourseViewBySessionLink = api_get_setting('my_courses_view_by_session') === 'true'; |
|
|
|
$displayMyCourseViewBySessionLink = api_get_setting('my_courses_view_by_session') === 'true'; |
|
|
|
$nameTools = get_lang('MyCourses'); |
|
|
|
$nameTools = get_lang('MyCourses'); |
|
|
|
|
|
|
|
|
|
|
|
// Load notification by ajax |
|
|
|
// Load course notification by ajax |
|
|
|
$htmlHeadXtra[] = '<script> |
|
|
|
$loadNotificationsByAjax = api_get_configuration_value('user_portal_load_notification_by_ajax'); |
|
|
|
$(function() { |
|
|
|
if ($loadNotificationsByAjax) { |
|
|
|
$(".course_notification").each(function(index) { |
|
|
|
$htmlHeadXtra[] = '<script> |
|
|
|
var div = $(this); |
|
|
|
$(function() { |
|
|
|
var id = $(this).attr("id"); |
|
|
|
$(".course_notification").each(function(index) { |
|
|
|
var idList = id.split("_"); |
|
|
|
var div = $(this); |
|
|
|
var courseId = idList[1]; |
|
|
|
var id = $(this).attr("id"); |
|
|
|
var sessionId = idList[2]; |
|
|
|
var idList = id.split("_"); |
|
|
|
var status = idList[3]; |
|
|
|
var courseId = idList[1]; |
|
|
|
$.ajax({ |
|
|
|
var sessionId = idList[2]; |
|
|
|
type: "GET", |
|
|
|
var status = idList[3]; |
|
|
|
url: "'.api_get_path(WEB_AJAX_PATH).'course_home.ajax.php?a=get_notification&course_id="+courseId+"&session_id="+sessionId+"&status="+status, |
|
|
|
$.ajax({ |
|
|
|
success: function(data) { |
|
|
|
type: "GET", |
|
|
|
div.append(data); |
|
|
|
url: "'.api_get_path(WEB_AJAX_PATH).'course_home.ajax.php?a=get_notification&course_id="+courseId+"&session_id="+sessionId+"&status="+status, |
|
|
|
} |
|
|
|
success: function(data) { |
|
|
|
|
|
|
|
div.append(data); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
|
</script>'; |
|
|
|
|
|
|
|
} |
|
|
|
</script>'; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* |
|
|
|
/* |
|
|
|
Header |
|
|
|
Header |
|
|
|