Moodle

Output a standard set of config variables into JavaScript on every page

Details

  • Type: Sub-task Sub-task
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 2.0
  • Fix Version/s: 2.0
  • Component/s: Libraries
  • Labels:
    None
  • Affected Branches:
    MOODLE_20_STABLE
  • Fixed Branches:
    MOODLE_20_STABLE

Description

Mahara report they do this with good effect. http://moodle.org/mod/forum/discuss.php?d=106312#p468251, and it is needed for MDL-16671.

Activity

Hide
Tim Hunt added a comment -

Currently we just have

'wwwroot' => $CFG->httpswwwroot, // Yes, really.
'pixpath' => $CFG->pixpath,
'modpixpath' => $CFG->modpixpath,

Show
Tim Hunt added a comment - Currently we just have 'wwwroot' => $CFG->httpswwwroot, // Yes, really. 'pixpath' => $CFG->pixpath, 'modpixpath' => $CFG->modpixpath,
Hide
Matt Gibson added a comment -

Hi Tim,

this looks to be very useful. How do I add another variable(s) to the list on a particular page - can it be done e.g. by feeding an array into a particular function?

Show
Matt Gibson added a comment - Hi Tim, this looks to be very useful. How do I add another variable(s) to the list on a particular page - can it be done e.g. by feeding an array into a particular function?
Hide
Tim Hunt added a comment -
Show
Tim Hunt added a comment - Have you read http://docs.moodle.org/en/Development:JavaScript_guidelines ?
Hide
Matt Gibson added a comment -

I did read that when you first put it up but must have forgotten what was in it. Getting old :s Thanks for the reminder.

Show
Matt Gibson added a comment - I did read that when you first put it up but must have forgotten what was in it. Getting old :s Thanks for the reminder.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: