mirror of
https://github.com/moodle/moodle.git
synced 2025-07-23 23:31:58 +02:00
MDL-21535 adding missing M.util.in_array
This commit is contained in:
@@ -46,6 +46,15 @@ M.util.create_UFO_object = function (eid, FO) {
|
||||
UFO.create(FO, eid);
|
||||
}
|
||||
|
||||
M.util.in_array = function(item, array){
|
||||
for( var i = 0; i<array.length; i++){
|
||||
if(item==array[i]){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Init a collapsible region, see print_collapsible_region in weblib.php
|
||||
* @param {YUI} Y YUI3 instance with all libraries loaded
|
||||
|
Reference in New Issue
Block a user