28 Commits

Author SHA1 Message Date
Stefan Erlachner
b1f2b4fdfc MDL-64414 lib/evalmath: add AND, OR functions to evalmath 2018-12-18 09:40:29 +01:00
Juan Pablo de Castro
6aa8a3b6d0 MDL-14274 lib/evalmath: support of conditional math in formulas.
- Comparison operators >, ==, <, <=, >=
- "if(condition, valueiftrue, valueif false)" function.

(amended to keep non-related lines unmodified - whitespace & indent)
2018-06-26 10:25:44 +02:00
David Monllao
9e313e798f MDL-51784 general: Adding missing php4 style constructors
Adding them to warn people calling the php4 constructor.
2015-12-11 14:02:42 +08:00
Marina Glancy
c4d0b752a2 MDL-51784 various: use __construct() for PHP7 compatibility 2015-12-11 12:48:24 +08:00
Tim Hunt
4efc3d4096 MDL-33911 lib/evalmath: fix strict syntax notices 2012-06-20 13:48:37 +01:00
Andrew Davis
eb9f06f9c1 MDL-29173 grade: altered the definiton of round() in /lib/evalmath/evalmath.class.php 2012-05-29 16:38:42 +07:00
Jamie Pratt
1e257a3a54 NOBUG if we are going to reuse the functions used within the evalmath code then
the calling api should not be weird with reversed parameters etc.
2011-06-30 17:50:05 +01:00
Jamie Pratt
9085134ed7 MDL-27659 "have evalmath accept numbers expressed with scientific
notation"
2011-06-30 17:49:49 +01:00
jamiepratt
e2beee5880 NOBUG move pattern for func and var names into a static var and make a function to test a string to see if it is a valid func or var name. 2011-06-30 17:49:01 +01:00
Jamie Pratt
f271a66776 NOBUG added floor, ceil and round to evalmath.class.php and added
tests.
2011-06-23 12:33:40 +01:00
Jamie Pratt
950dc9145b NOBUG implemented seeding of 'random' functions. 2011-06-23 12:33:38 +01:00
jamiepratt
6efaec1e15 NOBUG move function definition is_valid_var_or_func_name above 'HERE
BE INTERNAL METHODS' line.
2011-06-23 12:33:36 +01:00
jamiepratt
06329db453 NOBUG updated readme file with changes made to code 2011-06-23 12:33:34 +01:00
jamiepratt
13264f3505 MDL-27162 "localize strings in mathslib" needed to add mathslib file
to list of core language files in moodlelib.
2011-06-23 12:33:32 +01:00
jamiepratt
94a67b3992 Make changes in functionality, originally implemented by Petr to make
maths class suitable for use in grade book, dependent on boolean
switches in constructor which default to having the changes 'on'.
2011-06-23 12:33:30 +01:00
jamiepratt
c4f7eecfc5 MDL-27139 "mathslib used by gradebook incorrectly evaluating
expressions" simple fix needed to prevent problem with operator
following expression with no operands such as pi().
2011-06-23 12:33:28 +01:00
Petr Skoda
c4f710a9a8 fixed spelling typo 2010-09-18 10:21:09 +00:00
Petr Skoda
6f5e085205 MDL-20700 coding style cleanup - cvs keywords removed, closign php tag removed, trailing whitespace cleanup 2009-11-01 16:48:45 +00:00
skodak
8a1682bf1a fixed typo 2009-05-21 12:21:43 +00:00
sam_marshall
e5e2fc0599 MDL-18051: Fixed errors in evalmath when using grade expressions that begin with bracket 2009-05-21 11:54:43 +00:00
tjhunt
aaa6ac6f2a MDL-12512 - Gradebook calculations are broken. This was caused by == FALSE that should have been === FALSE deep in the 3rd pary maths lib. Merged from MOODLE_19_STABLE. 2007-12-10 17:37:14 +00:00
skodak
d3f24f5534 fixed short php tag 2007-09-20 12:26:58 +00:00
skodak
b8ff92b66b MDL-9137 various grading improvements
1/ initial support for migration of old grade_items and categories (not tested)
2/ rewritten grade update and calculation logic
3/ initial support for calculation formulas
4/ minor API refactoring and cleanup
5/ various small bugfixes
6/ fixed use of grademax with scales
7/ fixed some unit tests

TODO:
* implement proper locking of grades - needs discussion
* force recalculation of all formulas after adding/removing/changing of grade items
* better delete flag support
* support for NULLs n backup - Eloy already proposed a solution
* support for NULLs in set_field()
* speedup
* more unit tests nd functional tests
2007-06-18 13:43:40 +00:00
skodak
7458bee224 MDL-9643 some more polishing 2007-05-26 12:59:13 +00:00
skodak
8bbb7e471e MDL-9643 removing the sample files, use our unit tests instead 2007-05-25 06:54:48 +00:00
skodak
ffaa6c4abd MDL-9643 mathslib.php library, unit tests, removed e and pi constants 2007-05-25 06:50:09 +00:00
skodak
2d53fa5031 MDL-9643 evalmath library improvement - sample calc functions 2007-05-25 06:07:45 +00:00
skodak
0b5f7f5948 MDL-9643 evalmath library import - tweaks and wrapper class ahead 2007-05-24 19:12:18 +00:00