cgkineo / adapt-devtools

Tools for developing and testing Adapt courses
GNU General Public License v3.0
8 stars 6 forks source link

JS errors: Initial load and Complete Menu button #72

Closed swashbuck closed 1 year ago

swashbuck commented 1 year ago

Subject of the issue

When the course first loads, I get this error:

ERROR: Error during app:dataReady trigger TypeError: Bind must be called on a function
    Underscore 4
    onEnabled pass-half-fail.js:16
    Backbone 4
    triggerDataReady data.js:205
    loadCourseData data.js:105
    onLanguageChange data.js:91
    Backbone 5
    set lockingModel.js:68
    onLoadCourseData data.js:74
    d/t[e]< Backbone
    cr Underscore
    Backbone 4
    success configModel.js:49
    d/t[e]< Backbone
    cr Underscore
    Backbone 4
    _callbackHandle wait.js:51
    setTimeout handler*end wait.js:49
    queue wait.js:75
    success configModel.js:46
    success Backbone
    jQuery 5
index.html:2367:25

Then, clicking the Complete Menu button throws a console error.

Uncaught TypeError: relativeString is undefined
    parseRelativeString adapt.js:140
    calculateLevel a11y.js:217
    calculateLevel a11y.js:236
    ariaLevel a11y.js:238
    a11y_aria_level helpers.js:345
    c handlebars.min.js:27
    main templates.js:594
    c handlebars.min.js:27
    d handlebars.min.js:27
    <anonymous> templates.js:26
    updateAria headingView.js:26
    Backbone 5
    set lockingModel.js:68
    checkCompletionStatusFor adaptModel.js:335
    ir Underscore
adapt.js:140:18

Your environment

Steps to reproduce

I used a course set up with adapt create course. The only custom plugins installed are Dev Tools and Inspector.

  1. Visit the menu
  2. Open the web console and notice the first error
  3. Open Dev Tools and click Complete Menu
danielghost commented 1 year ago

The pass-half-fail functionality has additional issues with answering trickled questions.

The parseRelativeString issue can be resolved by including the _course level for _accessibility._ariaLevels in config.json.

oliverfoster commented 1 year ago

Two separate issues, please separate.

pass-half-full fixed in https://github.com/cgkineo/adapt-devtools/releases/tag/v3.2.2