Skip to content

Commit

Permalink
fix(Classroom Monitor): Fix Grade By Step button (#865)
Browse files Browse the repository at this point in the history
  • Loading branch information
geoffreykwan authored Oct 20, 2022
1 parent 2f1b0ca commit fe87daa
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,8 @@ class ClassroomMonitorController {
icon: 'view_list',
type: 'primary',
action: () => {
let currentView = this.$state.current.name;
if (currentView === 'root.cm.unit') {
// if we're currently grading a step, close the node when a nodeProgress menu button is clicked
if (this.TeacherDataService.getCurrentNode() !== this.ProjectService.rootNode) {
// we are not showing the root project view so go to the parent of the current node
this.NodeService.closeNode();
}
},
Expand Down
6 changes: 6 additions & 0 deletions src/assets/wise5/common/side-menu/side-menu.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,11 @@ export class SideMenuComponent implements OnInit {

goToView(view: any): void {
this.state.go(view.route);
if (view.action != null) {
// make sure the action is called after this.state.go(view.route) is done changing the route
setTimeout(() => {
view.action();
});
}
}
}

0 comments on commit fe87daa

Please sign in to comment.