Skip to content

Commit

Permalink
Merge pull request #58 from WISE-Community/issue-57-show-student-work…
Browse files Browse the repository at this point in the history
…-in-milestone-reports-from-step-grading

Always show Student Work tab in milestone reports
  • Loading branch information
hirokiterashima authored Apr 8, 2021
2 parents 2845541 + c7be364 commit 78ed00e
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,6 @@ class MilestoneDetailsController {
const MilestoneDetails = {
bindings: {
milestone: '<',
hideStudentWork: '<',
onShowWorkgroup: '&',
onVisitNodeGrading: '&'
},
Expand Down Expand Up @@ -198,12 +197,7 @@ const MilestoneDetails = {
<compile data="$ctrl.milestone.generatedReport"></compile>
</div>
</section>
<section ng-if="$ctrl.hideStudentWork && $ctrl.milestone.generatedRecommendations && $ctrl.milestone.isReportAvailable"
class="milestone-details__section md-whiteframe-1dp">
<div class="milestone-details__header primary md-body-2 gray-lightest-bg">{{ ::'recommendations' | translate }}</div>
<compile data="$ctrl.milestone.generatedRecommendations"></compile>
</section>
<section ng-if="!$ctrl.hideStudentWork" class="md-whiteframe-1dp gray-lightest-bg">
<section class="md-whiteframe-1dp gray-lightest-bg">
<div ng-if="$ctrl.milestone.generatedRecommendations && $ctrl.milestone.isReportAvailable">
<md-tabs md-dynamic-height>
<md-tab label="{{ ::'recommendations' | translate }}" md-on-select="$ctrl.saveTabSelectedEvent('MilestoneRecommendationTabSelected')">
Expand All @@ -219,7 +213,7 @@ const MilestoneDetails = {
</md-tabs>
</div>
<div ng-if="!$ctrl.milestone.generatedRecommendations && $ctrl.milestone.isReportAvailable"
class="milestone-details__section md-whiteframe-1dp">
class="milestone-details__section md-whiteframe-1dp">
<div class="milestone-details__header primary md-body-2 gray-lightest-bg">{{ ::'studentWork' | translate }}</div>
<milestone-grading-view milestone="$ctrl.milestone"></milestone-grading-view>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ <h2>{{ 'MILESTONE_DETAILS_TITLE' | translate : { name: $ctrl.milestone.name } }}
</md-toolbar>
<md-dialog-content class="gray-lighter-bg md-dialog-content">
<milestone-details milestone="$ctrl.milestone"
hide-student-work="$ctrl.hideStudentWork"
on-show-workgroup="$ctrl.onShowWorkgroup(value)"
on-visit-node-grading="$ctrl.onVisitNodeGrading()"></milestone-details>
</md-dialog-content>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ export class MilestoneDetailsDialog {
'$mdDialog',
'$event',
'milestone',
'hideStudentWork',
'TeacherDataService'
];

Expand All @@ -15,7 +14,6 @@ export class MilestoneDetailsDialog {
private $mdDialog,
private $event,
private milestone,
private hideStudentWork,
private TeacherDataService
) {}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ export class NodeGradingViewController {
}

showReport($event) {
this.MilestoneService.showMilestoneDetails(this.milestoneReport, $event, true);
this.MilestoneService.showMilestoneDetails(this.milestoneReport, $event);
}
}

Expand Down
5 changes: 2 additions & 3 deletions src/assets/wise5/services/milestoneService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,7 @@ export class MilestoneService {
projectAchievement.isReportAvailable = reportAvailable;
}

showMilestoneDetails(milestone: any, $event: any, hideStudentWork: boolean = false) {
showMilestoneDetails(milestone: any, $event: any) {
this.upgrade.$injector.get('$mdDialog').show({
parent: angular.element(document.body),
templateUrl:
Expand All @@ -587,8 +587,7 @@ export class MilestoneService {
escapeToClose: true,
locals: {
$event: $event,
milestone: milestone,
hideStudentWork: hideStudentWork
milestone: milestone
}
});
}
Expand Down

0 comments on commit 78ed00e

Please sign in to comment.