Index: lams_tool_assessment/web/pages/learning/learning.jsp =================================================================== diff -u -r876e644c066e81c2721ffa085fd12f386e2f3bb6 -r81f928586161dd03042b6353f68c7d7b8279ccde --- lams_tool_assessment/web/pages/learning/learning.jsp (.../learning.jsp) (revision 876e644c066e81c2721ffa085fd12f386e2f3bb6) +++ lams_tool_assessment/web/pages/learning/learning.jsp (.../learning.jsp) (revision 81f928586161dd03042b6353f68c7d7b8279ccde) @@ -1,9 +1,9 @@ <%@ include file="/common/taglibs.jsp"%> - + <%-- param has higher level for request attribute --%> - + @@ -18,644 +18,618 @@ - - - <fmt:message key="label.learning.title" /> - <%@ include file="/common/header.jsp"%> + + + + + + + + - - - - - - - - - + //if totalSelected equals to question's maxMark - show button + if (isButtonEnabled) { + $("[type=button][name=submit-hedging-question" + questionIndex + "]").prop("disabled", "").removeClass("button-disabled"); + } else { + $("[type=button][name=submit-hedging-question" + questionIndex + "]").prop("disabled", "true").addClass("button-disabled"); + } + }).trigger("change"); + } - - - - - - - - + //init options sorting feature + if (${hasEditRight}) { + $(".ordering-question-type").each(function () { + new Sortable($(this)[0], { + animation: 150, + ghostClass: 'sortable-placeholder', + direction: 'vertical', + store: { + set: function (sortable) { + //update all sequenceIds in order to later save it as options' order + for (var i = 0; i < sortable.el.children.length; i++) { + var divContainingInput = sortable.el.children[i]; + var input = $("input", $(divContainingInput)); + input.val(i); + } + } + } + }); + }); + } - - - - - - - - - + initWebsocket('assessmentTimeLimit${sessionMap.assessment.contentId}', + ''.replace('http', 'ws') + + 'learningWebsocket?toolContentID=${sessionMap.assessment.contentId}', + function (e) { + // read JSON object + var input = JSON.parse(e.data); - - - <%-- codeStyles is a set, so each code style will be listed only once --%> - - - - - - - - - - - - - + if (input.clearTimer == true) { + // teacher stopped the timer, destroy it + $('#countdown').countdown('destroy').remove(); + } else { + // teacher updated the timer + var secondsLeft = +input.secondsLeft, + counterInitialised = $('#countdown').length > 0; - - function logLearnerInteractionEvent(eventType, qbToolQuestionUid, optionUid) { - $.ajax({ - url: '', - data: { - eventType : eventType, - qbToolQuestionUid : qbToolQuestionUid, - optionUid : optionUid - }, - cache : false, - type : 'post', - dataType : 'text' - }); - } - - - +
+ + + + + + + - - - - - - - - + + + - - - + + + + + - - - - - + + + + + - - - - - +
+ +
-
- -
+ + + - - - + + + - - - + + + - - - + - -
+ <%@ include file="parts/paging.jsp"%> -
- <%@ include file="parts/paging.jsp"%> -
+
+ <%@ include file="parts/allquestions.jsp"%> +
- <%@ include file="parts/allquestions.jsp"%> + <%@ include file="parts/paging.jsp"%> - <%@ include file="parts/paging.jsp"%> -
- - -
- - - -
-
- -
- - - \ No newline at end of file +
+ + + +
+
+ \ No newline at end of file