Note: You are currently viewing documentation for Moodle 2.8. Up-to-date documentation for the latest stable version of Moodle may be available here: Game Logic in Moodle advanced editor xml json.

Game Logic in Moodle advanced editor xml json

From MoodleDocs

rules / triggers = following 3 combined,

  1. on = event
  2. if = condition
  3. do = actions

(ECA = event, condition, actions)

XML

simple enough just a naming scheme.

  1. <trigger>
    1. <event>
      1. </click_mouse>
    2. </event>
    3. <condition>
      1. </left_click>
      2. </submit_button>
    4. </condition>
    5. <actions>
      1. </send_event>
      2. </check_form>
      3. </submit_grade>
    6. </action>
  2. </trigger>

ECA alone is not enough

https://github.com/bobthecow/Rule it is ability to create sentences and in that XML needs common way to relay that information between 2 different software packages.

  1. creation of a sentence structure ((an additional XML standard / Json standard))
    1. example: if X in WHAT are GOOD (X, WHAT, GOOD) defined variable types.
  2. define the variable / array or like, within the sentence. ((additional standards)) based on simple int, float, array,
    1. X = single variable (not an array)
    2. WHAT = needs to be in either text, or number or like for (X). and it needs to be an array
    3. GOOD = a select option of "bad, good, excellent" options. and needs to be assigned either a variable text type, or a variable text type, with "int" look up option.

wants in xml / json

I need the defining of above sentence structures, and variable types (array, int, text, etc...) in xml / json / php so that. as i load up an ativity within moodle. moodle looks at the activity sees the activity has a "ECA" and can pull from the ECA a list of....

  1. rules = <rules></rules>
  2. events = <events></events>
  3. conditions = <conditions></conditions>
  4. actions = <actions></actions>
  5. sentence structures = <sentence></sentence>
    • note sentences can be made up of multi sentences, <sentence><sentence><sentence></sentence><sentence></sentence></sentence></sentence> to create a larger better noted sentence
    • note a sentence needs to be defined if it is a "event sentence", "condition sentence", "action sentence"
  6. variable types
    1. int = <int></int>
    2. array = <array></array>
    3. text = <text></array>
    4. float = <float></float>
    5. etc...

advancing wants

i also need. each software to describe itself, in that it supports ECA coming into it, and going out of it. ((1 way going into it, 1 way going out of it, or both))

  1. if say a game supports ECA and has a interface to pull in ECA from moodle. then it should be able to call up moodle framework ECA, and load up all the sentence structures, events, conditions, actions, variable types.
    1. advancing further. this might allow some game creator, to setup some options within game of a player/student beating up some monsters. and being able to pull resources in from moodle. for type of monsters. and how the monsters reacted. if player/student levels up, when doing say a spelling game, then i should be able to adjust stuff from moodle side, for words, and connect to something at moodle side for when so many words were spelled correctly. and then update some skill levels else were.

to note it, when i say game. i do mini learning games, another regular enterainment games, but also a build up towards ITS (intelligent tutoring systems) for a more automatic selection and adjust to student. learning styles.