File tree Expand file tree Collapse file tree 14 files changed +14
-15
lines changed
components/question/services Expand file tree Collapse file tree 14 files changed +14
-15
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ angular.module('mm.addons.qtype_ddimageortext')
4343
4444 ddarea = questionEl . querySelector ( '.ddarea' ) ;
4545 question . text = $mmUtil . getContentsOfElement ( questionEl , '.qtext' ) ;
46- if ( ! ddarea || ! question . text ) {
46+ if ( ! ddarea || typeof question . text == 'undefined' ) {
4747 log . warn ( 'Aborting because of an error parsing question.' , question . name ) ;
4848 return self . showDirectiveError ( scope ) ;
4949 }
Original file line number Diff line number Diff line change 1- < section class ="list mma-qtype-ddimageortext-container " ng-if ="question.text ">
1+ < section class ="list mma-qtype-ddimageortext-container " ng-if ="question.text || question.text === '' ">
22 < mm-loading hide-until ="question.loaded "> </ mm-loading >
33 <!-- Content is outside the mm-loading to let the script calculate drag items position -->
44 < div ng-class ="{invisible: !question.loaded} " class ="item item-text-wrap ">
Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ angular.module('mm.addons.qtype_ddmarker')
4444 ddarea = questionEl . querySelector ( '.ddarea' ) ;
4545 ddform = questionEl . querySelector ( '.ddform' ) ;
4646 question . text = $mmUtil . getContentsOfElement ( questionEl , '.qtext' ) ;
47- if ( ! ddarea || ! ddform || ! question . text ) {
47+ if ( ! ddarea || ! ddform || typeof question . text == 'undefined' ) {
4848 log . warn ( 'Aborting because of an error parsing question.' , question . name ) ;
4949 return self . showDirectiveError ( scope ) ;
5050 }
Original file line number Diff line number Diff line change 1- < section class ="list mma-qtype-ddmarker-container " ng-if ="question.text ">
1+ < section class ="list mma-qtype-ddmarker-container " ng-if ="question.text || question.text === '' ">
22 < mm-loading hide-until ="question.loaded "> </ mm-loading >
33 <!-- Content is outside the mm-loading to let the script calculate drag items position -->
44 < div ng-class ="{invisible: !question.loaded} " class ="item item-text-wrap ">
Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ angular.module('mm.addons.qtype_ddwtos')
5858 question . answers = answersEl . outerHTML ;
5959
6060 question . text = $mmUtil . getContentsOfElement ( questionEl , '.qtext' ) ;
61- if ( ! question . text ) {
61+ if ( typeof question . text == 'undefined' ) {
6262 log . warn ( 'Aborting because of an error parsing question.' , question . name ) ;
6363 return self . showDirectiveError ( scope ) ;
6464 }
Original file line number Diff line number Diff line change 1- < section class ="list mma-qtype-ddwtos-container " ng-if ="question.text ">
1+ < section class ="list mma-qtype-ddwtos-container " ng-if ="question.text || question.text === '' ">
22 < div class ="item item-text-wrap ">
33 < p ng-if ="!question.readonly " class ="item-howto item item-icon-left "> < i class ="icon ion-information "> </ i > {{ 'mm.question.howtodraganddrop' | translate }}</ p >
44 < p > < mm-format-text watch ="true " class ="mm-content-with-float "> {{ question.text }}</ mm-format-text > </ p >
Original file line number Diff line number Diff line change 1- < section class ="list " ng-if ="question.text ">
1+ < section class ="list " ng-if ="question.text || question.text === '' ">
22 <!-- "Seen" hidden input -->
33 < input ng-if ="seenInput " type ="hidden " name ="{{seenInput.name}} " value ="{{seenInput.value}} " >
44 < div class ="item item-text-wrap ">
Original file line number Diff line number Diff line change 1- < section class ="list " ng-if ="question.text ">
1+ < section class ="list " ng-if ="question.text || question.text === '' ">
22 < div class ="item item-text-wrap ">
33 < p > < mm-format-text watch ="true " class ="mm-content-with-float "> {{ question.text }}</ mm-format-text > </ p >
44 </ div >
Original file line number Diff line number Diff line change 1- < section class ="list mma-qtype-gapselect-container " ng-if ="question.text ">
1+ < section class ="list mma-qtype-gapselect-container " ng-if ="question.text || question.text === '' ">
22 < div class ="item item-text-wrap ">
33 < p > < mm-format-text watch ="true " class ="mm-content-with-float "> {{ question.text }}</ mm-format-text > </ p >
44 </ div >
Original file line number Diff line number Diff line change 1- < section class ="list mma-qtype-multianswer-container " ng-if ="question.text ">
1+ < section class ="list mma-qtype-multianswer-container " ng-if ="question.text || question.text === '' ">
22 < div class ="item item-text-wrap ">
33 < p > < mm-format-text watch ="true " class ="mm-content-with-float "> {{ question.text }}</ mm-format-text > </ p >
44 </ div >
You can’t perform that action at this time.
0 commit comments