From e3e661a20a97d22f02cdde439832fe0475bf3c55 Mon Sep 17 00:00:00 2001 From: sam_marshall Date: Thu, 21 Aug 2008 16:03:13 +0000 Subject: [PATCH] MDL-15498: Completion system: tweak so that AJAX version correctly updates alt, title of manual completion icons --- course/completion.js | 7 ++++++- course/view.php | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/course/completion.js b/course/completion.js index 3471f5d8daf..67480482583 100644 --- a/course/completion.js +++ b/course/completion.js @@ -1,4 +1,5 @@ -var completion_strsaved; +var completion_strsaved, completion_strtitley, completion_strtitlen, + completion_stralty, completion_straltn; var completion_wwwroot; function completion_init() { @@ -41,9 +42,13 @@ function completion_handle_response(o) { // Change image if(this.otherState==1) { this.image.src=this.image.src.replace(/n\.gif$/,'y.gif'); + this.image.title=completion_strtitley; + this.image.alt=completion_stralty; this.otherState=0; } else { this.image.src=this.image.src.replace(/y\.gif$/,'n.gif'); + this.image.title=completion_strtitlen; + this.image.alt=completion_straltn; this.otherState=1; } // Start animation diff --git a/course/view.php b/course/view.php index 264ff2166cc..56ad16ca380 100644 --- a/course/view.php +++ b/course/view.php @@ -201,7 +201,12 @@ // Need to do this after the header because it requires the YUI stuff // to be loaded already print ''. - ''; + ''; } // Course wrapper start.