forked from sakaiproject/sakai
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SAK-42046 Gradebook add course grade breakdown to the dropdown for co…
…urse grade column (sakaiproject#10822) Co-authored-by: jkozar2 <moronzac@moronzac-hpzbook15g2>
- Loading branch information
Showing
9 changed files
with
526 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
...g/tool/src/java/org/sakaiproject/gradebookng/tool/actions/CourseGradeBreakdownAction.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package org.sakaiproject.gradebookng.tool.actions; | ||
|
||
import java.io.Serializable; | ||
import org.apache.wicket.ajax.AjaxRequestTarget; | ||
import org.apache.wicket.model.Model; | ||
import org.sakaiproject.gradebookng.tool.actions.InjectableAction; | ||
import org.sakaiproject.gradebookng.tool.model.GbModalWindow; | ||
import org.sakaiproject.gradebookng.tool.pages.GradebookPage; | ||
import org.sakaiproject.gradebookng.tool.panels.CourseGradeBreakdownPanel; | ||
import org.sakaiproject.gradebookng.tool.panels.CourseGradeStatisticsPanel; | ||
import com.fasterxml.jackson.databind.JsonNode; | ||
|
||
public class CourseGradeBreakdownAction extends InjectableAction implements Serializable { | ||
|
||
private static final long serialVersionUID = 1L; | ||
|
||
public CourseGradeBreakdownAction() { | ||
} | ||
|
||
@Override | ||
public ActionResponse handleEvent(final JsonNode params, final AjaxRequestTarget target) { | ||
|
||
final String siteId = params.get("siteId").asText(); | ||
|
||
final GradebookPage gradebookPage = (GradebookPage) target.getPage(); | ||
final GbModalWindow window = gradebookPage.getGradeLogWindow(); | ||
window.setTitle("Course Grade Breakdown"); | ||
window.setContent(new CourseGradeBreakdownPanel(window.getContentId(), window)); | ||
window.show(target); | ||
|
||
return new EmptyOkResponse(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
gradebookng/tool/src/java/org/sakaiproject/gradebookng/tool/model/GbBreakdownItem.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package org.sakaiproject.gradebookng.tool.model; | ||
|
||
import java.io.Serializable; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Data; | ||
import lombok.Getter; | ||
import lombok.Setter; | ||
import org.sakaiproject.grading.api.Assignment; | ||
import org.sakaiproject.grading.api.CategoryDefinition; | ||
|
||
@Data | ||
@AllArgsConstructor | ||
public class GbBreakdownItem implements Serializable { | ||
|
||
private static final long serialVersionUID = 1L; | ||
|
||
@Getter | ||
@Setter | ||
private Long itemId; | ||
|
||
@Getter | ||
@Setter | ||
private CategoryDefinition categoryDefinition; | ||
|
||
@Getter | ||
@Setter | ||
private Assignment gradebookItem; | ||
|
||
@Getter | ||
@Setter | ||
private Double categoryPointsOrWeight; | ||
|
||
@Getter | ||
@Setter | ||
private Integer numGraded; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
65 changes: 65 additions & 0 deletions
65
...kng/tool/src/java/org/sakaiproject/gradebookng/tool/panels/CourseGradeBreakdownPanel.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
<!DOCTYPE html> | ||
<html xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd"> | ||
|
||
<body> | ||
<wicket:panel> | ||
|
||
<div id="itemsPage"> | ||
<div class="row"> | ||
<div class="skip"> | ||
<span wicket:id="items-feedback" /> | ||
</div> | ||
</div> | ||
<div wicket:id="item-list-container"> | ||
<table class="itemsTable table table-responsive table-bordered table-hover table-condensed"> | ||
<thead> | ||
<tr> | ||
<th><span><wicket:message key="breakdown.item" /></span></th> | ||
<th class="text-center"><span><wicket:message key="breakdown.points" /></span></th> | ||
<th class="text-center"><span><wicket:message key="breakdown.students" /></span></th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr wicket:id="items"> | ||
<td class="nameColumn"> | ||
<div class="gb-title"> | ||
<span wicket:id="externalAppFlag"></span> | ||
<span wicket:id="name-label" /> | ||
<span wicket:id="extraCreditFlag" class="gb-flag-extra-credit pull-right"></span> | ||
<span wicket:id="notReleasedFlag" class="gb-flag-not-released pull-right"></span> | ||
<span wicket:id="notCountedFlag" class="gb-flag-not-counted pull-right"></span> | ||
<span wicket:id="extraCreditCategoryFlag" class="gb-category-extra-credit pull-right"></span> | ||
<span wicket:id="dropLowestCategoryFlag" class="gb-category-drop-lowest pull-right"></span> | ||
<span wicket:id="dropHighestCategoryFlag" class="gb-category-drop-highest pull-right"></span> | ||
<span wicket:id="keepHighestCategoryFlag" class="gb-category-keep-highest pull-right"></span> | ||
</div> | ||
</td> | ||
<td class="text-center totalColumn"> | ||
<span wicket:id="out-of-label" /> | ||
</td> | ||
<td wicket:id="number-graded" class="text-center"> | ||
<span wicket:id="number-graded-label" /> | ||
</td> | ||
</tr> | ||
|
||
<!-- Total Points Row --> | ||
<tr wicket:id="total-points-container"> | ||
<td class="text-right totalPoints"> | ||
<strong><wicket:message key="breakdown.total" /></strong> | ||
</td> | ||
<td class="text-center totalPoints"> | ||
<strong><span wicket:id="total-points" /></strong> | ||
</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
</div> | ||
<div class="row"> | ||
<span class="col-sm-6"> | ||
<input type="button" class="button_color" wicket:id="done" wicket:message="value:button.done" /> | ||
</span> | ||
</div> | ||
</div> | ||
</wicket:panel> | ||
</body> | ||
</html> |
Oops, something went wrong.