forked from deraadt/Moodle-block_progress
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmodule.js
More file actions
18 lines (16 loc) · 754 Bytes
/
Copy pathmodule.js
File metadata and controls
18 lines (16 loc) · 754 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
M.block_progress = {
progressBarLast: new Array(),
init: function (YUIObject, instances, users) {
for (instance = 0; instance < instances.length; instance++) {
for (user = 0; user < users.length; user++) {
this.progressBarLast[instances[instance] + '-' + users[user]] = 'info';
}
}
},
showInfo: function (instance, user, id) {
var last = this.progressBarLast[instance + '-' + user];
document.getElementById('progressBarInfo' + instance + '-' + user + '-' + last).style.display = 'none';
document.getElementById('progressBarInfo' + instance + '-' + user + '-' + id).style.display = 'block';
this.progressBarLast[instance + '-' + user] = id;
}
};