From 972fed2e44a038fa4d7f2eda9c86a18efed98b44 Mon Sep 17 00:00:00 2001 From: Calen Pennington Date: Fri, 8 Mar 2013 09:15:27 -0500 Subject: [PATCH] Set position just-in-time when rendering sequences for the first time --- common/lib/xmodule/xmodule/seq_module.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/common/lib/xmodule/xmodule/seq_module.py b/common/lib/xmodule/xmodule/seq_module.py index db8171e945..bca7dbfed9 100644 --- a/common/lib/xmodule/xmodule/seq_module.py +++ b/common/lib/xmodule/xmodule/seq_module.py @@ -75,6 +75,11 @@ class SequenceModule(XModule): raise NotFoundError('Unexpected dispatch type') def render(self): + # If we're rendering this sequence, but no position is set yet, + # default the position to the first element + if self.position is None: + self.position = 1 + if self.rendered: return ## Returns a set of all types of all sub-children