]> git.mjollnir.org Git - moodle.git/commitdiff
user selection: Make inserting the search term into lang strings in JavaScript more...
authortjhunt <tjhunt>
Thu, 30 Oct 2008 03:56:48 +0000 (03:56 +0000)
committertjhunt <tjhunt>
Thu, 30 Oct 2008 03:56:48 +0000 (03:56 +0000)
user/selector/lib.php
user/selector/script.js

index e1cdfbb635a9f9e66f69cf396464da4c005a39f0..84a43b7f55feb3ec4b5b1a62a70dfe078142bb26 100644 (file)
@@ -471,8 +471,8 @@ abstract class user_selector_base {
 
         // Initialise the selector.
         $output .= print_js_call('new user_selector', array($this->name, $hash,
-                sesskey(), $this->extrafields, get_string('previouslyselectedusers'),
-                get_string('nomatchingusers')), true);
+                sesskey(), $this->extrafields, get_string('previouslyselectedusers', '', '%%SEARCHTERM%%'),
+                get_string('nomatchingusers', '', '%%SEARCHTERM%%')), true);
         return $output;
     }
 }
index 6850c8f7457262c12e17467d398847b069eb8481..07e33b93b87e43d5084a413101f7a6238abffa81 100644 (file)
@@ -283,7 +283,7 @@ user_selector.prototype.handle_selection_change = function() {
 
 // Methods for refreshing the list of displayed options ========================
 user_selector.prototype.insert_search_into_str = function(string, search) {
-    return string.replace("''", "'" + search + "'");
+    return string.replace("%%SEARCHTERM%%", search);
 }
 
 /**