diff --git a/courseware/capa_problem.py b/courseware/capa_problem.py index 4db0ab89a8..a63433d1af 100644 --- a/courseware/capa_problem.py +++ b/courseware/capa_problem.py @@ -138,15 +138,22 @@ class LoncapaProblem(): return correct_map def handle_schem(self, element): - height = 480 - width = 640 + print element + height = element.getAttribute('height') + width = element.getAttribute('width') + if height=="": + height=480 + if width=="": + width=640 self.lid+=1 id=str(self.gid)+'_'+str(self.lid) - html='' - - return html.format(height=height, width=width, id=id, value="") + html='' + html = html.format(height=height, width=width, id=id, value="") + print html + + return html def grade_schem(self, element): return "correct" diff --git a/courseware/static/js/schematic.js b/courseware/static/js/schematic.js index 6687c98007..903a678973 100644 --- a/courseware/static/js/schematic.js +++ b/courseware/static/js/schematic.js @@ -100,7 +100,7 @@ function Schematic(input) { this.status_div.style.position = 'absolute'; this.status_div.style.padding = '2px'; this.status_div.style.backgroundColor = element_style; - this.status = document.createTextNode('Wow, schematic entry all in javascript!'); + this.status = document.createTextNode('Ready.'); this.status_div.appendChild(this.status); this.connection_points = new Array(); // location string => list of cp's