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 Overview Advanced Editor Research.

Game Logic in Moodle Overview Advanced Editor Research

From MoodleDocs

ITS in moodle and the Advanced Editor

Ryan...I have started to try and summarise this doc......there is a lot there. In part, I am struggling to make connections between all the info...and how a teacher would look at this doc and say...right got it! Can you help me do that? Can you alter the Doc...so that we only have the necessary information that explains:

a) why the ED

b) what can teachers do with it and why it is valuable for their practice in utilising ITS ( I can do this but I need more focused points from you Ryan-tis a little bit all over the shop-and I am trying to fill in the gaps...but failing terribly)

c) at the very bottom of the doc can we have the techy detail.....

I will then have another look at it. Dawn 10/02/2015

The main consideration when selecting an Advanced Editor for this project included our want to ensure simplicity (KISS-keep it simply stupid). An Advanced Editor is accessible for young children, pupils, students and professionals. Essentially, we wanted an Advanced Editor that would afford users an opportunity to transfer/build on their established knowledge, experience and skills; akin to the type of skill-transference we see in users of different office applications such as Microsoft-to Google docs-to Open Office, and likewise when using Atto and Tinymce editors in Moodle- to Wordpad in Windows. They all have a familiar look with buttons that function in similar ways. Therefore, in considering an Advanced Editor, we reasoned, general users are able to switch more easily across such editors due to common features i.e. self-explanatory icons and intuitive design.

Examples

Most of the bigger games out there have some sort of application / tool that allows you to customize and create your own maps, units, characters, quests, skills, and more.

  1. http://www.moodlerooms.com -> personalized learning designer (exclusive to moodlerooms)
    1. TIP: google **moodlerooms personalized learning designer** for images, manual, and other info on it.
  2. warcraft 3 -> world editor
    1. Here are examples of video links revealing a young child creating a TD (tower defense) map.
      1. PART 1 https://www.youtube.com/watch?v=yu3o-yq-jL4
      2. PART 2 https://www.youtube.com/watch?v=wg-CV4x_seU

Discussion surrounding selection of Worldcraft 3 world editor

<quote> | dawn alderson can you spell out to me why you make reference to the worldcraft 3 ed please? </quote>

The basic rationale for the choice of the Worldcraft 3 world editor is that it can be used by teachers with minimum knowledge of programming. Teachers could create custom courses and/or activities / resources in the regular format of moodle, and/or connect with the ITS (intelligent tutoring system) or rather, the child's personalized learning environment. Teachers can extend and customise activities using the editor as if making a custom map, unit, spell, skill, etc compared to that in gaming.

How to use the editor:

Log into course as a "editing teacher" or above. Create or edit a course -> scroll down on the page to "completion and availability options" there is no "if then else" and for each / loop ability that would require something more powerful, but our focus was on KISS (keep it simply stupid).

game editors that i can remember (history of them)... before it was machine code back in dos / windows 3.1 with some basic, qbasic, c, maybe c+? way to long ago. and the need for knowledge of cpu, motherboard and how the exact circuits were created within the computer to achieve anything. as things progressed. folks started creating "config files" files that listed a set of variables. for different enemy units. many games started doing this but each game was a tad different, and structure of variables and what the variables / settings meant were always different. (this really has not changed) as far as i know. what changed after that was moving all the config files into "level editors" were there was more of a user interface. (no actual diving straight into the code and adjusting files), the editor did it all for you. (editing specific files and saving files) some included backup.


then editors started moving away from actual programming... physical getting into game core files to adjust how a game played. and started offering a "pseudo" programming language. extreme basic. but enough to adjust the game itself by over riding or extending the original game code. ((to moodle it would be plugins)), age of empires (series), warcraft 2 / 3, some of the FPS (first person shooter)) games. current online stuff might be https://www.scirra.com/ -> construct 2, or unity3D.

as things progressed editors went from being "external" to being internal. while in the game you could actually adjust how the game played. an external editor example might be... www.opencart.com were you have front end shopping cart website, and then need to goto www.opencart.com/admin to actually put in data (add products, deal with customers etc...), an internal editor would be moodle... going to a course that you are editing teacher or above. and click "turn on editing" and you can change course, activities, resources, blocks, it is all there in same user interface all in the same spot.

gets a little mixed in to current day of things, as game engines and SDK (software development kits), level editors for games advanced. they moved to "drag and drop" and geared directly for a specific niche market per say. and began moving away from pseudo programming language. to straight pre-defining stuff. examples in moodle would be the current activities / resources including third party plugins via www.moodle.org/plugins

review / considerations

at moment... i see moodle missing more of a "pseudo" programming language. it is there some what with completion and availability options. but. it actually does not present actual programming abilities. it is like moodle "skipped" a step. and are in a "on demand" custom creation of plugins via actual programmers. and not bringing the more advanced pseudo language to the folks that need to be able to use it. (content creators / teachers) and at moment it is pushed onto the IT staff.

while i do not personally want to create a game.... younger kids say K to 4th grade. are more picture orientated there is a different style of teaching vs say highschool / collage. and the need to create almost a game style interface and a simplistic game. for the younger students so they learn better.

also my want to create a ITS (intelligent tutoring system) or rather personalized learning environment were students engage in activities / resources more geared for them personally vs a "one size fits all" in idea ITS is kinda of a multi path RPG (role playing game), were folks can take different paths for same end goal in mind.

the differences between above 2 paragraphs. rule out more of a drag and drop interface. of current level editors for games were they are directly geared for a niche market. and needing something a bit more powerful with a broader ability to handle things.

other editors

i did a quick google search on "ontology editors" and not a fan of them as of yet, it may change. they remind me of game level editors, before a "pseudo" language was brought into game level editors. they are way to advanced, multi screens, multi spreed sheet like areas, some drag and drop. and some begin to mimic IDE (integrated development editors) that IT staff / programmers use to edit and program code with. if that type editor was created... then content creators / publishers / editing teachers might as well learn php, html, css, javascript, and learn moodle inside and out.

while above may sound heavy handed against "ontology editors". the simplistic games for younger kids may need a more advanced editor. or something geared more to actual full blown game creation. but even still there is most likely going to need to be some way to interface those games into moodle. so a teacher / publisher / ITS (intelligent tutor system) / personalized learning environment. can adjust the games to suit the specific student. or target market the game is setup for. this interface needs to be "common" not different per game, and this interface needs to be KISS (keep it simply stupid) so a non IT staff person might be able setup a few things. without touching moodle code itself. even if it means. following a short step by step tutorial in how to link stuff up between game and moodle.

some example kongregate, facebook games, windows store games, xbox live games, steam games. disney, list continues... most of these sites offer some basic stuff. that game developers can use. without re-inventing the wheel just for there game. while these things are normally provided in a SDK (software development kit) for the game developers. there is still need for a editing teacher, content creator, etc... to be able to adjust the game to suit a student or group of students. some sort of standardized area to adjust settings. that is not different per game / ITS

another issue

another issue.... ITS (intelligent tutor system) have different so called AI "artificial intelligence" scripts pending on different subject matters, say one for math, one for language, another for history, another for science, etc.. etc.., if a person was to say create an game AI or enemy AI. for a specific style of game play. would they be allowed to drop it into moodle right along side the ITS AI scripts, so someone could take advantage of it. and create there own little game or ITS that mixed them all together? this would not be much different from "expansion packs" for games. were new levels, new areas, new units, etc... are brought into a game to expand on the original game.

bring it all together for the bigger / biggest long term goal

all the various abbreviations CMS, LMS, VLE, clan management, group management, department management. that deal with "management system" need to be handle by a common "management system" and not split out to different management systems with different interfaces and quirks about them. and this is an attempt to bring in and extend moodle management system. and part of that is dealing with an "editor". Were do things actual, start from and can be built from. Other words... what needs to happen first. before other things can be built upon. and were is it headed to, for an overall goal.

at moment. as per this forum thread |"fork 1" of What is "differentiation" and how can it be achieved?. i am researching / brainstorming. in attempt to reach above goal per say. i need a better understanding of overall goal. and needing to dive down into the more niddy griddy. so i can understand what may or may not be needed. and how different things may or may not fit into a specific situation. and at moment. warcraft 3 world editor or some other "advanced editor", is coming down to be what is needed first.before other things can be done.

getting into specifics

Events , Conditions, Actions

http://en.wikipedia.org/wiki/Event_condition_action

  1. Events http://en.wikipedia.org/wiki/Event_(computing)
    1. when you click a mouse button an event happens, and the compter registers this event as you clicking your mouse button.
    2. when you press a letter on keyboard, an event happens, and the computer registers this event as you pressing a specific key on the keyboard
      • in moodle when you click a "submit button" for say a quiz, an event happens letting moodle know you have just submitted an answer for the quiz
      • in moodle when teacher grades an assignment, and a specific answer is wrong, an event happens. tell moodle that this answer is wrong.
      • in moodle real time chat, and someone sends a message, an event happens, of X person sent message
  2. Conditions
    1. a condition might be, are you out of food? yes or no
    2. a condition might be, did you do your home work? yes or no
      • in moodle did student miss any questions? yes or no
      • in moodle did a student complete extra credit question 3? yes or no
      • in moodle did a student complete reading assignment? yes or no
  3. Actions
    1. actions are things you want done
    2. EVENTS student got an F on book report, CONDITIONS, is this student 3rd time getting an F? ACTION send email to teacher and parent, give dates and on what they got F on
    3. above would all be done automatically by computer. in idea we are customizing a game or course or an activity / resource. for things to automatically happen. when certain other things happen.
      • in moodle for personalized learning, action might be display these other activities / resources to student. ((event student missed questions on quiz, conditions, was in science, material was first time given to student without preparation for teacher and student to go through))

why an advanced editor

  1. reliance on having IT staff program in javascript, css, html, php, java, flash, (keep inserting various programming languages).
  2. there be reason why there are different types of skills that make up an overall team. example a school, princiable, front office clearks, different teachers focused in different areas of teaching, IT staff, researchers, etc... each one has a better knowledge / skill set in certain things. instead of forcing teachers to learn all the coding of moodle... how about a more "dumb'ed down version" of a simple event, condition, action system.
  3. the advance editor ((http://www.moodlerooms.com -> personalized learning designer and warcraft 3 -> world editor)) breaks away from knowing programming syntax. how to sue [{( : ;. = == === != + - || !(somevarible)  !(someobject), !(somearray) what a class, function private, public, global information all means. along with what programming language to use and were to put it.
  4. KISS (keep it simply stupid). use "sentences" something like math class instead of presenting 2 + 2 = ? information is presented in a sentence... 2 people plus 2 people = how many people? it gives context to information of what is being done and how it is to be applied. less guess work, more understanding for those folks that are not IT folks / tech folks. and in idea creating a customized game, errr customized moodle school, or customized course, or customized activity / resource.
  5. an advanced editor most likely going to bring in IF / THEN / ELSE, Foreach, Loops, variables, arrays, pretty much what every programming language has out there. but again it hides the syntex and provides information in sentences.

Reasoning

  1. much like how customized maps are created for various games, an "advanced editor" would allow creating customized courses and activities / resources for students. so instead of a "one size fits all" a course can be driven much like a game and catered each individual student. and allow the student to learn at there own pace. and at different difficulties.
  2. a game manufacture does not look at individual cities (or in this case schools) but it looks at overall target market. one school my focus on say pre school children, another may focus on 2 to 5, another 4 through 8, another may have K through 12. for a publisher of school content, teacher, or like, an advanced editor would allow them to more cater to a specific set of kids... in that most games that offer customized maps have different genre of maps. TD (tower defense), RPG (role playing game), story telling, replay an event in history, fantasy. etc... an advance editor. would allow creating of "events, conditions, actions" so if a particular student had 2nd grade reading skill, and 5th grade math skill. the publisher, teacher, or like, could direct certain activities / resources to that student. in such, instead of providing more math.. forcing student to raise there reading skill to improve.

what does Moodle currently have to offer? or possibly have to offer?

  1. currently in version 2.8 (maybe earlier) "event log" was put into place. and plugins wanted to cause an event to happen when ever something happens.
  2. goto some course that you are an EDITING TEACHER or higher in -> "turn on editing" -> create or edit an activity -> scroll down to "completion / availability options"
    1. you may need to turn on "completion" within site admin menu *i forget were specifically at moment*
  3. plugins for moodle currently are required to support a set of given type's of "class" and "functions" and "variables" so the plugin can work with moodle. (grading stuff, sending emails, etc..) would it be possible to use what is there already or additional changes needed? or complete new code and options needed?

UI (user interface) of editor

general layout?

an attempt to figure out the interface and how it might behave. CLICK HERE to edit flow chart. (note need to save edited flow chart and save as picture and then upload picture to media wiki). TIP: it takes around 4 to 5 clicks to see image in full size.

advanceditor1.jpg

another option...CLICK HERE to view/edit flow chart directly.

advanceditor2.jpg

sentence structure

NOTE: this needs to be readjusted see javascript in moodle and then non javascript version... with remarks and links to "ARIA or WAI-ARIA" within the thread. ((other words dealing with disabilities)) it would seem the need to treat things with a "bullet listings" or tree based style of menu, and then use of javascript to obtain below. NOTE to self need to make up some flow chart mockups.

  1. quick sentence
    1. Ryan is a bad teacher
  2. replace (ryan) with a variable, replace teacher with a variable
    1. (student_variable) is a bad (role_variable)
  3. what it looks like in web browser without javascript enabled...
    1. (drop down menu, with user names) is a bad (drop down menu with role names)
  4. if it requires multi selections.. to drill down to user name... example...
    1. www.mysite.com -> my category -> my courses -> enrolled user -> user name
    2. (www.mysite.com ( my category ( my courses ( enrolled user ( (drop down menu, with user names ) ) is a bad (www.mysite.com ( my category ( my courses ( (role names ) )
  5. to above, the want for simply parenthesis ( ) is used no other brackets or like if possible []{}\/<>
    • NOTE: () parenthesis, vs say a css "boxing" vs -> or => i do not care for arrows. and not sure of CSS boxes to show what belongs within what would work out very well. to many overlapping boxes, different colors different dots and lines. (shakes head no) to much extra crud. the want to to keep it to () vs a bunch of different bracket types... is simply ({[ it is down right hard to tell which bracket type is which and there should be no need for a non programmer to try and figure out what a bracket type means, beyond being this item belongs in this area. KISS (keep it simple stupid) and attempt to write out a math equation in sentence form using simple () parenthesis, of what needs to be done first before next . (1 + A ) x (2 - 0.75) / ((3.14 x sqr(2.323)) - 3) = ?
    • note for programming, there needs to be "current course" vs having to drill down from www.mysite.com all the way down to user names.
  6. NO JAVASCRIPT version.. to above...example
    1. (www.mysite.com ( my category ( drop down menu = selected my courses ) ) ) is a bad (www.mysite.com ( drop down menu )
      1. there needs to be an "update" button
  7. WITH JAVASCRIPT version to above... example
    1. (www.mysite.com ( my category ( drop down menu = selected my courses ) ) ) is a bad (www.mysite.com ( drop down menu )
      1. it should automatically change to...
      2. (www.mysite.com ( my category ( my courses ( drop down menu = select something ) ) ) ) is a bad (www.mysite.com ( drop down menu )
      3. there should be no need to do a page refresh, but rather use of javascript to update page.
        1. i would prefer to see reduce amount of AJAX, were all sentence types and variable types for most part are pre-loaded within javascript code, (within reason) SQL / database of course not.
  8. advancing.... text box
    1. would be nice to set to say 2 to 10 characters in length.
    2. not sure if possible if text box auto adjusted to character length
  9. advancing....text area
    1. i would assume there will be some sort of "display to user/s" option. and selection between textbox, or textarea given to input information.
    2. rules (events, conditions, actions) as a site admin menu -> plugins -> filters ? and being able to create rules any place within moodle? meh most likely pushing it to far. leave it for another project.

activities and resources

thinking about layout and ease of access.

  1. it might be nice to "pull" up a list say a drop down menus, that guides person from home page, through categories, through courses, through sections, to activities / resources. listed. and then be able to select a given activity/resource and pull up spec's about it. such as current settings, find out who is in what group, what the title is, what the description is, etc... and be able to use this information with the "rules (events, conditions, events)". for adjusting things.
  2. it might be nice to pull up a list of activities / resources current installed in moodle. and have option to create / edit / delete options within it.

map editor err (turn on editing) within moodle

below was initial under "advanced editor" but have since moved it to "map editor". in many games you have some sort of "map editor" were you can place units, villagers, towns, paths, water, land, mountains, etc... for moodle. all this is categories, courses, meta courses, sections, activities, resources, blocks.

  1. in another way of stating it... "themes" and editing a theme is like a map editor is to a game. though for moodle... splitting up theme from course creation, and adding/editing/deleting sections, activities, resources. is an attempt to dumb it down, i would imagine. to make it easier and less complicated for regular folks to pick things up and use moodle.

course edit page, and activity/resource edit pages

  1. i been debating use of "block/s" to gain access to "advanced editor" setup a mini "tab" or menu within a block. and click back and forth between the tabs. to select what is needed. though i really do not like this idea due to everything so "crunched" up it would be a nightmare at times to adjust things. it may be ok for a few rules (rules = a set of events, conditions, actions). but once you get past that...
  2. inline with given edit pages... for activities / resources it would be much like the "completion / availability" and adding them to current activity/resources. but perhaps a bigger interface?
  3. javascript usage, and being say an admin, and switch between different courses across entire site. were you might have a "window / tab" open for "advanced editor" and being able to drag and drop between tabs of internet browser, to deal with an "advanced editor" might be even better.
    1. hhmsss i suppose what needs to happen. is displaying the "ID" from database entries, of categories, courses, activities / resources in moodle. so someone could access those ID's easily and input them into advanced editor.

GUI (graphical user interface) and mapping out moodle

  1. if drag and drop does not work above. and if ID's get a bit troublesome... then perhaps a "site map" ?
  2. for most part every category, course, section, activity, is a level / area in a game. and at times multi paths lead to same area...
  3. build off of CSS? before shifter/grunt and then -less gets called on the CSS? hhmmss no, that seems like a nightmare already almost.
  4. build off the internet browser DOM? that does not sound right either
  5. build off the "plugin managers" or rather plugin types. and each plugin type is going to need to provide a min amount of detail about it. and when a given plugin for that plugin type is displayed and "turn on editing" is enabled.
    1. i guess something in the "renderer.php" and displaying a "small icon" that you can mouse over and grab a unique identifier of sorts for given thing within moodle. and i am right back to ID's.

programming / code / database

Programming language for editor?

php, html, css, javascript. same as moodle. but... how does taking the sentence struction of the "event, condition, action" translate to php?

  • i am guessing.. case: statements? to deal with if/then/else, foreach/loop notations?
  • i guess main function. that continues to call itself... till there are no more variables / code to proccess? ewww code...

how to handle direct code insert...

  • does person create custom php, javascript, css, and/or html file outside. and then "upload" the files through the editor. and the files get saved into moodledata folder?

sentence structure, and what is out there to create it via php,javascript,html code wise...

looking at

  1. behat = creating automated testing scripts for moodle
    1. not sure if i really care for easy slang term reference that could be made.
    2. the more simpler sentence structure, is something to be lacking. good for test. but not what i am looking for at this time.
  2. moodlerooms learn to design
  3. warcraft 3 world editor
  4. starcraft 2 editor
  5. drupal => rules extension
  6. buisness outcomes

overall, as i set back and think about it. not many games, and no major large games i can think of actually run on php,javascript,css, html, and majority all run on a lower programming language such as C, C++, or like. the nearest thing that comes to mind is drupal -> rules extension. so with that, began looking at sentence structure, and how to create it.....

  1. EXAMPLE 1
    1. I am a bad teacher
    2. ryan is a bad teacher
    3. (mysite.com-> course 106 -> ryan) is a bad teacher
    4. all of (mysite.com) is a bad teacher
  2. if following above... i would need a "variable" that could be replaced with.... I, ryan, (mysite.com-> course 106 -> ryan), all of (mysite.com)
    1. <person_type></person_type> is a bad teacher
    2. were <person_type></person_type> is replaced with <person_type>I</person_type>
    3. were <person_type></person_type> is replaced with <person_type>ryan</person_type>
    4. were <person_type></person_type> is replaced with <person_type>(mysite.com-> course 106 -> ryan)</person_type>
    5. were <person_type></person_type> is replaced with <person_type>all of (mysite.com)</person_type>
  3. EXAMPLE 2 (expanding on above... lets replace "teacher" with a role type.
  4. <person_type></person_type> is a bad <role_type></role_type>
    1. were <role_type></role_type> is replaced with <role_type>student</role_type>
    2. were <role_type></role_type> is replaced with <role_type>teacher</role_type>
    3. were <role_type></role_type> is replaced with <role_type>editing student</role_type>
    4. were <role_type></role_type> is replaced with <role_type>manager</role_type>
    5. were <role_type></role_type> is replaced with <role_type>administrator</role_type>
  5. EXAMPLE 3 combing examples 1 and 2
  6. the ability to set variables, within a sentence... so the sentence reads different...
    1. <person_type>ryan</person_type> is a bad <role_type>teacher</role_type>
      1. ryan is a bad teacher
    2. <person_type>(mysite.com-> course 106 -> ryan)</person_type> is a bad <role_type>manager</role_type>
      1. ryan in course 106 in mysite.com is a bad manager
    3. <person_type>all of (mysite.com)</person_type> is a bad <role_type>student</role_type>
      1. everyone at mysite.com is a bad student.

programming of sentences

  1. if i look at moodle code. (hopefully i do not get this wrong) there are a few "classes in php" were in each plugin they have an option to "class myplugin_extend_navigation {" if i changed it up some... to "class _extend_rules {" a plugin developer could write up some code and define different person_type, or different role_type, or something all together different. and information could be accessed back at moodles global objects?
  2. i am not a fan of XML, to much wasted space and extra letters that i would consider "garbage" vs say JSON format. but XML... gives a better human readable structure of information. i would like to reduce the need to parse over xml and json information. exception when coming in from a third party website possibly. but even then leaving it up to programmer/s to decided what to use between moodle and third party website. if it is possibly to "class _extended_rules" for example it would most likely reduce amount of "conversion" between multi types of how to handle information.

if going with class __extend_rule in thought...

  • object_type = role_type;
  • function ( if(!role_type('student_wisers')) {create_role_type('student_wisers');}
  • role_type = 'student_wisers';
  • sentence_type = action_type;
  • sentence_varibles = (role_type, submit_type);
  • sentence_with_varibles = (a (role_type) submitted a (submit_type);
  • rewrite to include language strings
    • sentence_rendered = get_string ('a',myplugin) + ' ' + role_type + ' ' + 'get_string('submitted_a', myplugin) + submit_type;
  • hhmssss... i suppose the last string of code above. could work... creating actual string in php. i would imagine it would reduce security risk. vs trying to pull in a XML and/or JSON information. i am not sure about rest of the garbage in defining information yet..
  • i guess i need to create a list of sentences, and define them to "event sentence, or condition sentence, or action sentence"
  • advancing further... i am most likely going to need a few more different "types of sentences" example if,then,else, condition and,or,equal to, greater than, less than. along with conversion an array err group of folks, and defining it down to a single or like selection.

location of editor? and more specifically when does it load up

i would imagine i need to make sure all other plugins load up first before ITS does. if not. there could be chance ITS (intelligent tutor system) does not find something it is looking for? so can i place ITS at www.yoursite.com/moodle/its and then find a specific location. after www.yoursite.com/moodle/local finish loading any plugins in it? so as to make sure any overrides in local happen? due to ITS could possibly override everything?

  • making things to complicated... setting at www.yoursite.com/moodle/its/editor and make sure ITS is very last thing to load. so it can over ride anything and everything.

database tables

  • BIG UTH OH.... how to handle custom code? javascript, css, html, ya ok... but custom php code... i really do not want to call a file up in moodledata to be ran. i guess only way i am going to get around it. is creating a "folder" say www.yoursite.com/moodle/its/editor/custom and all custom files errr code go into this folder. a site admin with ftp access going to be about only way to get around this...
    • this should cause admin to hopefully check file for any suspected hacked up info? example game cheats or like.
  1. events (table)
    1. ID (field)
    2. events (field)
  2. conditions (table)
    1. ID(field)
    2. conditions (field)
  3. actions (table)
    1. ID (field)
    2. actions (field)
  4. customfile (table) = customcode in warcraft 3 world editor.
    1. ID (field)
    2. type (field) = not knowing any better, saving file type (js, php, html, css)
    3. customfile (field) = www.yoursite.com/moodle/its/editor/custom = it should have argments to deal with / or \ and the customfile should include any extra folder depths /mycustomai/js/mycustom.js
  5. rule (table) = event condition action
    1. ID (field)
    2. name (field)
    3. event (field) = comma defilemented list of ID's from (events, conditions, actions) tables
    4. conditions (field) = comma defilemented list of ID's from (events, conditions, actions) tables
    5. action (field) = comma defilemented list of ID's from (events, conditions, actions) tables
    6. customcode (field) = comma defilemented list of ID's from (events, conditions, actions) tables
  6. ruletotal (table) = saving a bunch of (event,conditions, actions) together as a common entity.
    1. ID (field)
    2. ruletotal (field) = comma defilemented list of ID's from eca table
    3. ruletree (field) = see below...
  7. ruletree (table) = tree based menu / folder structure to place rules in. ((YIKES i forgot how to build tree based menu with parent/child relationship))
    1. ID (field)
    2. name = name of category within the tree
    3. parentID = if null or 0 = main level
    4. childID
    5. approval = if category requires site admin or like privledges to approve it first.
    6. permission = permission type needed for above approval
    7. role = role type needed for above approval

how to register different things for the editor?

  1. there is going to be need to pull data from every plugin within moodle.
  2. moodle is going to be dynamic, editing teacher creating and adjusting activities / resources including courses to fit students and themselves. and constant changing data from input of students.
  3. if i take above in, then it would be assumed when editor is launched, it will need to dynamic load information from plugins, and other data sets as things change.
  4. issue how do prevent some "evil hacker" from creating a cheat or something harmful? is there need for an approval system? or can roles and permissions assign to each role able to handle things?
  5. is there need to create a database table. to register things? or perhaps a cache item. to allow faster access?
  6. are some things such as plugins, registered during initial install / upgrade / uninstall of plugin?

what information is collected and/or required by a plugin?

need to denote basic programming things...

  1. variable types
    1. int (whole numbers)
    2. float (decimal)
    3. array
      1. database sql to obtain array
      2. function to obtain array
      3. object to pull array info from

security

some evil teacher or student going in and adjusting "events, conditions, actions* so they get an A on there test or by-passing something.

difference between a "event, condition, action" vs a moodle plugin

  1. i would like to think a moodle plugin = more secure. the code can not be easily changed with exception through an administrator that has file access to were moodle files are.
  2. some things are needed to be plugins so everything is pre-scripted already there, select a couple options and ready set, go... while other things might be better off as a "event, condition,action" to override and/or extend functionality.
    1. i specifically choose moodle. vs drupal and/or joomla. drupal everything is kinda of a "event, condition, action", while joomla is all plugins, moodle has kinda of a mix to it. with some better structure.
  3. to state things different. most games have some basic levels / maps that are already there. and then folks can go in and customize the game to some extent. not completely. but enough. i am looking at plugins (what comes with moodle and/or third party plugins) as core stuff that are not easily changed. while "event, condition, action" are the customization / extension of things. granted i say this. and someone will quickly do something else. but that is ok to.

roles and permissions

  1. if you enrol someone in front page of moodle. say as a teacher. they are a teacher in every course in moodle.
  2. if you enrol someone in a category, say math. with courses of grades 1 through 10 in the category. they are assigned as a teacher. they are a teacher in just those 10 courses.
  3. if you enrol someone just in a course as a teacher. they are just a teacher in that specific course.

i would think "events, conditions, actions" would be applied to above type of enrol / permission checks.

  1. if say a teacher in math class, wanted to check a students grade in english class. the teacher would need to be enrolled in both classes. or no go.
  2. if a student is in enrolled in a math class, in science class, gym / PE (physical education), and a "event, condition, action" is looking to pull some information from student about recent activities. then the "event, condition, action" would be allowed to check the "math, science, pe" classes the student was enrolled in.

above checks would be pre coded scripts and some place in a plugin within moodle. and not an actual set of *events, conditions, actions* that would need to be copied into every little thing.

  1. exception to above... an admin, ((already has pure control over system if wanted to)), so with that, an admin could setup *events, conditions, actions* that could override or extend things system wide.
    1. adding to. i can see a teacher downloading some awesome course and/or activity / resource. but it comes with some "events, conditions, actions" that connect into things system wide. for things to work correctly.
      1. i would say those system wide *events, conditions, actions*. would need to be displayed in "RED" with a note of "admin required for approval", once approved they would work. but still not be able to be edited. exception by an admin. or someone that had correct permission to adjust them / approve them.

STUFF TODO

Game_Logic_in_Moodle_Overview_Misc_Links -> advance editor ► business rules engine ► events, conditions, actions need to dig deeper in various rule engines. at moment non of them seem to be a easy... copy/paste into www.yoursite.com/moodle/lib/rules

the following 3 have most promise so far.

  1. https://github.com/hoaproject/Ruler
  2. https://github.com/bobthecow/ruler
  3. https://www.drupal.org/project/rules