diff --git a/runestone/assess/js/timed.js b/runestone/assess/js/timed.js index d82360933..f98c9eae1 100644 --- a/runestone/assess/js/timed.js +++ b/runestone/assess/js/timed.js @@ -54,6 +54,10 @@ Timed.prototype.init = function (opts) { if ($(this.origElem).is("[data-no-timer]")) { this.showTimer = false; } + this.fullwidth = false; + if ($(this.origElem).is("[data-fullwidth]")) { + this.fullwidth = true; + } this.running = 0; this.paused = 0; @@ -105,6 +109,13 @@ Timed.prototype.renderTimedAssess = function () { Timed.prototype.renderContainer = function () { this.assessDiv = document.createElement("div"); // container for the entire Timed Component + + if (this.fullwidth) { + // allow the container to fill the width - barb + $(this.assessDiv).attr({ + "style": "max-width:none" + }); + } this.assessDiv.id = this.divid; this.timedDiv = document.createElement("div"); // div that will hold the questions for the timed assessment this.navDiv = document.createElement("div"); // For navigation control diff --git a/runestone/assess/timedassessment.py b/runestone/assess/timedassessment.py index f7429ccf0..329663b4a 100644 --- a/runestone/assess/timedassessment.py +++ b/runestone/assess/timedassessment.py @@ -47,6 +47,11 @@ def visit_timed_node(self, node): node.timed_options['notimer'] = 'data-no-timer' else: node.timed_options['notimer'] = '' + + if 'fullwidth' in node.timed_options: + node.timed_options['fullwidth'] = 'data-fullwidth' + else: + node.timed_options['fullwidth'] = '' res = TEMPLATE_START % node.timed_options self.body.append(res) @@ -59,7 +64,7 @@ def depart_timed_node(self,node): #Templates to be formatted by node options TEMPLATE_START = ''' -