]> git.mjollnir.org Git - moodle.git/commitdiff
added main.getString function to better emulate php-moodle. In the future this could...
authorcap2501 <cap2501>
Sun, 8 Oct 2006 21:24:38 +0000 (21:24 +0000)
committercap2501 <cap2501>
Sun, 8 Oct 2006 21:24:38 +0000 (21:24 +0000)
lib/ajax/ajaxcourse.js

index 88b5f717c65830604fef1d06fc2d46e6552cb798..2cf7aa8b867dbfc33b0038307e67ed40d3d39e80 100644 (file)
@@ -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(){