Commit 706d9372 by Sven Marnach

Fix order of indices in cell ids to be consistent with the old version.

parent 7507f88b
...@@ -153,7 +153,8 @@ class ActiveTableXBlock(StudioEditableXBlockMixin, XBlock): ...@@ -153,7 +153,8 @@ class ActiveTableXBlock(StudioEditableXBlockMixin, XBlock):
else: else:
row['class'] = 'odd' row['class'] = 'odd'
for cell in row['cells']: for cell in row['cells']:
cell.id = 'cell_{}_{}'.format(cell.index, row['index']) cell.id = 'cell_{}_{}'.format(row['index'], cell.index)
cell.classes = ''
if not cell.is_static: if not cell.is_static:
self.response_cells[cell.id] = cell self.response_cells[cell.id] = cell
cell.classes = 'active' cell.classes = 'active'
......
...@@ -33,7 +33,7 @@ function ActiveTableXBlock(runtime, element, init_args) { ...@@ -33,7 +33,7 @@ function ActiveTableXBlock(runtime, element, init_args) {
else if (data.num_total_answers == data.num_correct_answers) { else if (data.num_total_answers == data.num_correct_answers) {
$status.removeClass('incorrect').addClass('correct'); $status.removeClass('incorrect').addClass('correct');
$status.text('correct'); $status.text('correct');
$status_message.text('Great job! '); $status_message.text('Great job!');
} else { } else {
$status.removeClass('correct').addClass('incorrect'); $status.removeClass('correct').addClass('incorrect');
$status.text('incorrect'); $status.text('incorrect');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment