# Global Moderators

Forum wide moderators

### Member List

 Anatoly S sperera swinkler M mfioravera
• RE: H5p elements integrated in HTML5 question

Hi Meta,

It seems that they have an iframe embedder feature, so it's pretty much copy-paste of their source code into source code of a Mobius question. I've attached a TA question with one of their demos as an example: Example.zip

Cheers,
Anatoly

posted in Need help? Ask here!
• RE: Grading equations in a specific form

@mrs.sarah.chan

Hi!

If you're comfortable with Maple programming language, you can try 'inert form'. It will allow you to grade student response in its original form, without simplifications. Click here for an example.

Alternatively, you can convert the response to "string" and use string tools to check if the expression contains (the right number of) brackets, this should allow you to identify the expression type. I'm thinking alongs the lines of: student answer is equal to the correct answer AND the number of "(" brackets is right.

With regards to "y=" part. It's hard to say without the actual grading code. You could try to pull the the equation apart with use of lhs and rhs commands. For example,  "y= a + b"  would give you "y" and "a+b" respectively. This should allow you to grade equation in two parts without equation comparisons.

When assigning variable names to the equations (Maple syntax) I often forget to use ":", for example: "my_equation = y = a+b" instead of "my_equation := y = a+b". This  leads to similar error messages.

Good luck!

Anatoly

posted in Question Creation
• Fix HTML blank issues in TA/Mobius translations

MapleTA and Mobius sets the UI language based on the browser locale: language. For example Firefox set to French, will show TA/Mobius interface in French.

Issue: the unanswered HTML blank set the variable response to "No answer", but! it gets translated

function setFeedback(response, answer){
if (response == "No answer" && answer == null) {
/* not yet attempted  */
run([], 1);
} else if (answer == null) {
/* previously attempted */
run(response, 2);
} else if (answer != null) {
/* show correct answer in the gradebook */
}
};


Fix:

function setFeedback(response, answer){
var translations = ["No answer","Sin respuesta", "未解答", "Aucune réponse", "Keine Antwort", "Καμία απάντηση", "Nessuna Risposta", "解答なし", "답변 없음", "Brak odpowiedzi", "Sem resposta"];
if (translations.indexOf(response) >= 0 && answer == null) {
/* not yet attempted  */
run([], 1);
} else if (answer == null) {
/* previously attempted */
run(response, 2);
} else if (answer != null) {
/* show correct answer in the gradebook */
}
};


Some background for this:

HTML blank has the following states:

• Assignment: not answered, first attempt
• Assignment: not answered, not the first attempt (student browsed to a different question and came back)
• Assignment: answered, not the first attempt (student browsed to a different question and came back)
• Preview: not answered, first attempt

App can determine the state using the following variables:

• interactiveMode
• response

interactiveMode is true when question is either opened in the assignment or in the preview.

response is either “No answer” (and translations), null or whatever your app returns with getResponse(). response is set to null when app is opened in the grade book to show the correct answer. In all other cases it's either "No response" (or translation) or whatever was previously returned with getResponse(). In the assignment, response is initialized with “No response” both on the first attempt as on every revisit of the question as long student didn’t interact with the app causing getResponse() to be called.

answer is either null or whatever is set in the Correct-field of the blank.

In the gradebook app is run twice, one for the left and one for the right pane. Apps are run in two separate iframes and cannot be interconnected easily.

posted in Quick Code Snippets
• RE: Writing good grading code

This second worksheet especially focuses on grading partial fractions and also teaches how partial grading in this case can be done.

This version was updated [01.12.2017,19.04] and now also works for Maple2017. The former version was just working correctly for Maple 2016.

posted in Best Practices
• RE: Automatic logoff settings

By default, Maple TA is configured to log out the user after 30 minutes of inactivity. Browsing through and answering questions, clicking on "Verify" etc. will reset it back to 30 minutes.
The pop-up appears after 25 minutes of inactivity, clicking on "extend session" during the next 5 minutes will reset it back to 30 minutes as well. If the user is too late and clicks "OK" past 30 minutes mark, Maple TA will redirect to the login page.
If one single question takes more than 30 minutes to solve on paper and causes Maple TA log out in the mean time, I would strongly suggest to split it up into multiple parts (multiple questions or multiple verify sections within one single question). Not because of the logout issue, but because it will give you a better insight on the student's ability and provide you with more flexibility on partial grading.

posted in System Administration
• RE: Using *.mla repositories in MathApps

Usage of libraries in MathApps has been determined to be a security concern is no longer allowed on the hosted instances. If you're working on self-hosted (university hosted) instances, then this can be overridden by:

1. Stop Tomcat
2. Open <Tomat>/webapps/maplenet/WEB-INF/classes/maplenetserver.properties
3. Find definition of kernel.localhost.program_args
4. Add the following to the end of the definition (w/o quotes):
“—secure-read=<MapleTA10>/maple/records/…” where <MapleTA> is full path to your MapleTA installation folder.
5. Start Tomcat.

I hope this helps!

posted in Question Creation
• RE: Question chaining

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. posted in Question Creation • Maple-graded code for list [1,2] Problem: evalb($ANSWER = $RESPONSE)  with$ANSWER set as [-1, 0.5] , grading code will return 0 when student answers it as [-1, 1/2].

The reason for this is "evalb()". It performs a single, cursory comparison, therefore:

evalb( 0.5 = 1/2 );      # returns 1 or true, because it's one step operation
evalb( [0.5] = [1/2] );  # returns 0 of false, because it's a two step operation
evalb( [0.5] = [0.5] );  # returns 1 or true, because it's one step operation


Solutions:

evalb( simplify( $ANSWER -$RESPONSE = [0.,0.] ) );  # 'quick and dirty'


or

andmap(evalb, ~[=]($ANSWER,$RESPONSE));        # Maple "export" notation


or

andmap(evalb, $ANSWER=~$RESPONSE );                               # alternative notation
posted in Quick Code Snippets