Skip to content

Commit

Permalink
Fixed issue #18671: Potential loop with equation set question (#2984)
Browse files Browse the repository at this point in the history
  • Loading branch information
Shnoulle committed Nov 20, 2023
1 parent 864d1a9 commit feb0fed
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions assets/packages/expressions/em_javascript.js
Expand Up @@ -68,7 +68,9 @@ function checkconditions(value, name, type, evt_type)
}*/
try{
ExprMgr_process_relevance_and_tailoring(evt_type,name,type);
} catch(e) { console.ls.error(e); }
} catch(e) {
console.ls.error(e);
}
}

/**
Expand Down Expand Up @@ -234,8 +236,16 @@ $(document).on("change",".radio-item :radio:not([onclick]), .button-item :radio:
$(document).on("change",".checkbox-item :checkbox:not([onclick]),.button-item :checkbox:not([onclick]), .ls-button-checkbox",function(event){
checkconditions($(this).val(), $(this).attr('name'), 'checkbox', 'click')
});
/* hidden item */
$(document).on("updated",".answer-item :hidden, .upload-item :hidden",function(event){
/* upload item */
$(document).on("updated",".upload-item :hidden",function(event){
checkconditions($(this).val(), $(this).attr('name'), 'upload', 'updated')
});
/* equation item */
$(document).on("updated",".hidden-item :hidden",function(event){
/* equation item must have a name */
if(!$(this).attr('name')) {
return;
}
checkconditions($(this).val(), $(this).attr('name'), 'equation', 'updated')
});
/* new multiple choice bootstrap buttons */
Expand Down

0 comments on commit feb0fed

Please sign in to comment.