Algebra and Formula qtypes

Algebra and Formula qtypes

by Godfrey Sovis -
Number of replies: 27

I am using Moodle 3.1.2 version. I know that Algebra and Formula qtypes are compatible with Moodle 3.0.

I like to try to use them with Moodle 3.1.2.

Is there anybody who has tried and succeeded using them with Moodle 3.1.2 ?

If so, could you kindly post some sample questions or send me the thread if you find any samples?

Thanking you in advance. Sovis

Average of ratings: -
In reply to Godfrey Sovis

Re: Algebra and Formula qtypes

by Bernat Martinez -

Dear Sovis, 

We at Compass project are developing  formulas questions for STEM subjects using M31.2

Now we are preparing some learning samples  for formulas-newcomer teachers at 

 login as teacher/teacher


You could test some of these questions at your own Moodle, otherwise we could provide access to our server as editing teacher.

Bernat

Average of ratings: Useful (2)
In reply to Bernat Martinez

Re: Algebra and Formula qtypes

by Marcus Green -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

I just went through some of the questions using an Android phone, (Motorola G4) and it looked good. I was curious as to why you were not using the STACK question type as well.

In reply to Marcus Green

Re: Algebra and Formula qtypes

by Bernat Martinez -

We tend to use a practical point of view, our principle is trying to use the minimum of resources. Just a plugin (formulas) and a filter (JSXGraph)

So the main reason is that we are trying to develop Moodle materials for primary and lower secondary schools, for this I think we have enough with formulas, as at this level it does "almost"  the same  than STACK with less effort. To install a MAXIMA server will require a higher  technical knowledge, which is not usual in school settings.

I acknowledge than at upper secondary and university level STACK is clearly superior.

 

In reply to Bernat Martinez

Re: Algebra and Formula qtypes

by Marcus Green -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

Do you think your target audience could deal with the question creation interface of STACK if the Maxima/GnuPlot setup was eased (or effectively vanished).

In reply to Marcus Green

Re: Algebra and Formula qtypes

by Bernat Martinez -

I can't answer the question, as it is long time since I have used STACK, it was with Moodle1.9, and I think it has have evolved 

Anyway I guess that the procedure to create questions is somewhat easier with formulas

In reply to Bernat Martinez

Re: Algebra and Formula qtypes

by Godfrey Sovis -

Dear Sir, I am having problems with question 5 in quiz 1: "FORMULAS as CALCULATED question. I am not getting the ordered pairs as numbers. I have attached the xml file of the question. Kindly,have a look when you are free. Thanks

.


In reply to Godfrey Sovis

Re: Algebra and Formula qtypes

by Bernat Martinez -

I'm very sorry  there is a mistake in the example

it should be 

({a},{b}) + ({c},{d})=({_0},{_1})

variables always inside {}

In reply to Bernat Martinez

Re: Algebra and Formula qtypes

by Godfrey Sovis -

Hi Sir, Is it possible to remove unnecessary spaces from the answer string of this question?


I have attached the question file  here. Thanks in advance.

In reply to Godfrey Sovis

Re: Algebra and Formula qtypes

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Which spaces do you think are unnecessary?

In reply to Tim Hunt

Re: Algebra and Formula qtypes

by Godfrey Sovis -

Hi Sir Tim,

Thanks so much.

When a student tries  the question (3x + 5y)(4x + 2y) he/she may tend to insert 12x^2+26xy+10y^2 as the answer without spaces between the terms. But the question accepts only answer string  "2 x^2 + 26 x y + 10 y^2" ( with spaces between each term) as the correct answer. When I use  the string "12x^2+26xy+10y^2" it gives an error. How can I avoid this error? Thanks again.

In reply to Godfrey Sovis

Re: Algebra and Formula qtypes

by Bernat Martinez -

Please try to avoid empty spaces and use * for multiplication when providing correct answer

In reply to Bernat Martinez

Re: Algebra and Formula qtypes

by Bernat Martinez -

Another thing, system understands "xy" as a new variable, use instead "x*y", I have checked that "x y" works also but use preferably the former.


I have added a new question at the quiz  FORMULAS as CALCULATED question

In reply to Bernat Martinez

Re: Algebra and Formula qtypes

by Godfrey Sovis -

Hi Bernat,

If you don't mind can you explain how did you design FORMULAS as a COMBINED question.

Thanks

Sovis

In reply to Godfrey Sovis

Re: Algebra and Formula qtypes

by Bernat Martinez -

Hi Sorvis,

A combined question use the types described before, check the attachment

Attachment Screen Shot 2016-12-01 at 23.10.28.png
In reply to Bernat Martinez

Re: Algebra and Formula qtypes

by Godfrey Sovis -

Dear Bernat,

Thank you so much. Your tricks are very interesting!

One more thing. Is there a way to calculate Highest Common Factor (H.C.F.) and the Lowest Common Multiple (H.C.F.) of a set of numbers? I want to add fractions with different denominators. I could not find a direct way of doing so in the Documentation. Thanks in advance.

In reply to Godfrey Sovis

Re: Algebra and Formula qtypes

by Bernat Martinez -

Yes both  functions (gcd(), lcm()) work in formulas but before  you have to make a correction in the code, explained here

https://moodle.org/mod/forum/discuss.php?d=336476#p1380879

(We will try to incorporate this to formulas documentation soon)

I have created a new example (teacher/teacher)

FRACTIONS Quiz Edit title

hereis the code for the question




Average of ratings: Useful (1)
In reply to Bernat Martinez

Re: Algebra and Formula qtypes

by Godfrey Sovis -

Dear Sir Bernat,

I was struggling with this problem for few days. At the end I started using a data set. Now that you have resolved the problem, you have opened the gate to a vast number of quiz questions.

Thank you so very much! We are very grateful to you!

Sovis

In reply to Bernat Martinez

Re: Algebra and Formula qtypes

by Jean-Michel Védrine -

Hello Bernat,

I will release a new version of the formulas qtype plugin. My main goal is to modify all help links from the original documentation on code.google.com to the excellent documentation made by Dominic Bauer.

I will incorporate your correction to gcd (missing $) and the fix in variables.php to make gcd and lcm available but I fail to see why it is necessary to add these binary functions to formatcheck.js. I was under the impression that only unary functions had to be listed here (I have used extensively binary functions like min max comb perm in my questions when I used formulas as a teacher without the need to add them here)

I will also explicitly state that this question type is compatible with Moodle versions up to 3.4 and hopefully 3.5.

Thanks a lot for all your work on formulas.

In reply to Jean-Michel Védrine

Re: Algebra and Formula qtypes

by Bernat Martinez -

Hello Jean-Michel,

I'm glad to read you again, you are most welcome, your huge work in improving formulas question type has allowed all of us to create new questions that are didactically effective and engaging for students.

That you are releasing  a new version is very great news, please let me know if I could help you in this endeavour.

As regards to adding the functions to formatcheck.js, I don't remember why I did so,  my intention was to follow your guidelines. Anyway  we could review it at any time.

Wish you the best for the new year 2018

In reply to Bernat Martinez

Re: Algebra and Formula qtypes

by Susan Ware -

Hi Bernat

I really appreciate the work that you have put into the test course at compass for the formula question.

I have created a question and have copied it here (hope that is okay), as I want to be able to have a string in the answer for algebraic.  My question relates to parts 3 and 4.

I want the students to type in a string 'Shares in' (Variable S) and add the company name which is Variable D?

I am at a loss as to how to create this in part 3 of my question?  Your help would be really appreciated. smile

Random Variables:-

B = {500:8000:100};

C = {2:5:1};

E = {5:10:1};

A = {"Horizon Scape, Landscaping", "Green Frog Waste", "Blue Trout Fish Farm"};

D = {"App Creation Company", "Car Company", "Toms Italian Shoe Company", "Ricardo Biscuit Crunch Company"};

S = {"Shares in ", "shares in "};

Credit = {"Increase in fair value of financial assets", "Increase in fair value of financial asset"};

Question Text:-

{A} has {B} shares in {D}.  The shares were purchased for ${C} each and have since changed in value and are trading at ${E}'s per share on the NZX.

Prepare the journal entries to record the change in value to the fair value for the shares in {D}

General Journal 

 {#3} {#1} 
         {#4} {#2}
   
   

 Part 1:-

Part 1 and 2 - number equal to variable H

 What do I enter in Part 3 to get the answer:-

Shares in D  (D being the variable for the company name?)

Thank you again for the work you have put into the test course for the formulae question it was really helpful.

Kind Regards

Sue

In reply to Susan Ware

Re: Algebra and Formula qtypes

by Bernat Martinez -

Hi Sue, 

I think I don't quite understand your question, and I'm not used to deal with financial teaching.

Please could you  attach the formula xml file, then it will be easier for me to help you to build the question. 

Best regards

In reply to Bernat Martinez

Re: Algebra and Formula qtypes

by Susan Ware -
HI Bernat


I have attached the xml file and video thanks for having a look at it for me.

Financial Question


Kind Regards

Sue


In reply to Susan Ware

Re: Algebra and Formula qtypes

by Bernat Martinez -

Hi Sue, 

I have made some attempts to improve the question. One uses place holders, the other a list.

Sorry  for my lack of knowledge of financial issues, I left them in a basic layout.

Anyway I recommend you to start with the simplest question (not many variables) , later to make it complex wink

You may find them attached and  see them at

http://moodle.compasspro.eu/mod/quiz/view.php?id=449

Best regards


Average of ratings: Useful (1)
In reply to Bernat Martinez

Re: Algebra and Formula qtypes

by Susan Ware -

HI Bernat

Thanks so much for the work on the file - I was able to make some progress forward with it.  

In the test course that you have developed for the formula question are you able to put in the question creation for the cloze type question - thanks.

I have stumbled across another issue where the part of the question ie part 8 changes the placeholder number randomly in the part - which of course makes the answers incorrect.

I have attached a question file so that you can see what I am meaning.  All the parts were set to placeholders with the same number ie part 1 = #1, part 2  = #2, part 12 = #12 etc.  I have renumbered the parts several times - however they do not seem to stay as part 1 = #1 etc.

I am guessing that if the parts are larger than a certain number then the placeholder part does not work correctly????

Hope you can shed some light on this - thanks again




In reply to Susan Ware

Re: Algebra and Formula qtypes

by Bernat Martinez -

Hi Sue, 

Formulas reorders the place holders  in the part layout following the order they appear in the HTML version of the question, see attach.

So you should have to adapt to this imposed order

Attachment Screen Shot 2017-04-23 at 11.44.04.png
In reply to Susan Ware

Re: Algebra and Formula qtypes

by Jean-Michel Védrine -

I will try to explain how it should work:

The placeholder inside a part should never change, it will always stay as you have typed it, and so the placehoder is tied to the answer (or answers of the part if the part has several answer boxes associated)

But the order of the part can change because as Bernat says when the question  is saved after editing parts will be reordered to be in the same order that they appear in the question text. This simplify the code a lot when displaying the question text.

And also the part's order can change when questions are included in a backup and latter restored. 

But only the order of the parts when you edit the question can change. The place where the parts appear in the question should never change and should always stay the same.

I know the situation is not perfect but it was the only solution to a real problem : the formulas parts can use placeholders or not (very very bad idea in my opinion) and if a part don't have a placeholder it will appear at the end of the question text. 

How to ensure that parts without a placeholder will always appear in the same order at the end of the question ? 

The original code of the formulas for Moodle 1.9 was buggy and order of the parts whithout a placeholder could be completely destroyed by a backup/restore or in other circumstances. I modified the code introducing a number (partindex) created when a part is first saved (and never displayed to the user) to know how to place parts without a placeholder.

According to my tests this way parts will always appear at the same place in the question text. So I was thinking that the question can never be broken even after export/import or backup/restore.

So it worry me that you say that your questions are broken

But I am quite sure that the placeholder in the part is never changed, it can't happen. I will review my code but I am quite sure of that. 

I tried to look at the example provided but the fact that I know nothing about accounting and also that English is not my native language is preventing me from understanding if there is a bug or not.

Can you provide step by step instructions (very detailed if possible) to see the problem.