Skip to content

Commit

Permalink
Changed is-revision input to binding instead of string. #18
Browse files Browse the repository at this point in the history
  • Loading branch information
hirokiterashima committed Mar 23, 2021
1 parent 8c7579b commit 0155464
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export abstract class ComponentGrading {
componentState: any;

@Input()
isRevision: any = false;
isRevision: boolean = false;

componentContent: any;

Expand All @@ -25,6 +25,5 @@ export abstract class ComponentGrading {
this.nodeId,
this.componentId
);
this.isRevision = this.isRevision === 'true';
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<ng-content ng-switch="::$ctrl.component.type">
<div ng-switch-when="AudioOscillator|ConceptMap|Discussion|Draw|Graph|Label|Match|MultipleChoice|OpenResponse|Table" ng-switch-when-separator="|" class="component__content" layout="row" layout-wrap>
<div ng-switch-when="AudioOscillator|ConceptMap|Discussion|Draw|Graph|Label|Match|MultipleChoice|OpenResponse|Table"
ng-switch-when-separator="|"
class="component__content"
layout="row"
layout-wrap>
<div flex="100" flex-gt-sm="66" layout="column" class="component--grading__response">
<ng-content ng-if="$ctrl.latestComponentState != null && $ctrl.latestComponentState !== ''">
<audio-oscillator-grading
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ const WorkgroupComponentRevisions = {
component-id="{{::$ctrl.componentId}}"
component-state="{{ item.componentState }}"
workgroup-id="{{::$ctrl.workgroupId}}"
is-revision="true">
[is-revision]="true">
</concept-map-grading>
<discussion-grading
ng-if="item.componentState.componentType === 'Discussion'"
Expand All @@ -188,23 +188,23 @@ const WorkgroupComponentRevisions = {
component-id="{{::$ctrl.componentId}}"
component-state="{{ item.componentState }}"
workgroup-id="{{::$ctrl.workgroupId}}"
is-revision="true">
[is-revision]="true">
</draw-grading>
<graph-grading
ng-if="item.componentState.componentType === 'Graph'"
node-id="{{::$ctrl.nodeId}}"
component-id="{{::$ctrl.componentId}}"
component-state="{{ item.componentState }}"
workgroup-id="::$ctrl.workgroupId"
is-revision="true">
[is-revision]="true">
</graph-grading>
<label-grading
ng-if="item.componentState.componentType === 'Label'"
node-id="{{::$ctrl.nodeId}}"
component-id="{{::$ctrl.componentId}}"
component-state="{{ item.componentState }}"
workgroup-id="{{::$ctrl.workgroupId}}"
is-revision="true">
[is-revision]="true">
</label-grading>
<match-grading
ng-if="item.componentState.componentType === 'Match'"
Expand Down

0 comments on commit 0155464

Please sign in to comment.