Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions cms/djangoapps/contentstore/features/component.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def see_a_single_step_component(step):
for step_hash in step.hashes:
component = step_hash['Component']
assert_in(component, ['Discussion', 'Video'])
component_css = 'section.xmodule_{}Module'.format(component)
component_css = 'div.xmodule_{}Module'.format(component)
assert_true(world.is_css_present(component_css),
"{} couldn't be found".format(component))

Expand All @@ -48,7 +48,7 @@ def add_a_multi_step_component(step, is_advanced, category):
def see_a_multi_step_component(step, category):

# Wait for all components to finish rendering
selector = 'li.component section.xblock-student_view'
selector = 'li.component div.xblock-student_view'
world.wait_for(lambda _: len(world.css_find(selector)) == len(step.hashes))

for idx, step_hash in enumerate(step.hashes):
Expand All @@ -73,11 +73,11 @@ def see_a_multi_step_component(step, category):

@step(u'I see a "([^"]*)" Problem component$')
def see_a_problem_component(step, category):
component_css = 'section.xmodule_CapaModule'
component_css = 'div.xmodule_CapaModule'
assert_true(world.is_css_present(component_css),
'No problem was added to the unit.')

problem_css = 'li.component section.xblock-student_view'
problem_css = 'li.component div.xblock-student_view'
actual_text = world.css_text(problem_css)
assert_in(category.upper(), actual_text)

Expand Down Expand Up @@ -150,7 +150,7 @@ def duplicated_component(step, ordinal):

@step(u'I see a Problem component with display name "([^"]*)" in position "([^"]*)"$')
def see_component_in_position(step, display_name, index):
component_css = 'section.xmodule_CapaModule'
component_css = 'div.xmodule_CapaModule'

def find_problem(_driver):
return world.css_text(component_css, int(index)).startswith(display_name.upper())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ def create_component_instance(step, category, component_type=None, is_advanced=F

component_button_css = 'span.large-{}-icon'.format(category.lower())
if category == 'problem':
module_css = 'section.xmodule_CapaModule'
module_css = 'div.xmodule_CapaModule'
else:
module_css = 'section.xmodule_{}Module'.format(category.title())
module_css = 'div.xmodule_{}Module'.format(category.title())

# Count how many of that module is on the page. Later we will
# assert that one more was added.
Expand Down
4 changes: 2 additions & 2 deletions cms/djangoapps/contentstore/features/static-pages.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ def add_page(step):

@step(u'I should see a static page named "([^"]*)"$')
def see_a_static_page_named_foo(step, name):
pages_css = 'section.xmodule_StaticTabModule'
pages_css = 'div.xmodule_StaticTabModule'
page_name_html = world.css_html(pages_css)
assert_equal(page_name_html, '\n {name}\n'.format(name=name))


@step(u'I should not see any static pages$')
def not_see_any_static_pages(step):
pages_css = 'section.xmodule_StaticTabModule'
pages_css = 'div.xmodule_StaticTabModule'
assert (world.is_css_not_present(pages_css, wait_time=30))


Expand Down
1 change: 1 addition & 0 deletions common/djangoapps/xmodule_modifiers.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ def wrap_xblock(runtime_class, block, view, frag, context, display_name_only=Fal
template_context = {
'content': block.display_name if display_name_only else frag.content,
'classes': css_classes,
'display_name': block.display_name_with_default,
'data_attributes': ' '.join(u'data-{}="{}"'.format(key, value) for key, value in data.items()),
}

Expand Down
6 changes: 3 additions & 3 deletions common/lib/xmodule/xmodule/css/capa/display.scss
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ iframe[seamless]{
color: darken($error-red, 11%);
}

section.problem-progress {
div.problem-progress {
display: inline-block;
padding-left: 5px;
color: #999;
font-weight: 100;
font-size: em(16);
}

section.problem {
div.problem {
@media print {
display: block;
padding: 0;
Expand Down Expand Up @@ -579,7 +579,7 @@ section.problem {
border: 1px solid #ccc;
}

section.action {
div.action {
margin-top: $baseline;

.save, .check, .show, .reset {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -818,7 +818,7 @@ section.open-ended-child {
width: auto;
}

section.action {
div.action {
margin-top: $baseline;

input.save {
Expand Down
2 changes: 1 addition & 1 deletion common/lib/xmodule/xmodule/css/sequence/display.scss
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ nav.sequence-bottom {
}
}

.xmodule_VerticalModule ol.vert-mod > li ul.sequence-nav-buttons {
.xmodule_VerticalModule div.vert-mod > div ul.sequence-nav-buttons {
list-style: none !important;
}

Expand Down
6 changes: 3 additions & 3 deletions common/lib/xmodule/xmodule/js/fixtures/annotatable.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
</div>
</section>

<section class="problem"><a class="annotation-return" href="javascript:void(0)">Return to Annotation</a></section>
<section class="problem"><a class="annotation-return" href="javascript:void(0)">Return to Annotation</a></section>
<section class="problem"><a class="annotation-return" href="javascript:void(0)">Return to Annotation</a></section>
<div class="problem"><a class="annotation-return" href="javascript:void(0)">Return to Annotation</a></div>
<div class="problem"><a class="annotation-return" href="javascript:void(0)">Return to Annotation</a></div>
<div class="problem"><a class="annotation-return" href="javascript:void(0)">Return to Annotation</a></div>

13 changes: 6 additions & 7 deletions common/lib/xmodule/xmodule/js/fixtures/problem_content.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
<h2 class="problem-header">${_("Problem Header")}</h2>

<section class='problem-progress'>
</section>
<div class='problem-progress'></div>

<section class="problem">
<div class="problem">
<p>${_("Problem Content")}</p>

<section class="action">
<div class="action">
<input type="hidden" name="problem_id" value="1">

<input type="text" name="input_example_1" id="input_example_1" value="" class="math" />
Expand All @@ -18,6 +17,6 @@ <h2 class="problem-header">${_("Problem Header")}</h2>
<input class="save" type="button" value="${_('Save')}">
<button class="show"><span class="show-label">${_("Show Answer(s)")}</span> <span class="sr">(for question(s) above - adjacent to each field)</span></button>
<a href="/courseware/6.002_Spring_2012/${ explain }" class="new-page">${_("Explanation")}</a>
<section class="submission_feedback"></section>
</section>
</section>
<div class="submission_feedback"></div>
</div>
</div>
10 changes: 5 additions & 5 deletions common/lib/xmodule/xmodule/js/spec/capa/display_spec.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -52,19 +52,19 @@ describe 'Problem', ->
expect(window.update_schematics).toHaveBeenCalled()

it 'bind answer refresh on button click', ->
expect($('section.action input:button')).toHandleWith 'click', @problem.refreshAnswers
expect($('div.action input:button')).toHandleWith 'click', @problem.refreshAnswers

it 'bind the check button', ->
expect($('section.action input.check')).toHandleWith 'click', @problem.check_fd
expect($('div.action input.check')).toHandleWith 'click', @problem.check_fd

it 'bind the reset button', ->
expect($('section.action input.reset')).toHandleWith 'click', @problem.reset
expect($('div.action input.reset')).toHandleWith 'click', @problem.reset

it 'bind the show button', ->
expect($('section.action button.show')).toHandleWith 'click', @problem.show
expect($('div.action button.show')).toHandleWith 'click', @problem.show

it 'bind the save button', ->
expect($('section.action input.save')).toHandleWith 'click', @problem.save
expect($('div.action input.save')).toHandleWith 'click', @problem.save

it 'bind the math input', ->
expect($('input.math')).toHandleWith 'keyup', @problem.refreshMath
Expand Down
10 changes: 5 additions & 5 deletions common/lib/xmodule/xmodule/js/src/capa/display.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ class @Problem

problem_prefix = @element_id.replace(/problem_/,'')
@inputs = @$("[id^=input_#{problem_prefix}_]")
@$('section.action input:button').click @refreshAnswers
@$('section.action input.check').click @check_fd
@$('section.action input.reset').click @reset
@$('section.action button.show').click @show
@$('section.action input.save').click @save
@$('div.action input:button').click @refreshAnswers
@$('div.action input.check').click @check_fd
@$('div.action input.reset').click @reset
@$('div.action button.show').click @show
@$('div.action input.save').click @save

@bindResetCorrectness()

Expand Down
2 changes: 1 addition & 1 deletion common/lib/xmodule/xmodule/js/src/poll/poll_main.js
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ function PollMain(el) {
c1 += 1;

if (
(tempEl.tagName.toLowerCase() === 'section') &&
(tempEl.tagName.toLowerCase() === 'div') &&
($(tempEl).hasClass('xmodule_WrapperModule') === true)
) {
_this.wrapperSectionEl = tempEl;
Expand Down
2 changes: 1 addition & 1 deletion common/lib/xmodule/xmodule/js/src/vertical/edit.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ class @VerticalDescriptor extends XModule.Descriptor
)

save: ->
children: $('.vert-mod li', @element).map((idx, el) -> $(el).data('id')).toArray()
children: $('.vert-mod div', @element).map((idx, el) -> $(el).data('id')).toArray()
2 changes: 1 addition & 1 deletion common/lib/xmodule/xmodule/js/src/wrapper/edit.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ class @WrapperDescriptor extends XModule.Descriptor
)

save: ->
children: $('.vert-mod li', @element).map((idx, el) -> $(el).data('id')).toArray()
children: $('.vert-mod div', @element).map((idx, el) -> $(el).data('id')).toArray()
4 changes: 2 additions & 2 deletions common/templates/xblock_wrapper.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<section class="${' '.join(classes)}" ${data_attributes}>
<div class="${' '.join(classes)}" ${data_attributes} aria-label="${display_name}">
${content}
</section>
</div>
2 changes: 1 addition & 1 deletion common/test/acceptance/pages/lms/course_nav.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class CourseNavPage(PageObject):
url = None

def is_browser_on_page(self):
return self.is_css_present('section.course-index')
return self.is_css_present('div.course-index')

@property
def sections(self):
Expand Down
2 changes: 1 addition & 1 deletion lms/djangoapps/courseware/features/annotatable.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ def click_reply(self, step, problem):
self.active_problem = problem

def active_problem_selector(self, subselector):
return 'section[data-problem-id="{}"] {}'.format(
return 'div[data-problem-id="{}"] {}'.format(
world.scenario_dict['PROBLEMS'][self.active_problem].location.url(),
subselector,
)
Expand Down
4 changes: 2 additions & 2 deletions lms/djangoapps/courseware/features/problems.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def press_the_button_with_label(_step, buttonname):

@step(u'The "([^"]*)" button does( not)? appear')
def action_button_present(_step, buttonname, doesnt_appear):
button_css = 'section.action input[value*="%s"]' % buttonname
button_css = 'div.action input[value*="%s"]' % buttonname
if bool(doesnt_appear):
assert world.is_css_not_present(button_css)
else:
Expand All @@ -141,7 +141,7 @@ def see_score(_step, score):
# The problem progress is changed by
# cms/static/xmodule_js/src/capa/display.js
# so give it some time to render on the page.
score_css = 'section.problem-progress'
score_css = 'div.problem-progress'
expected_text = '({})'.format(score)
world.wait_for(lambda _: world.css_has_text(score_css, expected_text))

Expand Down
4 changes: 2 additions & 2 deletions lms/djangoapps/courseware/tests/test_module_render.py
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ def test_xmodule_display_wrapper_enabled(self):
)
result_fragment = module.render('student_view')

self.assertIn('section class="xblock xblock-student_view xmodule_display xmodule_HtmlModule"', result_fragment.content)
self.assertIn('div class="xblock xblock-student_view xmodule_display xmodule_HtmlModule"', result_fragment.content)

def test_xmodule_display_wrapper_disabled(self):
module = render.get_module(
Expand All @@ -419,7 +419,7 @@ def test_xmodule_display_wrapper_disabled(self):
)
result_fragment = module.render('student_view')

self.assertNotIn('section class="xblock xblock-student_view xmodule_display xmodule_HtmlModule"', result_fragment.content)
self.assertNotIn('div class="xblock xblock-student_view xmodule_display xmodule_HtmlModule"', result_fragment.content)

def test_static_link_rewrite(self):
module = render.get_module(
Expand Down
4 changes: 2 additions & 2 deletions lms/static/sass/course/courseware/_courseware.scss
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ div.course-wrapper {
}
}

section.xmodule_WrapperModule ol.vert-mod > li {
section.xmodule_WrapperModule div.vert-mod > div {
border-bottom: none;
}

Expand Down Expand Up @@ -193,7 +193,7 @@ div.course-wrapper {
}

&.closed {
section.course-index {
div.course-index {
width: flex-grid(.6);
overflow: hidden;

Expand Down
2 changes: 1 addition & 1 deletion lms/static/sass/course/courseware/_sidebar.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
section.course-index {
.course-index {
@extend .sidebar;
@extend .tran;
border-radius: 3px 0 0 3px;
Expand Down
2 changes: 1 addition & 1 deletion lms/static/sass/ie.scss
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@
display: block !important;

section.course-content,
section.course-index {
div.course-index {
display: block !important;
float: left;
}
Expand Down
10 changes: 5 additions & 5 deletions lms/templates/courseware/courseware.html
Original file line number Diff line number Diff line change
Expand Up @@ -185,28 +185,28 @@
<%include file="/courseware/course_navigation.html" args="active_page='courseware'" />
% endif

<section class="container">
<div class="container">
<div class="course-wrapper">

% if accordion:
<section aria-label="${_('Course Navigation')}" class="course-index">
<div class="course-index">
<header id="open_close_accordion">
<a href="#">${_("close")}</a>
</header>

<div id="accordion" style="display: none">
<nav>
<nav aria-label="${_('Course Navigation')}">
${accordion}
</nav>
</div>
</section>
</div>
% endif

<section class="course-content">
${fragment.body_html()}
</section>
</div>
</section>
</div>

% if show_chat:
<div id="chat-wrapper">
Expand Down
4 changes: 2 additions & 2 deletions lms/templates/poll.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<section
<div
id="poll_${element_id}"
class="${element_class}"
data-ajax-url="${ajax_url}"
>
<!-- Hidden field to read configuration JSON from. -->
<div class="${element_class}_div" id="${element_id}_json" style="display: none;">${configuration_json}</div>
</section>
</div>
15 changes: 7 additions & 8 deletions lms/templates/problem.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@ <h2 class="problem-header">
${ problem['name'] }
</h2>

<section class="problem-progress">
</section>
<div class="problem-progress"></div>

<section class="problem">
<div class="problem">
${ problem['html'] }

<section class="action">
<div class="action">
<input type="hidden" name="problem_id" value="${ problem['name'] }" />

% if check_button:
Expand All @@ -27,9 +26,9 @@ <h2 class="problem-header">
<button class="show"><span class="show-label">${_('Show Answer(s)')}</span> <span class="sr">${_("(for question(s) above - adjacent to each field)")}</span></button>
% endif
% if attempts_allowed :
<section class="submission_feedback">
<div class="submission_feedback">
${_("You have used {num_used} of {num_total} submissions").format(num_used=attempts_used, num_total=attempts_allowed)}
</section>
</div>
% endif
</section>
</section>
</div>
</div>
2 changes: 1 addition & 1 deletion lms/templates/problem_ajax.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<section id="problem_${element_id}" class="problems-wrapper" data-problem-id="${id}" data-url="${ajax_url}" data-progress_status="${progress_status}" data-progress_detail="${progress_detail}"></section>
<div id="problem_${element_id}" class="problems-wrapper" data-problem-id="${id}" data-url="${ajax_url}" data-progress_status="${progress_status}" data-progress_detail="${progress_detail}"></div>
Loading