[minimark] 4 new revisions pushed by lucio.benfante on 2009-09-14 08:44 GMT

0 views
Skip to first unread message

codesite...@google.com

unread,
Sep 14, 2009, 4:48:48 AM9/14/09
to minimark...@googlegroups.com
4 new revisions:

Revision: 4c0dd3629d
Author: lucio.benfante <lucio dot benfante at gmail dot com>
Date: Fri Sep 11 08:01:33 2009
Log: Created fix-issue-2 branch
http://code.google.com/p/minimark/source/detail?r=4c0dd3629d

Revision: 1ad5443694
Author: lucio.benfante <lucio dot benfante at gmail dot com>
Date: Mon Sep 14 01:38:33 2009
Log: Added duplicated warning in the status tool bar. Fixes issue 2.
http://code.google.com/p/minimark/source/detail?r=1ad5443694

Revision: da02f505a5
Author: lucio.benfante <lucio dot benfante at gmail dot com>
Date: Mon Sep 14 01:42:39 2009
Log: Merged changes from branch fix-issue-2. Fixes issue 2.
http://code.google.com/p/minimark/source/detail?r=da02f505a5

Revision: 2a60788191
Author: lucio.benfante <lucio dot benfante at gmail dot com>
Date: Mon Sep 14 01:43:40 2009
Log: Closed branch fix-issue-2
http://code.google.com/p/minimark/source/detail?r=2a60788191

==============================================================================
Revision: 4c0dd3629d
Author: lucio.benfante <lucio dot benfante at gmail dot com>
Date: Fri Sep 11 08:01:33 2009
Log: Created fix-issue-2 branch
http://code.google.com/p/minimark/source/detail?r=4c0dd3629d

==============================================================================
Revision: 1ad5443694
Author: lucio.benfante <lucio dot benfante at gmail dot com>
Date: Mon Sep 14 01:38:33 2009
Log: Added duplicated warning in the status tool bar. Fixes issue 2.
http://code.google.com/p/minimark/source/detail?r=1ad5443694

Modified:
/minimark/src/main/java/com/benfante/minimark/ajax/QuestionABo.java
/minimark/src/main/java/com/benfante/minimark/po/Assessment.java
/minimark/src/main/webapp/WEB-INF/jsp/assessment/questions.jsp
/minimark/src/main/webapp/WEB-INF/messages.properties
/minimark/src/main/webapp/WEB-INF/messages_en.properties
/minimark/src/main/webapp/WEB-INF/messages_it.properties
/minimark/src/main/webapp/stylesheets/custom.css

=======================================
--- /minimark/src/main/java/com/benfante/minimark/ajax/QuestionABo.java Fri
Sep 4 00:37:53 2009
+++ /minimark/src/main/java/com/benfante/minimark/ajax/QuestionABo.java Mon
Sep 14 01:38:33 2009
@@ -128,6 +128,11 @@
Util.setValue("ClosedMultiQuestionsCount",
assessment.getCountClosedMultiQuestions(), false);
Util.setValue("TotalQuestionsCount",
assessment.getCountAllQuestions(), false);
Util.setValue("TotalWeightSum",
assessment.getQuestionsTotalWeight().toString(), false);
+ if (assessment.getContainsDuplicatedQuestions()) {
+
Util.setStyle("duplicatedQuestionsWarning", "display", "block");
+ } else {
+
Util.setStyle("duplicatedQuestionsWarning", "display", "none");
+ }
} catch (Exception ex) {
Util.setValue("OpenShortQuestionsCount", "E", false);
Util.setValue("OpenLongQuestionsCount", "E", false);
@@ -135,6 +140,7 @@
Util.setValue("ClosedMultiQuestionsCount", "E", false);
Util.setValue("TotalQuestionsCount", "E", false);
Util.setValue("TotalWeightSum", "E", false);
+
Util.setStyle("duplicatedQuestionsWarning", "display", "none");
}
}
});
=======================================
--- /minimark/src/main/java/com/benfante/minimark/po/Assessment.java Fri
Sep 4 00:37:53 2009
+++ /minimark/src/main/java/com/benfante/minimark/po/Assessment.java Mon
Sep 14 01:38:33 2009
@@ -353,10 +353,27 @@
double result = 0;
for (AssessmentQuestion assessmentQuestion : getQuestions()) {
final Question question = assessmentQuestion.getQuestion();
- result += question.getWeight().doubleValue();
+ if (question.getWeight() != null) {
+ result += question.getWeight().doubleValue();
+ }
}
final BigDecimal bdResult = BigDecimal.valueOf(result);
bdResult.setScale(2, RoundingMode.HALF_EVEN);
return bdResult;
}
-}
+
+ @Transient
+ public boolean getContainsDuplicatedQuestions() {
+ boolean result = false;
+ for (int i = 0; i < getQuestions().size(); i++) {
+ Question q1 = getQuestions().get(i).getQuestion();
+ for (int j = i+1; j < getQuestions().size(); j++) {
+ Question q2 = getQuestions().get(j).getQuestion();
+ if (q1.equals(q2)) {
+ return true;
+ }
+ }
+ }
+ return result;
+ }
+}
=======================================
--- /minimark/src/main/webapp/WEB-INF/jsp/assessment/questions.jsp Fri Sep
4 00:37:53 2009
+++ /minimark/src/main/webapp/WEB-INF/jsp/assessment/questions.jsp Mon Sep
14 01:38:33 2009
@@ -90,6 +90,7 @@
</div>
</div>
<div id="statusBar_right">
+ <div id="duplicatedQuestionsWarning" class="statusBar_warning"
<c:if test="${!assessment.containsDuplicatedQuestions}">style="display:
none;"</c:if>><spring:message code="status.warning.duplicated"
text="?status.warning.duplicated?"/></div>
</div>
</div>
</div>
=======================================
--- /minimark/src/main/webapp/WEB-INF/messages.properties Thu Sep 10
08:19:12 2009
+++ /minimark/src/main/webapp/WEB-INF/messages.properties Mon Sep 14
01:38:33 2009
@@ -212,3 +212,4 @@
help.monitoringUsersField=The comma-separated list of usernames of the
users that can monitor this assessment. For example: mario.rossi,john.doe
YourProfile=Your profile
IntentionallyLeftBlank=Intentionally left blank.
+status.warning.duplicated=DUP
=======================================
--- /minimark/src/main/webapp/WEB-INF/messages_en.properties Thu Sep 10
08:19:12 2009
+++ /minimark/src/main/webapp/WEB-INF/messages_en.properties Mon Sep 14
01:38:33 2009
@@ -213,3 +213,4 @@
help.monitoringUsersField=The comma-separated list of usernames of the
users that can monitor this assessment. For example: mario.rossi,john.doe
YourProfile=Your profile
IntentionallyLeftBlank=Intentionally left blank.
+status.warning.duplicated=DUP
=======================================
--- /minimark/src/main/webapp/WEB-INF/messages_it.properties Thu Sep 10
08:19:12 2009
+++ /minimark/src/main/webapp/WEB-INF/messages_it.properties Mon Sep 14
01:38:33 2009
@@ -213,3 +213,4 @@
help.monitoringUsersField=La lista dei nome-utente degli utenti che
possono monitorare questo compito. Ogni elemento \u00E8 separato da
virgole. Ad esempio: mario.rossi,john.doe
YourProfile=Il tuo profilo
IntentionallyLeftBlank=Lasciata bianca intenzionalmente.
+status.warning.duplicated=DUP
=======================================
--- /minimark/src/main/webapp/stylesheets/custom.css Mon Sep 7 21:04:55
2009
+++ /minimark/src/main/webapp/stylesheets/custom.css Mon Sep 14 01:38:33
2009
@@ -537,6 +537,16 @@
margin-right: 2px;
height: 25px;
}
+
+.statusBar_warning {
+ color: gray;
+ font-weight: bolder;
+ background-color: #fff900;
+ font-size: 12px;
+ font-family: monospace;
+ margin: 2px 2px;
+ padding: 0 2px;
+}

/* Status bar end */


==============================================================================
Revision: da02f505a5
Author: lucio.benfante <lucio dot benfante at gmail dot com>
Date: Mon Sep 14 01:42:39 2009
Log: Merged changes from branch fix-issue-2. Fixes issue 2.
http://code.google.com/p/minimark/source/detail?r=da02f505a5

==============================================================================
Revision: 2a60788191
Author: lucio.benfante <lucio dot benfante at gmail dot com>
Date: Mon Sep 14 01:43:40 2009
Log: Closed branch fix-issue-2
http://code.google.com/p/minimark/source/detail?r=2a60788191


Reply all
Reply to author
Forward
0 new messages