Review of question using Geogebra extension not working in Blackboard

64 views
Skip to first unread message

Don Shearman

unread,
Oct 22, 2020, 1:54:53 AM10/22/20
to numbas...@googlegroups.com, Jim Pettigrew, Donald Shearman
Dear Brains Trust

We are currently testing a new installation of an LTI server for our institution before making it available to the institution at large. All seems to be working well with the exception of one question which uses the Geogebra extension. The question is served correctly and is correctly marked, however when trying to review this test (either from student or instructor view) the following error is encountered:

Numbas Error: Error loading question 0: Variable geogebra is not defined.

Can anyone shed any light on why this may be happening?
Regards

Don Shearman
Western Sydney University

Christian Lawson-Perfect

unread,
Oct 29, 2020, 3:36:24 PM10/29/20
to numbas...@googlegroups.com
Hi Don,
Sorry about this - I've finally got round to writing code to make geogebra applets resume correctly.
I've updated the extension - can you give it a go, and let me know if there are any problems? I really wanted to get this done before I finish for the week, so I've got it to a point where I think it works, but I'm not sure it's ironclad.

--
You received this message because you are subscribed to the Google Groups "Numbas Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to numbas-users...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/numbas-users/CAMn%3DD1_GG%3DxPU2w1pqzGF1WheDDL%2B3j2%3DqQ8vewrJYcXG-GjNA%40mail.gmail.com.

Don Shearman

unread,
Oct 29, 2020, 6:24:38 PM10/29/20
to numbas...@googlegroups.com
Hi Christian

When I updated the test and tried to review a new attempt I got the following message:

Numbas Error: MathJax processing error in Question 1 Part a feedback: "You can not access a GeoGebra app before it has loaded." when texifying latex(app,'A')
Numbas Error: MathJax processing error in Question 1 Part a feedback: "You can not access a GeoGebra app before it has loaded." when texifying latex(app,'A')
at https://numbas-lti.westernsydney.edu.au/media/extracted_zips/Exam/32/scripts.js:28736:15
at Function.execute (https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.6/MathJax.js?config=TeX-AMS-MML_HTMLorMML.js:19:3242)
at cb (https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.6/MathJax.js?config=TeX-AMS-MML_HTMLorMML.js:19:2819)
at Object.Execute (https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.6/MathJax.js?config=TeX-AMS-MML_HTMLorMML.js:19:7455)
at Object.ExecuteHooks (https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.6/MathJax.js?config=TeX-AMS-MML_HTMLorMML.js:19:10731)
at Function.execute (https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.6/MathJax.js?config=TeX-AMS-MML_HTMLorMML.js:19:3242)
at cb (https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.6/MathJax.js?config=TeX-AMS-MML_HTMLorMML.js:19:2819)
at Object.Execute (https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.6/MathJax.js?config=TeX-AMS-MML_HTMLorMML.js:19:7455)
at Object.Post (https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.6/MathJax.js?config=TeX-AMS-MML_HTMLorMML.js:19:9487)
at Object.formatError (https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.6/MathJax.js?config=TeX-AMS-MML_HTMLorMML.js:19:43287)

I'll try uploading as a new test and let you know if there is any difference.

Regards

Don Shearman


Christian Lawson-Perfect

unread,
Oct 30, 2020, 6:16:55 AM10/30/20
to numbas...@googlegroups.com
Sorry, I should have said that this will only work for new attempts.

William Haynes

unread,
Nov 1, 2020, 9:19:48 PM11/1/20
to Numbas Users
I am seeing different behaviors depending on how I load the geogebra applet.

Method 1.    The old way, call geogebra applet in problem statement:  {geogebra_applet('S9Xk8AmF')}
Method 2.    New way, define a GeoGebra variable and load it: applet1 =geogebra_applet('S9Xk8AmF'), then {applet1}
Method 3.    Save a .ggb file as a resource and load it:  {geogebra_file('material-S9Xk8AmF.ggb')}
Method 4.    Use a Javascript function, called in the problem statement:  {ggb_function()} 
Method 5     Use a Javascript function, save in a variable, then load it:   applet2 = ggb_function(), then {applet2}

This is what I am seeing

Method 1 seems to work correctly. 
Method 2 loads the applet and seems to work properly, but if the student pauses, and later resumes, the geogebra applet is missing its contents.
Method 3 loads the applet but in a 0 px tall frame, so it is not visible. I can see it if I resize it via the console, but I see the grid which was hidden in the ggb.file.
Method 4 seems to work correctly.
Method 5 same problem as method 2


Will

Don Shearman

unread,
Nov 2, 2020, 6:40:34 PM11/2/20
to numbas...@googlegroups.com
Hi Christian

I created a new test with a newly created question and am still getting the same error message when reviewing. The question is pretty much your sample Geogebra question asking the user to move a point to a randomly determined coordinate.

Regards

Don Shearman


Joshua Lim

unread,
Nov 20, 2020, 9:38:44 AM11/20/20
to Numbas Users
Hi all

We're also finding similar behaviour with NUMBAS exams (in Moodle via LTI or even SCORM). Did this resolve for you William and Don?

Best wishes,
Josh 

p.s. sorry for bumping this thread, I appreciate this forum is very busy and you're doing a fantastic job Christian!

Don Shearman

unread,
Nov 22, 2020, 7:30:17 PM11/22/20
to numbas...@googlegroups.com
Hi Josh

Not resolved for us yet, it isn't high on the priorities so I haven't pushed it. reassuring to know that it's not just me though.

Regards

Don Shearman


Don Shearman

unread,
Dec 14, 2020, 6:21:21 PM12/14/20
to numbas...@googlegroups.com
Hi Christian

Still having problems with Geogebra questions in Review mode. The issue I'm seeing is 

Numbas Error: MathJax processing error in Question 1 Part a feedback: "You can not access a GeoGebra app before it has loaded." when texifying latex(app,'A')
Numbas Error: MathJax processing error in Question 1 Part a feedback: "You can not access a GeoGebra app before it has loaded." when texifying latex(app,'A')

The latex(app, 'A') seems to be coming from the marking algorithm. Question is working fine and I can review it from the Review page of the test but any attempt to review later via the LTI produces the error. We're about to send several tests live that use the GeoGebra extension so are hoping that this can be fixed.

Regards

Don Shearman


On Fri, Oct 30, 2020 at 6:36 AM Christian Lawson-Perfect <christia...@gmail.com> wrote:

Christian Lawson-Perfect

unread,
Dec 16, 2020, 10:39:10 AM12/16/20
to numbas...@googlegroups.com
Sorry I haven't got round to looking at this, I've had to prioritise supporting lecturers at Newcastle, and it doesn't look like this will be quick to fix.

Christian Lawson-Perfect

unread,
Dec 16, 2020, 11:04:07 AM12/16/20
to numbas...@googlegroups.com
Actually, I've just had an idea and I think I've managed to avoid that error. I'm very sorry I didn't do this earlier. Can you test with your exams, and let me know if you still get the error? I've updated the geogebra extension on numbas.mathcentre.ac.uk, but not in the github repository yet.

Don Shearman

unread,
Dec 16, 2020, 4:05:18 PM12/16/20
to numbas...@googlegroups.com
Hi Christian

You've avoided the error, however when reviewing an exam using the GeoGebra extension, a question which uses the extension is now marked as incorrect in Review mode even if it was graded as correct when the test was taken. For one of the questions I received the following error

There was an error in this part's marking algorithm. Please report this. Error evaluating variable mark: No definition of 'listval' of correct type found. 

Really appreciate your help with this, sorry to be adding to the workload!
 
Regards

Don Shearman


William Haynes

unread,
Dec 16, 2020, 6:32:33 PM12/16/20
to numbas...@googlegroups.com
I’m seeing a similar problem on my Final Exam today.  The question is marked as correct when the student submits, but when reviewing his work I see 

Error marking 𝑉𝑚𝑎𝑥Vmax: undefined is not an object (evaluating 'part.finalised_result.states') 20 marks were taken away.

This is a question with a custom marking algorithm which gets the correct answer from the geogebra applet.  

Will



Jim Pettigrew

unread,
May 27, 2021, 9:00:10 PMMay 27
to numbas...@googlegroups.com
Hi Christian,

Further Don Shearman's issue on 30/10/2020 (copied below), it appears that Geogebra extension questions are still not behaving well in review mode - the questions are being served and marked correctly, but in all cases are indicated as incorrect.

This is a live issue now since we are using a Geogebra extension question in a summative numeracy test for ~1500 nursing students. They are attempting the test as we speak and will be able to review their results next week (Tue 1 June at 12pm Aus time).

Checking a sample student's attempt via the LTI server dashboard, we have the following.

 Student has completed every question correctly:

image.png
But the review indicates that they have answered Question 6 incorrectly (this is the only Geogebra extension question in the test):

image.png

The test data indicates a correct answer:

image.png

I know you are insanely busy, so I respect that you might not be able to address this issue in a timely way.

But just in case there is an easy fix...

I truly appreciate your attentiveness in this forum and all of the amazing work you're doing on Numbas.

Thanks,

Jim


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Email from Don Shearman, 30/10/2020

We are currently testing a new installation of an LTI server for our institution before making it available to the institution at large. All seems to be working well with the exception of one question which uses the Geogebra extension. The question is served correctly and is correctly marked, however when trying to review this test (either from student or instructor view) the following error is encountered:

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  

On Sat, Nov 21, 2020 at 1:38 AM Joshua Lim <joshua....@gmail.com> wrote:

Christian Lawson-Perfect

unread,
Jun 8, 2021, 9:42:39 AMJun 8
to numbas...@googlegroups.com
Hi all,
Sorry this has dragged on so long.
I looked at this today, and I think I've come up with a partial solution (but I know I've said that before!). The root of the problem is that when you review an attempt, Numbas recreates the marking feedback by running the marking algorithm for each submitted part, using the saved answer. For parts which refer to a GeoGebra applet, this means that the marking algorithm runs before the applet has loaded. This sort of has to be the case, because the question needs to finish loading before the applet can be inserted. So when the marking algorithm runs, it tries to get a value from the applet, and throws the "You can not access a GeoGebra app before it has loaded" error.

I've added a cache to the ggbapplet data type, which saves all values returned by the applet. That's saved in the suspend data and restored when you resume the exam, so functions which try to read from the applet instead read from the cache until the applet has finished loading.

I don't know if this fixes everyone's problems because it wasn't clear exactly what was going on in all the cases you've told me about, but I could certainly reproduce the error when reviewing an attempt at my "put a point in the right position" question (https://numbas.mathcentre.ac.uk/question/68262/mark-a-part-as-correct-if-the-student-moves-a-point-to-the-right-position/).

One caveat with this solution is that there's still a problem when you use \var or \simplify to sub in a value from the GeoGebra applet. MathJax also runs asynchronously, so the substitution can't happen until MathJax has parsed the TeX source, which doesn't happen until the marking algorithm has finished. So if you do that, then again you get the "You can not access a GeoGebra app before it has loaded" error on resuming an attempt. The solution is to use string concatenation instead of \var. In my example question, I changed
"The point is at $\var{latex(app,'A')}$."
to
"The point is at $" + latex(app,'A') + "$."

This makes it so that the call to get data from the applet happens immediately, instead of once MathJax is rendering the TeX.

Jim Pettigrew

unread,
Jun 14, 2021, 9:27:14 PMJun 14
to numbas...@googlegroups.com
Hi Christian,

Thanks for this; it worked perfectly for one of Don Shearman's Geogebra extension questions. Unfortunately it does not work for either of the three questions collected in the Movable syringe exam below.


The first version (and first question in the exam) uses JME to encode the extension, the second and third versions use a combination of JavaScript and JME.

The JME version scores the question correctly in review mode (the others don't). But neither of the three versions re-create the app in review mode.

image.png
Any insights would be most appreciated.

Thanks,

Jim

Reply all
Reply to author
Forward
0 new messages