Skip to content

Commit

Permalink
SAK-40159 Add student's name to rubric window in gradebook
Browse files Browse the repository at this point in the history
  • Loading branch information
bgarciaentornos authored and Miguel Pellicer committed Oct 25, 2018
1 parent 802c636 commit ae12d8e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ rubrics.option_hidepoints = Hide point values (feedback only)
rubrics.option_studentpreview = Hide Rubric from student
rubrics.grading_rubric = Grading Rubric
rubrics.option.graderubric = Grade Rubric
rubrics.option.graderubric.for = Grade Rubric for {0} ({1})
rubrics.browse_grading_criteria = Browse grading criteria
rubrics.grading_criteria = Grading criteria
rubrics.question_use_rubric = This question could be graded using a Rubric
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,23 @@
import org.apache.wicket.AttributeModifier;
import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
import org.apache.wicket.spring.injection.annot.SpringBean;
import org.apache.wicket.markup.html.WebMarkupContainer;
import org.apache.wicket.markup.html.form.Form;
import org.apache.wicket.model.IModel;
import org.apache.wicket.model.ResourceModel;
import org.apache.wicket.model.StringResourceModel;

import org.sakaiproject.gradebookng.business.GradebookNgBusinessService;
import org.sakaiproject.gradebookng.business.model.GbUser;
import org.sakaiproject.gradebookng.tool.component.GbAjaxButton;
import org.sakaiproject.rubrics.logic.RubricsConstants;

public class RubricGradePanel extends BasePanel {

@SpringBean(name = "org.sakaiproject.gradebookng.business.GradebookNgBusinessService")
private GradebookNgBusinessService businessService;

private final ModalWindow window;

public RubricGradePanel(final String id, final IModel<Map<String, Object>> model, final ModalWindow window) {
Expand All @@ -45,6 +52,7 @@ public void onInitialize() {
final Map<String, Object> modelData = (Map<String, Object>) getDefaultModelObject();
final Long assignmentId = (Long) modelData.get("assignmentId");
final String studentUuid = (String) modelData.get("studentUuid");
final GbUser student = businessService.getUser(studentUuid);

final Form form = new Form("sakaiRubricGradingForm");

Expand Down Expand Up @@ -77,6 +85,6 @@ public void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
add(form);

this.window.setInitialWidth(1100);
RubricGradePanel.this.window.setTitle(new ResourceModel("rubrics.option.graderubric"));
RubricGradePanel.this.window.setTitle(new StringResourceModel("rubrics.option.graderubric.for", null, new Object[] { student.getDisplayName(), student.getDisplayId() }));
}
}

0 comments on commit ae12d8e

Please sign in to comment.