Index: lams_learning/src/java/org/lamsfoundation/lams/learning/web/controller/LearnerController.java =================================================================== diff -u -r735e5ff1a7439c3b86b3448b18e324ea20eef5d0 -rcd376b6f01522589c2f68b3c548390c23e79ce01 --- lams_learning/src/java/org/lamsfoundation/lams/learning/web/controller/LearnerController.java (.../LearnerController.java) (revision 735e5ff1a7439c3b86b3448b18e324ea20eef5d0) +++ lams_learning/src/java/org/lamsfoundation/lams/learning/web/controller/LearnerController.java (.../LearnerController.java) (revision cd376b6f01522589c2f68b3c548390c23e79ce01) @@ -432,9 +432,6 @@ activityJSON.put("name", activity.getTitle()); int status = activity.getActivityId().equals(currentActivityId) ? 0 : activity.getStatus(); activityJSON.put("status", status); - if (activity.getIconURL() != null) { - activityJSON.put("iconURL", activity.getIconURL()); - } // URL in learner mode String url = activity.getUrl(); Index: lams_learning/web/css/components-learner.css =================================================================== diff -u -r735e5ff1a7439c3b86b3448b18e324ea20eef5d0 -rcd376b6f01522589c2f68b3c548390c23e79ce01 --- lams_learning/web/css/components-learner.css (.../components-learner.css) (revision 735e5ff1a7439c3b86b3448b18e324ea20eef5d0) +++ lams_learning/web/css/components-learner.css (.../components-learner.css) (revision cd376b6f01522589c2f68b3c548390c23e79ce01) @@ -101,24 +101,19 @@ margin-right: .5rem; } -.component-page-wrapper .component-sidebar .progress-bar-items > li > img.progress-bar-icon { - width: 30px; - height: 30px; -} - .component-page-wrapper .component-sidebar .progress-bar-items > li.progress-bar-item-incomplete, -.component-page-wrapper .component-sidebar .progress-bar-items > li.progress-bar-item-incomplete > i.progress-bar-icon { +.component-page-wrapper .component-sidebar .progress-bar-items > li.progress-bar-item-incomplete > .progress-bar-icon { color: var(--bs-gray-700); } .component-page-wrapper .component-sidebar .progress-bar-items > li.progress-bar-item-complete, -.component-page-wrapper .component-sidebar .progress-bar-items > li.progress-bar-item-complete > i.progress-bar-icon { +.component-page-wrapper .component-sidebar .progress-bar-items > li.progress-bar-item-complete > .progress-bar-icon { color: var(--bs-green); } .component-page-wrapper .component-sidebar .progress-bar-items > li.support-bar-item, .component-page-wrapper .component-sidebar .progress-bar-items > li.progress-bar-item-current, -.component-page-wrapper .component-sidebar .progress-bar-items > li.progress-bar-item-current > i.progress-bar-icon { +.component-page-wrapper .component-sidebar .progress-bar-items > li.progress-bar-item-current > .progress-bar-icon { color: var(--bs-black); } Index: lams_learning/web/includes/javascript/learnerPage.js =================================================================== diff -u -r735e5ff1a7439c3b86b3448b18e324ea20eef5d0 -rcd376b6f01522589c2f68b3c548390c23e79ce01 --- lams_learning/web/includes/javascript/learnerPage.js (.../learnerPage.js) (revision 735e5ff1a7439c3b86b3448b18e324ea20eef5d0) +++ lams_learning/web/includes/javascript/learnerPage.js (.../learnerPage.js) (revision cd376b6f01522589c2f68b3c548390c23e79ce01) @@ -21,24 +21,16 @@ let supportBarItems = $('.component-page-wrapper .component-sidebar #support-bar').removeClass('d-none') .find('#support-bar-items').empty(); $.each(result.support, function (activityIndex, activityData) { - let activityItem = $('
  • ').attr('role', 'presentation').addClass('support-bar-item progress-bar-item-openable'), - activityIconUrl = getActivityIconUrl(activityData), - activityIcon = null; - - if (activityIconUrl) { - activityIcon = $('').attr('src', LAMS_URL + activityIconUrl); - } else { - activityIcon = $(''); - } - + let activityItem = $('
  • ').attr('role', 'presentation') + .addClass('support-bar-item progress-bar-item-openable') + .prepend('').appendTo(supportBarItems); let activityLink = $('').text(activityData.name).attr({ 'target': '_blank', 'href': activityData.url, 'role': 'menuitem', 'title': 'Open completed activity' }); - activityItem.addClass('progress-bar-item-openable').append(activityIcon).append(activityLink) - .appendTo(supportBarItems); + activityItem.addClass('progress-bar-item-openable').append(activityLink); }); } @@ -47,30 +39,26 @@ $.each(result.activities, function (activityIndex, activityData) { let activityItem = $('
  • ').attr('role', 'presentation').appendTo(progressBarItems), activityName = !activityData.name && activityData.type === 'g' ? 'Gate' : activityData.name, - activityIconUrl = getActivityIconUrl(activityData), - activityIcon = null; - - if (activityIconUrl) { - activityIcon = $('').attr('src', LAMS_URL + activityIconUrl); - } else { activityIcon = $(''); - } if (activityData.status === 0) { - activityItem.addClass('progress-bar-item-current').append(activityIcon) - .append($('').text(activityName)); - if (!activityIconUrl) { + activityItem.addClass('progress-bar-item-current').text(activityName).prepend(activityIcon); + if (activityData.type === 'g') { + activityIcon.addClass('fa-hourglass-half'); + } else { activityIcon.addClass('fa-pen-to-square'); } } else if (activityData.status === 1) { completedActivityCount++; activityItem.addClass('progress-bar-item-complete').prepend(activityIcon); - if (!activityIconUrl) { + if (activityData.type === 'g') { + activityIcon.addClass('fa-hourglass-full'); + } else { activityIcon.addClass('fa-square-check'); } if (activityData.url) { - let activityLink = $('').text(activityName).attr({ + let activityLink = $('').text(activityName).attr({ 'target': '_blank', 'href': activityData.url, 'role': 'menuitem', @@ -79,9 +67,10 @@ activityItem.addClass('progress-bar-item-openable').append(activityLink); } } else { - activityItem.addClass('progress-bar-item-incomplete').append(activityIcon) - .append($('').text(activityName)); - if (!activityIconUrl) { + activityItem.addClass('progress-bar-item-incomplete').text(activityName).prepend(activityIcon); + if (activityData.type === 'g') { + activityIcon.addClass('fa-hourglass-start'); + } else { activityIcon.addClass('fa-square'); } } @@ -119,22 +108,4 @@ } }); } -} - -function getActivityIconUrl(activityData){ - if (activityData.iconURL){ - return activityData.iconURL; - } - if (activityData.type === 'g') { - return 'images/svg/gate' + (activityData.gateOpen ? 'Open' : 'Closed') + '.svg'; - } - if (activityData.isGrouping) { - return 'images/svg/grouping.svg'; - } - if (activityData.type === 'b') { - return 'images/svg/branchingStart.svg'; - } - if (activityData.type === 'o') { - return 'images/svg/optional.svg'; - } } \ No newline at end of file