Add user_portal_load_notification_by_ajax validation

pull/2487/head
jmontoyaa 9 years ago
parent 8ffb7fe912
commit 8a97b51b4a
  1. 14
      user_portal.php

@ -39,9 +39,11 @@ $load_dirs = api_get_setting('show_documents_preview');
$displayMyCourseViewBySessionLink = api_get_setting('my_courses_view_by_session') === 'true';
$nameTools = get_lang('MyCourses');
// Load notification by ajax
$htmlHeadXtra[] = '<script>
$(function() {
// Load course notification by ajax
$loadNotificationsByAjax = api_get_configuration_value('user_portal_load_notification_by_ajax');
if ($loadNotificationsByAjax) {
$htmlHeadXtra[] = '<script>
$(function() {
$(".course_notification").each(function(index) {
var div = $(this);
var id = $(this).attr("id");
@ -57,9 +59,9 @@ $(function() {
}
});
});
});
</script>';
});
</script>';
}
/*
Header

Loading…
Cancel
Save