File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 268268 $ . ajax ( exercise . url , { dataType : "html" } )
269269 . done ( function ( data ) {
270270 exercise . updateSummary ( $ ( data ) ) ;
271+ exercise . dom_element . dispatchEvent (
272+ new CustomEvent ( "aplus:submission-finished" ,
273+ { bubbles : true , detail : { type : exercise . exercise_type } } ) ) ;
271274 } ) ;
272275 }
273276 } ) ;
869872 } ,
870873
871874 fillFormInputs : function ( submissionData , container ) {
875+ if ( ! submissionData ) return ;
872876 submissionData . forEach ( function ( [ fieldName , fieldValue ] ) {
873877 const field = container . find ( '[name="' + fieldName + '"]' ) ;
874878 if ( field . length === 0 ) return ;
Original file line number Diff line number Diff line change 9696 $ ( "#submit-progress" ) . addClass ( "d-none" ) ;
9797 var $stats = $ ( "#exercise-info" ) ,
9898 url = $stats . data ( "url" ) ;
99- $stats . load ( url , function ( ) {
100- $stats . find ( '[data-bs-toggle="tooltip"]' ) . tooltip ( ) ;
101- } ) ;
99+ if ( url ) {
100+ $stats . load ( url , function ( ) {
101+ $stats . find ( '[data-bs-toggle="tooltip"]' ) . tooltip ( ) ;
102+ } ) ;
103+ }
102104 }
103105} ) ;
104106</ script >
You can’t perform that action at this time.
0 commit comments