From 2fb6deb5747fa8f7c96d47778f8929fa98ac3ce6 Mon Sep 17 00:00:00 2001 From: cap2501 Date: Sun, 8 Oct 2006 21:24:38 +0000 Subject: [PATCH] added main.getString function to better emulate php-moodle. In the future this could be extended to dynamically pull strings from moodle.php. --- lib/ajax/ajaxcourse.js | 5 +++++ 1 file changed, 5 insertions(+) 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(){ -- 2.39.5