Index: lams_monitoring/web/timeLimit.jsp =================================================================== diff -u -r24878ff4c5287b8a15a2c992ae10616bab82c9e6 -rd6448910114beeaf0bf28ace95db98870dfdb80b --- lams_monitoring/web/timeLimit.jsp (.../timeLimit.jsp) (revision 24878ff4c5287b8a15a2c992ae10616bab82c9e6) +++ lams_monitoring/web/timeLimit.jsp (.../timeLimit.jsp) (revision d6448910114beeaf0bf28ace95db98870dfdb80b) @@ -5,36 +5,27 @@ color: #FF3333 !important; } - #time-limit-table th { - vertical-align: middle; + #time-limit-table .btn-success { + color: var(--bs-white); } - #time-limit-table td.centered { - text-align: center; - } - #time-limit-widget { /* The main widget sticks to right browser edge */ position: fixed; - top: 45px; + top: 100px; right: 0; /* Collapsed by default */ - width: 130px; + width: 145px; display: none; + z-index: 3; + transition: all 0s linear 0s; } #time-limit-widget .btn-success { float: none; } - #time-limit-widget .panel-heading a:after, #time-limit-widget .panel-heading a:after { - content: none; - } - - #time-limit-widget .panel-title a { - /* Underlining the link in title does not look nice*/ - text-decoration: none !important; - color: black; + #time-limit-widget .card-title { font-size: 20px; font-weight: normal; } @@ -52,10 +43,6 @@ display: inline-block; margin-left: 5px; } - - #time-limit-widget .time-limit-widget-individual-row { - border-top: thin solid #ddd; - } - + -
- - -
- - - +
+
+ + +
-
- - -
- - - -
-
- - - - - - - - - - - - - - - - - - - - - - -

-

-
-   - - -
- -
-
- -
-
- - - - - - - - - - -
-
-
-

-

-
- +
+ + + + + + + + + + + + + + + + + - - - - - - - - - + + + + + + + + - - - - - - + + + + + + + - - - - - - - - + + + + + + + + -

+

+
+   + + +
+ +
+
+ +
+
+ + + + + + + + + + +

+

+
+   - - -
- -
-
- -
-
- -
-
- - - - - - - - - - -
-
-
-
+
+ +
+
+ +
+
+ +
+
+ + + + + + + + + + +
-

-

-
-
- - -
-
+

+

+
+
+ + + + +
+
+ + + + + + + + + + + + + +
-
+
+
-
-
- - +
+ +
-
-
- -
+
-
- -
+
+ +
-
- -
+
+ +
-
-
+
+
-
\ No newline at end of file + +
+
+
+
\ No newline at end of file Fisheye: Tag d6448910114beeaf0bf28ace95db98870dfdb80b refers to a dead (removed) revision in file `lams_monitoring/web/timeLimit5.jsp'. Fisheye: No comparison available. Pass `N' to diff? Index: lams_tool_assessment/src/java/org/lamsfoundation/lams/tool/assessment/web/controller/TblMonitoringController.java =================================================================== diff -u -rf8f156c0f021d60857760ea60579a41e1380288c -rd6448910114beeaf0bf28ace95db98870dfdb80b --- lams_tool_assessment/src/java/org/lamsfoundation/lams/tool/assessment/web/controller/TblMonitoringController.java (.../TblMonitoringController.java) (revision f8f156c0f021d60857760ea60579a41e1380288c) +++ lams_tool_assessment/src/java/org/lamsfoundation/lams/tool/assessment/web/controller/TblMonitoringController.java (.../TblMonitoringController.java) (revision d6448910114beeaf0bf28ace95db98870dfdb80b) @@ -144,7 +144,7 @@ } request.setAttribute("questions", questionDtos); - return "pages/monitoring/parts/mcqStudentChoices5"; + return "pages/monitoring/parts/mcqStudentChoices"; } private List getAssessmentDtos(String[] toolContentIds, String[] activityTitles) { Index: lams_tool_assessment/web/includes/javascript/chart.js =================================================================== diff -u -r9ee2921bed79fea47120f0040b1a9a4f2cad7b55 -rd6448910114beeaf0bf28ace95db98870dfdb80b --- lams_tool_assessment/web/includes/javascript/chart.js (.../chart.js) (revision 9ee2921bed79fea47120f0040b1a9a4f2cad7b55) +++ lams_tool_assessment/web/includes/javascript/chart.js (.../chart.js) (revision d6448910114beeaf0bf28ace95db98870dfdb80b) @@ -1,17 +1,10 @@ -function drawCompletionCharts(toolContentId, animate) { +var GRAPH_COLORS = { + blue: 'rgba(1, 117, 226, 0.85)', + yellow: 'rgba(249, 248, 113, 0.85)', + green: 'rgba(0, 145, 74, 0.85)', + gray: '#6c757d' +}; - const source = new EventSource( WEB_APP_URL + 'monitoring/getCompletionChartsData.do?toolContentId=' + toolContentId); - - source.onmessage = function (event) { - if (!event.data) { - return; - } - var data = JSON.parse(decodeURIComponent(event.data)); - drawActivityCompletionChart(data, animate); - drawAnsweredQuestionsChart(data, animate); - } -} - function drawActivityCompletionChart(data, animate){ // prepare data for the chart let notStartedLearners = data.possibleLearners.filter(function (learner) { @@ -62,18 +55,15 @@ activityCompletionChart = new Chart(ctx, { type : 'doughnut', data : { - elements : { - arc : { - borderWidth : 0, - fontSize : 0, - } - }, datasets : [ { data : newData, - backgroundColor : [ 'rgba(5, 204, 214, 1)', - 'rgba(255, 195, 55, 1)', - 'rgba(253, 60, 165, 1)', - ] + backgroundColor : [ + GRAPH_COLORS.blue, + GRAPH_COLORS.yellow, + GRAPH_COLORS.green + ], + borderWidth : 1, + borderColor : COLORS.gray } ], labels : [ LABELS.ACTIVITY_COMPLETION_CHART_POSSIBLE_LEARNERS, LABELS.ACTIVITY_COMPLETION_CHART_STARTED_LEARNERS, @@ -89,13 +79,16 @@ title : { display: true, font : { - size : 15 + size : 18 }, text : LABELS.ACTIVITY_COMPLETION_CHART_TITLE }, legend : { position: 'bottom', labels : { + font : { + size: 16 + }, generateLabels : function(chart) { var data = chart.data; if (data.labels.length && data.datasets.length) { @@ -108,7 +101,7 @@ text: label + ": " + value, fillStyle: style.backgroundColor, strokeStyle: style.borderColor, - lineWidth: style.borderWidth, + lineWidth: 0, hidden: isNaN(value) || meta.data[i].hidden, // Extra data used for toggling the @@ -135,6 +128,7 @@ function drawAnsweredQuestionsChart(data, animate){ if (!data.answeredQuestionsByUsers) { + $('#answered-questions-chart-none').show(); return; } @@ -145,6 +139,9 @@ // no sessions yet, so no chart placeholder return; } + + $('#answered-questions-chart-none').hide(); + // store current data for custom tooltip chartPlaceholder.data('tooltip-input', data.answeredQuestionsByUsers); chartPlaceholder.data('useGroupsAsNames', useGroupsAsNames); @@ -168,8 +165,8 @@ data : { datasets : [ { data : Object.values(data.answeredQuestionsByUsersCount), - backgroundColor : 'rgba(255, 195, 55, 1)' - }], + backgroundColor : GRAPH_COLORS.green + } ], labels : Object.keys(data.answeredQuestionsByUsersCount), }, options : { @@ -178,22 +175,22 @@ }, interaction : { mode : 'index', - intersect : suggestedBarMax <= 20 + intersect : suggestedBarMax <= 21 }, scales : { x : { title: { - display: true, + display : true, text: LABELS.ANSWERED_QUESTIONS_CHART_X_AXIS, font : { - size : 14 + size : 16 } } }, y : { beginAtZero : true, - suggestedMax : suggestedBarMax, + suggestedMax : suggestedBarMax, ticks : { stepSize : 1, maxTicksLimit : 5, @@ -202,17 +199,17 @@ display : true, text : useGroupsAsNames ? LABELS.ANSWERED_QUESTIONS_CHART_Y_AXIS_GROUPS : LABELS.ANSWERED_QUESTIONS_CHART_Y_AXIS_STUDENTS, font : { - size : 14 + size : 16 } } } }, plugins : { title : { - display: true, + display : true, font : { - size : 15, - lineHeight: 3 + size : 18, + lineHeight: 2 }, text : useGroupsAsNames ? LABELS.ANSWERED_QUESTIONS_CHART_TITLE_GROUPS : LABELS.ANSWERED_QUESTIONS_CHART_TITLE @@ -241,7 +238,6 @@ // if it should be hidden, there is nothing to do return; } - // iterate over learners, get their names and portraits var counter = 0, data = chartPlaceholder.data('tooltip-input'), @@ -257,36 +253,37 @@ var tooltipEl = $('
').addClass(tooltipClassName) .appendTo(document.body) .css({ - 'opacity' : 1, - 'position' :'absolute', - 'pointerEvents' : 'none', - 'background-color' : 'white', - 'padding' : '15px', - 'border' : 'thin solid #ddd', - 'border-radius' : '25px' + 'opacity': 1, + 'position': 'absolute', + 'pointerEvents': 'none', + 'background-color': 'white', + 'padding': '15px', + 'border': 'thin solid #ddd', + 'border-radius': '25px' }); - $(users).each(function(){ + + $(users).each(function () { var portraitDiv = $(definePortrait(this.portraitUuid, this.id, STYLE_SMALL, true, LAMS_URL)).css({ - 'vertical-align' : 'middle' + 'vertical-align': 'middle' }), userDiv = $('
').append(portraitDiv).appendTo(tooltipEl).css({ - 'padding-bottom' : '5px' + 'padding-bottom': '5px' }); $('').text(useGroupsAsNames ? this.group + ' (' + this.name + ')' : (this.name + (isGrouped && this.group ? ' (' + this.group + ') ' : ''))) .appendTo(userDiv).css({ - 'padding-left' : '10px' + 'padding-left': '10px' }); if (counter === 15) { // do not display more than 15 learners if (users.length > 16) { $('
').text('...').appendTo(tooltipEl).css({ - 'font-weight' : 'bold', - 'font-size' : '20px', - 'text-align' : 'center' + 'font-weight': 'bold', + 'font-size': '20px', + 'text-align': 'center' }); } return false; @@ -296,12 +293,12 @@ // do not add padding for the last element as the tooltip does not look symmetric tooltipEl.children(':last-child').css({ - 'padding-bottom' : '0' + 'padding-bottom': '0' }); var position = this.chart.canvas.getBoundingClientRect(); tooltipEl.css({ - 'left' : Math.max(25, position.left + window.pageXOffset + tooltipModel.caretX - tooltipEl.width() - 60) + 'px', - 'top' : Math.max(10, position.top + window.pageYOffset + tooltipModel.caretY - tooltipEl.height()/2) + 'px', + 'left' : Math.max(120, position.left + window.pageXOffset + tooltipModel.caretX - tooltipEl.width() - 60) + 'px', + 'top' : Math.max(10, position.top + window.pageYOffset + tooltipModel.caretY - tooltipEl.height() / 2) + 'px', }); } \ No newline at end of file Fisheye: Tag d6448910114beeaf0bf28ace95db98870dfdb80b refers to a dead (removed) revision in file `lams_tool_assessment/web/includes/javascript/chart5.js'. Fisheye: No comparison available. Pass `N' to diff? Index: lams_tool_assessment/web/pages/monitoring/parts/discloseAnswers.jsp =================================================================== diff -u -rcfd463431d2171b40403dcff2508408e72685c0e -rd6448910114beeaf0bf28ace95db98870dfdb80b --- lams_tool_assessment/web/pages/monitoring/parts/discloseAnswers.jsp (.../discloseAnswers.jsp) (revision cfd463431d2171b40403dcff2508408e72685c0e) +++ lams_tool_assessment/web/pages/monitoring/parts/discloseAnswers.jsp (.../discloseAnswers.jsp) (revision d6448910114beeaf0bf28ace95db98870dfdb80b) @@ -7,11 +7,12 @@ // show details button needs to be set in the page which included this page resultsPane.load("?embedded=true&sessionMapID=${sessionMapID}&showQuestionDetailsButton=" + showQuestionDetailsButton + "&toolContentID=" + toolContentId, function(){ - var assessmentQuestionsPane = $(this).closest('.assessment-questions-pane'), + var assessmentQuestionsPane = $(this).closest('.assessment-questions-pane').length + ? $(this).closest('.assessment-questions-pane') : $('.assessment-questions-pane-ira'), // are any correct/groups buttons clickable? discloseAllCorrectEnabled = false, discloseAllGroupsEnabled = false; - + // disclose correct/group answers on click $('.disclose-button-group .btn', assessmentQuestionsPane).not('[disabled]').each(function(){ let button = $(this), @@ -24,19 +25,18 @@ button.click(function(event) { - if (!confirm(isCorrectButton ? "" - : "")) { - return; - } - - // check if correct answers are disclosed before groups' answers - if (isCorrectButton && - !button.closest('.disclose-button-group').find('.disclose-groups-button').is('[disabled]') && - !confirm("")) { - return; - } - - discloseAnswers(button, resultsPane, true); + showConfirm(isCorrectButton ? "" + : "", function(){ + // check if correct answers are disclosed before groups' answers + if (isCorrectButton && + !button.closest('.disclose-button-group').find('.disclose-groups-button').is('[disabled]')) { + showConfirm("", function(){ + discloseAnswers(button, resultsPane, true); + }); + } else { + discloseAnswers(button, resultsPane, true); + } + }); }); }); @@ -47,23 +47,25 @@ // do not add a handler twice if (!isRefresh) { allCorrectButton.click(function(){ - if (!confirm("")) { - return; - } - - // check if correct answers are disclosed before groups' answers - if (!$('.disclose-all-groups-button', assessmentQuestionsPane).is('[disabled]') && - !confirm("")) { - return; - } - - let nonDisclosedQuestions = $('.disclose-correct-button', assessmentQuestionsPane).not('[disabled]'), - lastQuestionUid = nonDisclosedQuestions.last().closest('.disclose-button-group').attr('questionUid'); - nonDisclosedQuestions.each(function() { - let isLast = lastQuestionUid == $(this).closest('.disclose-button-group').attr('questionUid'); - discloseAnswers($(this), resultsPane, isLast); + showConfirm("", function(){ + // check if correct answers are disclosed before groups' answers + let discloseFunction = function(){ + let nonDisclosedQuestions = $('.disclose-correct-button', assessmentQuestionsPane).not('[disabled]'), + lastQuestionUid = nonDisclosedQuestions.last().closest('.disclose-button-group').attr('questionUid'); + nonDisclosedQuestions.each(function() { + let isLast = lastQuestionUid == $(this).closest('.disclose-button-group').attr('questionUid'); + discloseAnswers($(this), resultsPane, isLast); + }); + disabledAndCheckButton(allCorrectButton); + }; + + if (!$('.disclose-all-groups-button', assessmentQuestionsPane).is('[disabled]')) { + showConfirm("", discloseFunction); + return; + } + + discloseFunction(); }); - disabledAndCheckButton(allCorrectButton); }); } } else { @@ -75,17 +77,15 @@ // do not add a handler twice if (!isRefresh) { allGroupsButton.click(function(){ - if (!confirm("")) { - return; - } - - let nonDisclosedQuestions = $('.disclose-groups-button', assessmentQuestionsPane).not('[disabled]'), - lastQuestionUid = nonDisclosedQuestions.last().closest('.disclose-button-group').attr('questionUid'); - nonDisclosedQuestions.each(function() { - let isLast = lastQuestionUid == $(this).closest('.disclose-button-group').attr('questionUid'); - discloseAnswers($(this), resultsPane, isLast); + showConfirm("", function(){ + let nonDisclosedQuestions = $('.disclose-groups-button', assessmentQuestionsPane).not('[disabled]'), + lastQuestionUid = nonDisclosedQuestions.last().closest('.disclose-button-group').attr('questionUid'); + nonDisclosedQuestions.each(function() { + let isLast = lastQuestionUid == $(this).closest('.disclose-button-group').attr('questionUid'); + discloseAnswers($(this), resultsPane, isLast); + }); + disabledAndCheckButton(allGroupsButton); }); - disabledAndCheckButton(allGroupsButton); }); } } else { @@ -97,7 +97,6 @@ function discloseAnswers(button, resultsPane, isLast) { let isCorrectButton = button.hasClass('disclose-correct-button'), toolContentId = resultsPane.data('toolContentId'); - $.ajax({ 'url' : 'monitoring/' + (isCorrectButton ? 'discloseCorrectAnswers' : 'discloseGroupsAnswers') @@ -116,6 +115,6 @@ } function disabledAndCheckButton(button){ - button.attr('disabled', true).html(' ' + button.text()); + button.attr('disabled', true).html(' ' + button.text()); } \ No newline at end of file Fisheye: Tag d6448910114beeaf0bf28ace95db98870dfdb80b refers to a dead (removed) revision in file `lams_tool_assessment/web/pages/monitoring/parts/discloseAnswers5.jsp'. Fisheye: No comparison available. Pass `N' to diff? Index: lams_tool_assessment/web/pages/monitoring/parts/mcqStudentChoices.jsp =================================================================== diff -u -r02c6f864bf967cdf454aac4db7d21e8108411350 -rd6448910114beeaf0bf28ace95db98870dfdb80b --- lams_tool_assessment/web/pages/monitoring/parts/mcqStudentChoices.jsp (.../mcqStudentChoices.jsp) (revision 02c6f864bf967cdf454aac4db7d21e8108411350) +++ lams_tool_assessment/web/pages/monitoring/parts/mcqStudentChoices.jsp (.../mcqStudentChoices.jsp) (revision d6448910114beeaf0bf28ace95db98870dfdb80b) @@ -1,15 +1,21 @@ <%@ include file="/common/taglibs.jsp"%> + + + + -
-
-
-
-
- +
+
+
- + @@ -24,15 +30,48 @@ - - @@ -45,65 +84,51 @@
- + + + + + + + + + + + + + + + + + + + + + + + + + + + ${i.index+1} - % + + fw-bolder text-success fs-5" title=" + + " data-toggle="tooltip" data-placement="top" + > + + - + % +
-
-
-
- - -