Skip to content

Commit

Permalink
SAK-40960 Solved navigation problem previewing submission
Browse files Browse the repository at this point in the history
Also removed unused property strings and fixed list display.
  • Loading branch information
bgarciaentornos authored and Miguel Pellicer committed Dec 10, 2018
1 parent 7bb0d78 commit b12b419
Show file tree
Hide file tree
Showing 14 changed files with 13 additions and 20 deletions.
1 change: 0 additions & 1 deletion assignment/bundles/resources/assignment.properties
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,6 @@ group.list.summary = Table contains list of groups. First will contain checkbox
group.list.descr = Description

java.alert.youchoosegroup = You need to choose at least one group.
java.alert.noGroupedAssignmentIntoGB=You cannot add assignment with group access into Gradebook.

nostudent = There is no student in the site.

Expand Down
1 change: 0 additions & 1 deletion assignment/bundles/resources/assignment_ca.properties
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,6 @@ group.list.summary=La taula cont\u00e9 una llista de grups. La primera columna c
group.list.descr=Descripci\u00f3

java.alert.youchoosegroup=Heu de seleccionar almenys un grup.
java.alert.noGroupedAssignmentIntoGB=No pot afegir una activitat amb acc\u00e9s de grup dins del Llibre de qualificacions.

nostudent=No hi ha estudiants a l'espai

Expand Down
1 change: 0 additions & 1 deletion assignment/bundles/resources/assignment_es.properties
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,6 @@ group.list.summary=Lista de grupos. La primera columna contiene casillas de sele
group.list.descr=Descripci\u00f3n

java.alert.youchoosegroup=Debe escoger al menos un grupo.
java.alert.noGroupedAssignmentIntoGB=No puede a\u00f1adir esta tarea con acceso de grupo a Calificaciones

nostudent=No hay estudiantes asignados a este sitio

Expand Down
1 change: 0 additions & 1 deletion assignment/bundles/resources/assignment_eu.properties
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,6 @@ group.list.summary=Taldeen zerrenda. Lehenengo zutabean, aukeratzeko laukitxoak
group.list.descr=Azalpena

java.alert.youchoosegroup=Talde bat hautatu behar duzu, gutxienez.
java.alert.noGroupedAssignmentIntoGB=Taldeentzat den zeregin bat ezin duzu Ebaluazio-liburura gehitu.

nostudent=Ez dago ikasle esleiturik gunean

Expand Down
1 change: 0 additions & 1 deletion assignment/bundles/resources/assignment_fa_IR.properties
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,6 @@ group.list.summary=\u062c\u062f\u0648\u0644 \u0634\u0627\u0645\u0644 \u0644\u06c
group.list.descr=\u062a\u0648\u0636\u06cc\u062d\u0627\u062a

java.alert.youchoosegroup=\u0628\u0627\u06cc\u062f \u062d\u062f\u0627\u0642\u0644 \u06cc\u06a9 \u06af\u0631\u0648\u0647 \u0631\u0627 \u0627\u0646\u062a\u062e\u0627\u0628 \u06a9\u0646\u06cc\u062f.
java.alert.noGroupedAssignmentIntoGB=\u0634\u0645\u0627 \u0646\u0645\u06cc\u062a\u0648\u0627\u0646\u06cc\u062f \u062a\u06a9\u0644\u06cc\u0641 \u0628\u0627 \u062f\u0633\u062a\u0631\u0633\u06cc \u06af\u0631\u0648\u0647 \u0628\u0647 \u062f\u0641\u062a\u0631 \u0646\u0645\u0631\u0647 \u0627\u06cc\u062c\u0627\u062f \u06a9\u0646\u06cc\u062f.

nostudent=\u0647\u06cc\u0686 \u062f\u0627\u0646\u0634 \u0622\u0645\u0648\u0632\u06cc \u062f\u0631 \u0627\u06cc\u0646 \u0633\u0627\u06cc\u062a \u0648\u062c\u0648\u062f \u0646\u062f\u0627\u0631\u062f.

Expand Down
1 change: 0 additions & 1 deletion assignment/bundles/resources/assignment_fr_FR.properties
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,6 @@ group.list.summary=La table contient la liste des groupes. La premi\u00e8re colo
group.list.descr=Description \:

java.alert.youchoosegroup=Vous devez choisir au moins un groupe.
java.alert.noGroupedAssignmentIntoGB=Vous ne pouvez pas ajouter un devoir avec un acc\u00e8s restreint \u00e0 un groupe dans le bulletin de notes.

nostudent=Aucun d''\u00e9tudiant n''est inscrit dans cet espace.

Expand Down
1 change: 0 additions & 1 deletion assignment/bundles/resources/assignment_hi_IN.properties
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,6 @@ group.list.summary=\u0924\u093e\u0932\u093f\u0915\u093e \u092e\u0947\u0902 \u093
group.list.descr=\u0935\u0930\u094d\u0923\u0928

java.alert.youchoosegroup=\u0906\u092a\u0915\u094b \u0915\u092e \u0938\u0947 \u0915\u092e \u090f\u0915 \u0938\u092e\u0942\u0939 \u0915\u093e \u091a\u092f\u0928 \u0915\u0930\u0928\u0947 \u0915\u0940 \u091c\u0930\u0942\u0930\u0924 \u0939\u0948\u0964
java.alert.noGroupedAssignmentIntoGB=\u0906\u092a \u0917\u094d\u0930\u0947\u0921\u092c\u0941\u0915 \u092e\u0947\u0902 \u0938\u092e\u0942\u0939 \u092a\u0939\u0941\u0901\u091a \u0915\u0947 \u0938\u093e\u0925 \u0905\u0938\u093e\u0907\u0928\u092e\u0947\u0902\u091f \u0928\u0939\u0940\u0902 \u091c\u094b\u0921\u093c \u0938\u0915\u0924\u0947\u0964

nostudent=\u0938\u093e\u0907\u091f \u092e\u0947\u0902 \u0915\u094b\u0908 \u091b\u093e\u0924\u094d\u0930 \u0928\u0939\u0940 \u0939\u0948\u0964

Expand Down
1 change: 0 additions & 1 deletion assignment/bundles/resources/assignment_ja.properties
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,6 @@ group.editsite.nopermission=\u30b5\u30a4\u30c8\u30d1\u30fc\u30df\u30c3\u30b7\u30
group.list.summary=\u8868\u306b\u306f\u30b0\u30eb\u30fc\u30d7\u306e\u4e00\u89a7\u304c\u3042\u308a\u307e\u3059\uff0e\u6700\u521d\u306e\u30ab\u30e9\u30e0\u306f\u30c1\u30a7\u30c3\u30af\u30dc\u30c3\u30af\u30b9\uff0c2\u756a\u76ee\u306e\u30ab\u30e9\u30e0\u306f\u30b0\u30eb\u30fc\u30d7\u540d\uff0c3\u756a\u76ee\u306e\u30ab\u30e9\u30e0\u306f\u30b0\u30eb\u30fc\u30d7\u306e\u8aac\u660e\u3067\u3059\uff0e\u300c\u30d8\u30c3\u30c0
group.list.descr=\u8aac\u660e
java.alert.youchoosegroup=\u30b0\u30eb\u30fc\u30d7\u3092\u5c11\u306a\u304f\u3068\u3082\u4e00\u3064\u9078\u629e\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\uff0e
java.alert.noGroupedAssignmentIntoGB=\u30b0\u30eb\u30fc\u30d7\u30a2\u30af\u30bb\u30b9\u304c\u53ef\u80fd\u306a\u8ab2\u984c\u3092\u300c\u6210\u7e3e\u7c3f\u300d\u306b\u8ffd\u52a0\u3059\u308b\u3053\u3068\u306f\u3067\u304d\u307e\u305b\u3093\uff0e
nostudent=\u30b5\u30a4\u30c8\u306b\u5b66\u751f\u304c\u767b\u9332\u3055\u308c\u3066\u3044\u307e\u305b\u3093\uff0e
grading=\u6210\u7e3e\u4ed8\u3051
grading.no=\u8ab2\u984c\u3092\u300c\u6210\u7e3e\u7c3f\u300d\u306b\u8ffd\u52a0\u3057\u306a\u3044
Expand Down
1 change: 0 additions & 1 deletion assignment/bundles/resources/assignment_mn.properties
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,6 @@ group.list.summary = \u0425\u04AF\u0441\u043D\u044D\u0433\u0442 \u043D\u044C \u0
group.list.descr = \u0422\u0430\u0439\u043B\u0431\u0430\u0440

java.alert.youchoosegroup = \u0422\u0430 \u0434\u043E\u0440 \u0445\u0430\u044F\u0436 \u043D\u044D\u0433 \u0433\u0440\u0443\u043F\u043F \u0441\u043E\u043D\u0433\u043E\u0445 \u0445\u044D\u0440\u044D\u0433\u0442\u044D\u0439.
java.alert.noGroupedAssignmentIntoGB=\u0422\u0430 \u0433\u0440\u0443\u043F\u043F\u044B\u043D access-\u0442\u0430\u0439\u0433\u0430\u0430\u0440 \u0414\u04AF\u043D\u0433\u0438\u0439\u043D \u0434\u044D\u0432\u0442\u044D\u0440\u0442 \u0431\u0438\u0435 \u0434\u0430\u0430\u043B\u0442 \u043D\u044D\u043C\u044D\u0445 \u0431\u043E\u043B\u043E\u043C\u0436\u0433\u04AF\u0439.

nostudent = \u0421\u0430\u0439\u0442\u0430\u0434 \u043E\u044E\u0443\u0442\u0430\u043D \u0431\u0430\u0439\u0445\u0433\u04AF\u0439 \u0431\u0430\u0439\u043D\u0430.

Expand Down
1 change: 0 additions & 1 deletion assignment/bundles/resources/assignment_pt_BR.properties
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,6 @@ group.list.summary =A tabela contem a lista de grupos. A primeira conter\u00e1
group.list.descr =Descri\u00e7\u00e3o

java.alert.youchoosegroup =Voc\u00ea precisa selecionar pelo menos um grupo.
java.alert.noGroupedAssignmentIntoGB =Voc\u00ea n\u00e3o pode adicionar atividades com acesso de grupo no Quadro de Notas.

nostudent = N\u00e3o existem alunos nesse site.

Expand Down
1 change: 0 additions & 1 deletion assignment/bundles/resources/assignment_sv.properties
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,6 @@ is=\u00E4r
isdueon=ska vara inl\u00E4mnad den
isnotval=\u00E4r inte giltig.
jan=JAN
java.alert.noGroupedAssignmentIntoGB=Du kan inte l\u00E4gga till en uppgift med gruppaccess i Resultat
java.alert.youchoosegroup=Du m\u00E5ste v\u00E4lja \u00E5tminstone en grupp.
java.realm=Det f\u00F6rv\u00E4ntade realm-objektet hittades inte
jul=JUL
Expand Down
1 change: 0 additions & 1 deletion assignment/bundles/resources/assignment_tr_TR.properties
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,6 @@ group.editsite.nopermission=Site izinleri dolay\u0131s\u0131 ile grup durumu d\u
group.list.summary=Tablo gruplar\u0131n listesini i\u00e7erir. \u0130lki onay kutular\u0131n\u0131, ikincisi grup ismini, \u00fc\u00e7\u00fcnc\u00fcs\u00fc grup a\u00e7\u0131klmas\u0131n\u0131 i\u00e7erir. Ba\u015fl\u0131k ba\u011flant\u0131lar\u0131 s\u0131ralamak i\u00e7in kullan\u0131labilir.
group.list.descr=A\u00e7\u0131klama
java.alert.youchoosegroup=En az bir grup se\u00e7melisiniz.
java.alert.noGroupedAssignmentIntoGB=Not Defteri'ne grup eri\u015fimi ile \u00f6dev ekleyemezsiniz.
nostudent=Sitede \u00f6\u011frenci bulunmamaktad\u0131r.
grading=Notland\u0131rma
grading.no=Not Defterine Ekleme
Expand Down
1 change: 0 additions & 1 deletion assignment/bundles/resources/assignment_zh_CN.properties
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,6 @@ group.list.summary=\u5206\u7EC4\u5217\u8868
group.list.descr=\u63CF\u8FF0

java.alert.youchoosegroup=\u4F60\u5FC5\u987B\u9009\u62E9\u81F3\u5C11\u4E00\u4E2A\u5206\u7EC4
java.alert.noGroupedAssignmentIntoGB=\u4F60\u4E0D\u80FD\u5C06\u5206\u7EC4\u4F5C\u4E1A\u6DFB\u52A0\u5230\u6210\u7EE9\u518C\u4E2D

nostudent=\u8BE5\u7AD9\u70B9\u65E0\u5B66\u751F

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.ArrayUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.poi.hssf.usermodel.HSSFRow;
import org.apache.poi.hssf.usermodel.HSSFSheet;
Expand Down Expand Up @@ -1192,7 +1193,6 @@ public String buildMainPanelContext(VelocityPortlet portlet, Context context, Ru
template = build_student_preview_submission_context(portlet, context, data, state);
break;
case MODE_STUDENT_VIEW_GRADE_PRIVATE:
context.put("privateView", true);
case MODE_STUDENT_VIEW_GRADE:
context.put("site", s);
// disable auto-updates while leaving the list view
Expand Down Expand Up @@ -2020,6 +2020,10 @@ protected String build_student_preview_submission_context(VelocityPortlet portle
context.put("submissionReference", AssignmentReferenceReckoner.reckoner().submission(submission).reckon().getReference());
}

if (assignment.getIsGroup() && state.getAttribute(VIEW_SUBMISSION_GROUP) != null) {
context.put(VIEW_SUBMISSION_GROUP, (String) state.getAttribute(VIEW_SUBMISSION_GROUP));
}

setScoringAgentProperties(context, assignment, submission, false);

// can the student view model answer or not
Expand Down Expand Up @@ -5357,6 +5361,11 @@ public void doPreview_submission(RunData data) {
state.setAttribute(PREVIEW_SUBMISSION_ASSIGNMENT_REFERENCE, aReference);
Assignment a = getAssignment(aReference, "doPreview_submission", state);

String[] groupChoice = params.getStrings("selectedGroups");
if (groupChoice != null && ArrayUtils.isNotEmpty(groupChoice)) {
state.setAttribute(VIEW_SUBMISSION_GROUP, groupChoice[0]);
}

saveSubmitInputs(state, params);

// retrieve the submission text (as formatted text)
Expand Down Expand Up @@ -7044,12 +7053,9 @@ private void setNewAssignmentParameters(RunData data, boolean validify) {
if (groupAssignment) {
Collection<String> users = usersInMultipleGroups(state, Assignment.Access.GROUP.toString().equals(range), (Assignment.Access.GROUP.toString().equals(range) ? data.getParameters().getStrings("selectedGroups") : null), false, null);
if (!users.isEmpty()) {
StringBuilder sb = new StringBuilder(rb.getString("group.user.multiple.warning") + " ");
for (String user : users) {
sb.append(", " + user);
}
log.warn("{}", sb.toString());
addAlert(state, sb.toString());
String usersString = rb.getString("group.user.multiple.warning") + " " + String.join(",", users);
log.warn("{}", usersString);
addAlert(state, usersString);
}
}

Expand Down

0 comments on commit b12b419

Please sign in to comment.