Skip to content

Commit

Permalink
SAK-44723: SAMIGO - Rationale is hardcoded (sakaiproject#8852)
Browse files Browse the repository at this point in the history
  • Loading branch information
jesusmmp authored Dec 3, 2020
1 parent 868759b commit 6d8ed0f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ true_msg=S\u00ed
false_msg=No
ans_key=Respuesta
model=Modelo de respuesta corta\:
rationale=Desarrollar\:
rationale=Razonamiento\:
no_histogram_for_random=No existen estad\u00edsticas para las preguntas generadas al azar
all_sections=Todo el sitio
all_parts=Todas las partes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,9 @@ public class QuestionScoreListener implements ActionListener,
// private static EvaluationListenerUtil util;
private static BeanSort bs;

private static final String MSG_BUNDLE = "org.sakaiproject.tool.assessment.bundle.EvaluationMessages";
private static final ResourceLoader rb = new ResourceLoader(MSG_BUNDLE);
private static final String noAnswer = ContextUtil.getLocalizedString(MSG_BUNDLE, "no_answer");
private static final String noneOfTheAbove = ContextUtil.getLocalizedString(MSG_BUNDLE, "none_above");
private static final ResourceLoader evaluationMessages = new ResourceLoader("org.sakaiproject.tool.assessment.bundle.EvaluationMessages");
private static final String noAnswer = evaluationMessages.getString("no_answer");
private static final String noneOfTheAbove = evaluationMessages.getString("none_above");

private RubricsService rubricsService = (RubricsService) SpringBeanLocator.getInstance().getBean("org.sakaiproject.rubrics.logic.RubricsService");

Expand All @@ -125,7 +124,7 @@ public void processAction(ActionEvent event)
.lookupBean("questionScores");

// Reset the search field
String defaultSearchString = ContextUtil.getLocalizedString(MSG_BUNDLE, "search_default_student_search_string");
String defaultSearchString = evaluationMessages.getString("search_default_student_search_string");
bean.setSearchString(defaultSearchString);

// we probably want to change the poster to be consistent
Expand Down Expand Up @@ -653,10 +652,10 @@ else if (bean.getTypeId().equals("14")) {//gopalrc - EMI

if ("4".equals(bean.getTypeId())) {
if ("true".equals(answerText)) {
answerText = rb.getString("true_msg");
answerText = evaluationMessages.getString("true_msg");
}
else if ("false".equals(answerText)) {
answerText = rb.getString("false_msg");
answerText = evaluationMessages.getString("false_msg");
}
}

Expand Down Expand Up @@ -720,7 +719,7 @@ else if ("false".equals(answerText)) {
else {
if (gdata.getRationale() != null
&& !gdata.getRationale().trim().equals(""))
rationale = "\nRationale: " + gdata.getRationale();
rationale = "\n" + evaluationMessages.getString("rationale") + " " + gdata.getRationale();
}
// Huong's temp commandout
// answerText = answerText.replaceAll("<.*?>", "");
Expand Down Expand Up @@ -762,8 +761,8 @@ else if ("false".equals(answerText)) {
*/

//SAM-755-"checkmark" indicates right, add "X" to indicate wrong
String correct = ContextUtil.getLocalizedString(MSG_BUNDLE, "alt_correct");
String incorrect = ContextUtil.getLocalizedString(MSG_BUNDLE, "alt_incorrect");
String correct = evaluationMessages.getString("alt_correct");
String incorrect = evaluationMessages.getString("alt_incorrect");
String checkmarkGif = String.format("<span title=\"%s\" class=\"icon-sakai--check feedBackCheck\"></span>", correct);
String crossmarkGif = String.format("<span title=\"%s\" class=\"icon-sakai--delete feedBackCross\"></span>", incorrect);
if (gdataAnswer != null) {
Expand Down

0 comments on commit 6d8ed0f

Please sign in to comment.