interval lesson type doesn't respect indexes argument

Bug #1086508 reported by Marten de Vries
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenTeacher
Fix Released
Medium
Marten de Vries

Bug Description

The interval lesson type doesn't respect the indexes argument it gets passed via its constructor. This makes it unable to work together with list modifiers. (e.g. random order, only hard words).

You can reproduce this by just starting OT 3.0, making a simple word lesson (een =one, twee = two, etc.), starting a lesson selecting the random list modifier, and seeing that the words in fact aren't shuffled.

Revision history for this message
Marten de Vries (marten-de-vries) wrote :

I found this while working on a unit test, which I'll push to the branch soon. It'll fail because I don't want to look in this bug directly, but can at least provide feedback on the status of this bug.

Changed in openteacher:
status: New → Confirmed
importance: Undecided → Critical
importance: Critical → Medium
milestone: none → 3.1
Revision history for this message
Marten de Vries (marten-de-vries) wrote :

Test case added:

.............................................F......................................
======================================================================
FAIL: testEmptyIndexes (test.TestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "modules/org/openteacher/lessonTypes/test/test.py", line 48, in testEmptyIndexes
    lessonType.start()
  File "modules/org/openteacher/lessonTypes/interval/interval.py", line 72, in start
    self._sendNext()
  File "modules/org/openteacher/lessonTypes/interval/interval.py", line 164, in _sendNext
    self.newItem.send(self._modifyItem(item))
  File "modules/org/openteacher/event/event.py", line 35, in send
    handler(*args, **kwargs)
  File "modules/org/openteacher/lessonTypes/test/test.py", line 44, in newItem
    self.assertTrue(False, msg="newItem should not be called when an empty indexes list is passed.")
AssertionError: False is not True : newItem should not be called when an empty indexes list is passed.

----------------------------------------------------------------------
Ran 84 tests in 0.346s

FAILED (failures=1)

Changed in openteacher:
status: Confirmed → Triaged
Revision history for this message
Marten de Vries (marten-de-vries) wrote :

........................................................................................................................................
----------------------------------------------------------------------
Ran 136 tests in 25.858s

OK

--> Fixed.

Changed in openteacher:
status: Triaged → Fix Released
assignee: nobody → Marten de Vries (marten-de-vries)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.