|
65 | 65 |
|
66 | 66 | <div class="d-flex"> |
67 | 67 | <div class="selection pr-50"> |
68 | | - <div>Provide guidance for the learner at the end of this assessment. <i class="warningTriangle fas fa-exclamation-triangle warm-yellow"></i></div> |
| 68 | + <div>Provide guidance for the learner at the end of this assessment. <i v-if="!IsVisible" class="warningTriangle fas fa-exclamation-triangle warm-yellow"></i></div> |
69 | 69 | <EditSaveFieldWithCharacterCount v-model="assessmentDetails.endGuidance.blocks[0].title" |
70 | 70 | addEditLabel="title" |
71 | 71 | v-bind:characterLimit="60" |
|
79 | 79 | <h3>Tip</h3> |
80 | 80 | You can offer guidance to the learner at the end of the assessment such as next steps or recommendations on other learning resources to try. </div> |
81 | 81 | </div> |
82 | | - <Button class="mt-5" color="green" v-on:click="isOpen = false" :disabled="!canSaveAll">Save settings</Button> |
| 82 | + <Button class="mt-5" color="green" v-on:click="isOpen = false" :disabled="!IsVisible">Save settings</Button> |
83 | 83 | </div> |
84 | 84 | </div> |
85 | 85 | </v-card> |
|
131 | 131 | endGuidance: "", |
132 | 132 | initialGuidance: "", |
133 | 133 | guidanceValid: true, |
| 134 | + IsVisible: false, |
134 | 135 | } |
135 | 136 | }, |
136 | 137 | watch: { |
|
139 | 140 | { |
140 | 141 | this.assessmentDetails.endGuidance.addBlock(BlockTypeEnum.Text); |
141 | 142 | } |
142 | | - this.assessmentDetails.endGuidance.blocks[0].textBlock.content = this.endGuidance; |
| 143 | + this.assessmentDetails.endGuidance.blocks[0].textBlock.content = this.endGuidance; |
143 | 144 | }, |
144 | 145 | ["assessmentDetails.passMark"](value){ this.assessmentDetails.passMark = this.capNumberFieldBy(value, 100)}, |
145 | 146 | ["assessmentDetails.maximumAttempts"](value){ this.assessmentDetails.maximumAttempts = this.capNumberFieldBy(value, 10)}, |
|
156 | 157 | } |
157 | 158 | |
158 | 159 | this.assessmentDetails.assessmentSettingsAreValid = settingsAreValid; |
| 160 | +
|
| 161 | + if (this.endGuidance != "") { |
| 162 | + this.IsVisible = true; |
| 163 | + } |
| 164 | + else { |
| 165 | + this.IsVisible = false; |
| 166 | + } |
| 167 | +
|
159 | 168 | return settingsAreValid; |
160 | 169 | }, |
161 | 170 | }, |
|
169 | 178 | { |
170 | 179 | this.endGuidance = description; |
171 | 180 | } |
| 181 | +
|
| 182 | + if (this.endGuidance != "") { |
| 183 | + this.IsVisible = true; |
| 184 | + } |
| 185 | + else { |
| 186 | + this.IsVisible = false; |
| 187 | + } |
172 | 188 | }, |
173 | 189 | setGuidanceValidity(valid: boolean) { |
174 | | - this.guidanceValid = valid; |
| 190 | + if (this.endGuidance == "") { |
| 191 | + this.guidanceValid = false; |
| 192 | + this.IsVisible = false; |
| 193 | + } |
| 194 | + else { |
| 195 | + this.guidanceValid = valid; |
| 196 | + this.IsVisible = true; |
| 197 | + } |
175 | 198 | } |
176 | 199 | } |
177 | 200 | }); |
|
0 commit comments