maths / moodle-qtype_stack

Stack question type for Moodle
GNU General Public License v3.0
141 stars 150 forks source link

First draft of linearalgebra.mac for the contrib folder. #1148

Closed LukeLongworth closed 4 months ago

LukeLongworth commented 6 months ago

I don't expect this pull request to be accepted right now, I just thought that this would be a better way to solicit feedback than to post an issue. You can see at the bottom of this description a (non-exhaustive) list of things I still want to consider adding to this.

Linear Algebra

This is the first draft of a linear algebra inclusion package. I still have more work I want to do before this reaches version 1.0. Feedback is appreciated! Let me know if I am duplicating existing functionality, if naming conventions could be improved, or generally if I could improve any parts of this. I've solicited specific advice below (and commented in the file itself).

Note that I have written all of this with the expectation that students will be working by hand and as such will be dealing with relatively simple/small matrices. There are files here (e.g. mat_cond2) that probably shouldn't be run on matrices much bigger than 5 by 5, and my hope is that teachers who use this file will be expecting this, as only more experienced users are likely to use contrib packages anyway.

Contains:

Still TODO:

LukeLongworth commented 5 months ago

I have some updates on this.

  1. I have moved my work here and am testing it using stack_include. My ultimate goal is to create a new library of quiz questions for our 200-level engineering linear algebra course which import from this branch as a beta test, and then move linearalgebra.mac to the master branch here at the end of the semester.
  2. I have rather dramatically expanded the number of functions in the other file.
  3. I have reworked the c() and r() notation to avoid annoying error messages. They are now inert functions that can be converted into matrix form using vec_convert, which will return the original expression if the matrices do not conform.

The load times are currently quite long, so I have also created linearalgebra_no_test.mac which has all s_test_case lines to see if this helps. Luckily, after deploying variants, quiz load times seem normal from a student perspective. I assume that stack_include will run all s_test_case lines when saving the question. If so, is this desired behaviour? I have been writing a lot of test cases for functions that weren't written to be very efficient and running all of them at every save doesn't feel ideal.

LukeLongworth commented 4 months ago

This has been superceded by #1185