Moodle

Implement parser with standard spreadsheet syntax

Details

  • Type: Sub-task Sub-task
  • Status: Closed Closed
  • Priority: Critical Critical
  • Resolution: Fixed
  • Affects Version/s: 1.9
  • Fix Version/s: 1.9
  • Component/s: Gradebook
  • Labels:
    None
  • Affected Branches:
    MOODLE_19_STABLE
  • Fixed Branches:
    MOODLE_19_STABLE

Description

See http://docs.moodle.org/en/Development:Grades#Calculated_grade_items

We need a function that can parse a calculation string like

(SUM(forum2, code444, quiz44) / 3) + 40

and apply it to all the grade_grades_final values for the grade_items references, returning an array of results.

Activity

Hide
Petr Škoda (skodak) added a comment -

I think I have found a suitable BSD licensed PHP library
The attached package contains a nice sample code.

Show
Petr Škoda (skodak) added a comment - I think I have found a suitable BSD licensed PHP library The attached package contains a nice sample code.
Hide
Martin Dougiamas added a comment -

Nice bit of code! We just need to make sure we can use Spreadsheet syntax in there ....

Show
Martin Dougiamas added a comment - Nice bit of code! We just need to make sure we can use Spreadsheet syntax in there ....
Hide
Petr Škoda (skodak) added a comment -

should be usable now, error messages are not localized, I expect plain simple "Incorrect formula" for now.

Show
Petr Škoda (skodak) added a comment - should be usable now, error messages are not localized, I expect plain simple "Incorrect formula" for now.

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: