Question chaining



  • I've some troubles also with question chaining. The online help depicts a way to do it by writing questions in a .qu file; by trying to perform it with the question designer, I created a first question on which, by clicking over "Edit Details", I set as "Information Fields" the field "id" with the value "provachain1", and a second question where the numeric answer is ${(4*$response.provachain1)}, by having the first question with only an answer box (so it was not required to use multipart syntax like .1, .2, and so on). Of course the second question also contains a line of algorithm (since is required, otherwise an error occurs while saving the question), although it is limited to the definition of a dummy variable.

    But, if I create an assignment with these two questions, the correct answer for the second is considered always zero, regardless of the value put in the first one. I tried also the  syntax $4*response.provachain1, but without effect; on the other hand, writing "response" in capital letter ("RESPONSE"), as suggested for example from the standard grading code of an HTML question, resulted in a Java runtime error. Did I forget something?

    Thanks in advance again.


  • administrators

    I think this functionality is deprecated and should have been removed from the online help but it should work. If you still want to do it this way, I'll have a look at it over the weekend and get back to you.

    That being said, I would recommend pursuing the html question chaining in the other post. That is how I normally do question chaining.



  • Ok, thanks. We explored both ways since HTML is more versatile but chaining seems to be more immediate, not requiring a particular code knowledge.


  • Global Moderator

    Are you using MapleTA 2016? In that case:

    • id has to be added through question source edit, there is a field id=0@, modify it to id=provachain1@
    • to call the response, please use $response.<id>.<part>.<blank>. It depends on the question structure. To test it out, in the second question put $response.provachain1.1 and  $response.provachain1.1.1 in the question text and see which one works. 
    • When calculating with $response, you have two choices. In response areas, for example numeric blanks use $some_algorithm_variable*$response.provachain1.1.1. For calculations in question text (hence visible to the student) use ${ $some_algorithm_variable*$response.provachain1.1.1  }

    I hope this helps.



  • Yes, I'm using the 2016 version. It worked, thank you! I used $x*$response.provachain1.1.1 in the response area, where $x=4; was defined as the only line of the algorithm. Good to know also that it is wrong to consider the (addable by the user) field "id" from "Information Fields" as equivalent to the "id" appearing in the source, which is not the case.


Log in to reply