numbas / editor

An editor for the Numbas e-learning system.
http://numbas.mathcentre.ac.uk
Apache License 2.0
59 stars 62 forks source link

Exam list problem #71

Closed BillFoster closed 12 years ago

BillFoster commented 12 years ago

Access the exams list in the editor and go through to page 5. There is a jumble of exams presented on that page.

christianp commented 12 years ago

Can't see what you mean. Send me a screenshot.

anthonyyoud commented 12 years ago

I think more relevant is that if you click through to page 5 (on tallaght) and look at the console you see this message:

Uncaught Error: Unable to parse bindings.
Message: TypeError: Cannot read property 'length' of undefined;
Bindings value: visible: metadata.description.length>0, html: $(metadata.description).text(), dotdotdot: true

after which, clicking on the next or previous page arrows has no effect on the exam list.

christianp commented 12 years ago

I don't get this error! Bizarre.

anthonyyoud commented 12 years ago

Seems to happen on page 6 in Firefox.

anthonyyoud commented 12 years ago

Similarly on IE:

Message: Unable to parse bindings.
Message: TypeError: 'metadata.description.length' is null or not an object;
Bindings value: visible: metadata.description.length>0, html: $(metadata.description).text(), dotdotdot: true
Line: 54
Char: 67
Code: 0
URI: http://tallaght/static/js/knockout.js
christianp commented 12 years ago

ahh, I had to try to go to the last page for it to die. The reason this has come up now is that the new version of knockout raises errors thrown during binding rather than silently throwing them away.

Some exams and questions uploaded before I added the description field didn't have it in their metadata, and I wasn't doing anything to make sure the JSON returned from the server had everything I need. Lesson learned!