From: cap2501 Date: Sun, 8 Oct 2006 21:24:38 +0000 (+0000) Subject: added main.getString function to better emulate php-moodle. In the future this could... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=2fb6deb5747fa8f7c96d47778f8929fa98ac3ce6;p=moodle.git added main.getString function to better emulate php-moodle. In the future this could be extended to dynamically pull strings from moodle.php. --- diff --git a/lib/ajax/ajaxcourse.js b/lib/ajax/ajaxcourse.js index 88b5f717c6..2cf7aa8b86 100644 --- a/lib/ajax/ajaxcourse.js +++ b/lib/ajax/ajaxcourse.js @@ -210,6 +210,11 @@ main_class.prototype.update_marker = function(newMarker){ this.connect('post','class=course&field=marker',null,'value='+this.marker.sectionId); } +main_class.prototype.getString = function(title,variable){ + if(this.portal.strings[title]) + return this.portal.strings[title].replace(/_var_/,variable); + } + var main = new main_class(); function php_portal_class(){