Index: lams_tool_doku/conf/language/lams/ApplicationResources.properties
===================================================================
diff -u -rce9fa36f0e318509e9d28299b844df9475e16e83 -r667f6e1119139668f3ebfebd63674d4fe95bc88a
--- lams_tool_doku/conf/language/lams/ApplicationResources.properties (.../ApplicationResources.properties) (revision ce9fa36f0e318509e9d28299b844df9475e16e83)
+++ lams_tool_doku/conf/language/lams/ApplicationResources.properties (.../ApplicationResources.properties) (revision 667f6e1119139668f3ebfebd63674d4fe95bc88a)
@@ -183,4 +183,12 @@
label.monitoring.ai.review.all = AI review all
label.monitoring.ai.review.tooltip = Have AI compare the given task and students' submissions.
label.monitoring.ai.review.error = Error while requesting AI review
-label.monitoring.ai.review.learning.outcomes = AI learning outcomes
\ No newline at end of file
+label.monitoring.ai.review.learning.outcomes = AI learning outcomes
+label.monitoring.ai.review.comparison = AI comparison
+label.monitoring.ai.review.criteria.1 = correctness of the answer
+label.monitoring.ai.review.criteria.2 = content knowledge
+label.monitoring.ai.review.criteria.3 = academic discourse skills
+label.monitoring.ai.review.header.score = Score
+label.monitoring.ai.review.header.learning.outcomes = Learning outcomes
+label.monitoring.ai.review.header.good = Highlights
+label.monitoring.ai.review.header.bad = Areas for improvement
\ No newline at end of file
Index: lams_tool_doku/web/pages/monitoring/summary.jsp
===================================================================
diff -u -rce9fa36f0e318509e9d28299b844df9475e16e83 -r667f6e1119139668f3ebfebd63674d4fe95bc88a
--- lams_tool_doku/web/pages/monitoring/summary.jsp (.../summary.jsp) (revision ce9fa36f0e318509e9d28299b844df9475e16e83)
+++ lams_tool_doku/web/pages/monitoring/summary.jsp (.../summary.jsp) (revision 667f6e1119139668f3ebfebd63674d4fe95bc88a)
@@ -114,6 +114,7 @@
line-height: 1.7;
}
+
.doku-monitoring-summary .ai-review-content {
padding: 1rem;
margin: 1rem;
@@ -124,6 +125,24 @@
.doku-monitoring-summary #ai-review-learning-outcomes {
margin-bottom: 1rem;
}
+
+ .doku-monitoring-summary #ai-review-comparison table th:first-child {
+ min-width: 12rem;
+ }
+
+ .doku-monitoring-summary #ai-review-comparison table th[scope="col"] {
+ vertical-align: top;
+ }
+
+ .doku-monitoring-summary #ai-review-comparison table th[scope="row"] {
+ text-align: left;
+ font-weight: bold;
+ }
+
+ .doku-monitoring-summary #ai-review-comparison table td {
+ text-align: center;
+ }
+
-
- function aiReview(toolSessionId) {
- let container = $('#ai-review-container-' + toolSessionId),
- button = container.children('button').prop('disabled', true),
- header = $('.ai-review-header', container)
- .removeClass('hidden')
- .append(''),
- content = $('.ai-review-content', container).addClass('hidden').empty();
- container.children('.ai-review-button-clearfix').remove();
+
+
+
- getAiLearningOutcomes(function() {
- $.ajax({
- 'url': '',
- 'type': 'get',
- 'dataType': 'json',
- 'cache': 'false',
- 'data': {
- 'toolSessionId': toolSessionId
- },
- success: function (response) {
- let task = "";
- if (response.instructions) {
- task += response.instructions;
- }
- if (response.description) {
- task += response.description;
- }
- $.ajax({
- 'url': LAMS_URL + 'ai/general/custom.do',
- 'type': 'post',
- 'dataType': 'text',
- 'cache': 'false',
- 'data': {
- 'promptKey': 'writing.task.review.prompt.criteria',
- 'promptParameters': [task, response.content,
- savedAiLearningOutcomes ? savedAiLearningOutcomes : "No learning outcomes provided, skip this step"]
- },
- success: function (response) {
- content.html(response);
- $.ajax({
- 'url': '',
- 'type': 'post',
- 'dataType': 'text',
- 'cache': 'false',
- 'data': {
- 'toolSessionId': toolSessionId,
- 'review': response
- }
- });
- },
- error: function () {
- content.text('');
- },
- complete: function () {
- content.removeClass('hidden');
- button.prop('disabled', false);
- header.children('.ai-review-loading-icon').remove();
- }
- });
- },
- error: function () {
- content.removeClass('hidden')
- .text('')
- button.prop('disabled', false);
- header.children('.ai-review-loading-icon').remove();
- }
- });
- });
- }
-
- function aiReviewAll() {
- let button = $('#ai-review-all-button').prop('disabled', true);
- // re-enable review all button after 10 seconds
- setTimeout(function () {
- button.prop('disabled', false);
- }, 10000);
-
- getAiLearningOutcomes(function() {
- $('.ai-review-container').each(function () {
- aiReview($(this).data('session-id'));
- });
- });
- }
-
- function getAiLearningOutcomes(callback){
- // Always start with fetching learning outcomes.
- // If there are no learning outcomes yet, AI generates them based on the lesson and activity descriptions.
- // If they are present, they are taken from the textarea. The textarea can be edited by the monitor.
- let learningOutcomesTextarea = $('#ai-review-learning-outcomes'),
- learningOutcomes = learningOutcomesTextarea.val().trim();
- if (learningOutcomes) {
-
- if (learningOutcomes != savedAiLearningOutcomes) {
- if (savedAiLearningOutcomes !== null) {
- $.ajax({
- 'url': '',
- 'type': 'post',
- 'dataType': 'text',
- 'cache': 'false',
- 'data': {
- 'toolContentId': ${sessionMap.toolContentID},
- 'learningOutcomes': learningOutcomes
- }
- });
- }
- savedAiLearningOutcomes = learningOutcomes;
- }
- if (callback) {
- callback();
- }
- return;
- }
- let header = $('#ai-review-learning-outcomes-header').removeClass('hidden')
- .append('');
-
- $.ajax({
- 'url': '',
- 'type': 'get',
- 'dataType': 'json',
- 'cache': 'false',
- 'data': {
- 'toolContentId': ${sessionMap.toolContentID}
- },
- success: function (response) {
- let task = "";
- if (response.instructions) {
- task += response.instructions;
- }
- if (response.description) {
- task += response.description;
- }
- $.ajax({
- 'url': LAMS_URL + 'ai/general/custom.do',
- 'type': 'post',
- 'dataType': 'text',
- 'cache': 'false',
- 'data': {
- 'promptKey' : 'writing.task.review.prompt.learning.outcomes',
- 'promptParameters' : [task,
- // lesson description is optional
- response.lessonDescription ? response.lessonDescription : "no lesson description provided"]
- },
- success: function (response) {
- learningOutcomes = response.trim();
- learningOutcomesTextarea.val(learningOutcomes);
- savedAiLearningOutcomes = learningOutcomes;
-
- $.ajax({
- 'url': '',
- 'type': 'post',
- 'dataType': 'text',
- 'cache': 'false',
- 'data': {
- 'toolContentId': ${sessionMap.toolContentID},
- 'learningOutcomes': savedAiLearningOutcomes
- },
- complete: function () {
- if (callback) {
- callback();
- }
- }
- });
-
- },
- error: function () {
- learningOutcomesTextarea.text('');
- },
- complete: function (){
- learningOutcomesTextarea.removeClass('hidden');
- header.children('.ai-review-loading-icon').remove();
- }
- });
-
- },
- error: function () {
- learningOutcomesTextarea.removeClass('hidden')
- .text('');
- header.children('.ai-review-loading-icon').remove();
- }
- });
- }
-
-
@@ -824,6 +678,11 @@
+
+
+
@@ -838,7 +697,8 @@
- ${groupSummary.sessionName}
+
+ ${groupSummary.sessionName}