From ef572665e9cb91c58eab53e73f78dfd6aeb75ca4 Mon Sep 17 00:00:00 2001 From: Damyon Wiese Date: Thu, 4 Jul 2013 13:20:01 +0800 Subject: [PATCH] MDL-40308: Fix javascript for lti mod_form It was toggling the state of the hidden input - not the checkbox. --- mod/lti/mod_form.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/mod/lti/mod_form.js b/mod/lti/mod_form.js index 117dbf4c2ab..ace191a459d 100644 --- a/mod/lti/mod_form.js +++ b/mod/lti/mod_form.js @@ -190,12 +190,10 @@ var setting, control; - // Can't look these up by ID as they seem to get random IDs. - // Setting an id manually from mod_form made them turn into text boxes. var privacyControls = { - sendname: Y.one('input[name=instructorchoicesendname]'), - sendemailaddr: Y.one('input[name=instructorchoicesendemailaddr]'), - acceptgrades: Y.one('input[name=instructorchoiceacceptgrades]') + sendname: Y.one('#id_instructorchoicesendname'), + sendemailaddr: Y.one('#id_instructorchoicesendemailaddr'), + acceptgrades: Y.one('#id_instructorchoiceacceptgrades') }; // Store a copy of user entered privacy settings as we may overwrite them