Skip to content
Merged
Show file tree
Hide file tree
Changes from 147 commits
Commits
Show all changes
154 commits
Select commit Hold shift + click to select a range
45a665c
added mode bar up top
marcotuts Apr 29, 2013
80d4640
Merge branch 'master' into ux/marco/studio-componentsettings
marcotuts Apr 29, 2013
94390e4
aria tabs v1
marcotuts Apr 29, 2013
30240ff
non revision
marcotuts Apr 29, 2013
e697e49
Merge branch 'master' into ux/marco/studio-componentsettings
marcotuts May 1, 2013
d55527b
changes with aria
marcotuts May 1, 2013
fbaed2e
added shell of css and html organization
marcotuts May 3, 2013
c842a5f
plugged in more pseudo code for various css class states necessary as…
marcotuts May 3, 2013
036991d
moved bad variable name
marcotuts May 3, 2013
110a51b
removing variable names to get it to run again
marcotuts May 3, 2013
b9da0ff
reverting all variables in attempt to properly load unit pages
marcotuts May 3, 2013
370df65
Merge branch 'master' into ux/marco/studio-componentsettings
marcotuts May 3, 2013
018a3d8
branch now runs, but none of the styles are there yet. pushing this m…
marcotuts May 3, 2013
d159589
starting settings
marcotuts May 4, 2013
ad0909d
style input boxes
marcotuts May 5, 2013
6b4ab20
styled modes header, added inactive and active mode visibility as wel…
marcotuts May 5, 2013
38abc01
label on top of input field move
marcotuts May 6, 2013
d28c0b5
cleaned up styling, synced up partially to existing standards for for…
marcotuts May 7, 2013
977d0d7
cleaning up styles to use list-input, field, group, label, input, tip…
marcotuts May 7, 2013
3284247
restyling of the input fields, partway through adding in examples of …
marcotuts May 9, 2013
3ebd5de
added rest of settings list
marcotuts May 9, 2013
bfdbcc2
Beginnings of Backbone views/models.
May 9, 2013
7e42512
Merge branch 'ux/marco/studio-componentsettings' into feature/christi…
May 9, 2013
cf491b1
Remove component.html changes.
May 9, 2013
60f41eb
Cleanup.
May 9, 2013
cad8ae1
merged in new data requirements for html
marcotuts May 9, 2013
4a7f7d6
Update the other templates that include metadata-edit.html.
May 9, 2013
b314b5c
Renaming of some files.
May 9, 2013
6dbfa74
removed metadata-edit styling
marcotuts May 9, 2013
004018c
Merge branch 'feature/christina/metadata-ui' of github.com:edx/mitx i…
marcotuts May 9, 2013
04bb733
removed extra section heading in settings DOM, placed settings after …
marcotuts May 10, 2013
fd52980
Option view, changes getting persisted.
May 10, 2013
f4b06b2
Beginnings of is-set work.
May 10, 2013
2360a11
attempt to trigger js event for mode button press, not breaking yet b…
marcotuts May 12, 2013
c36046b
Merge branch 'feature/christina/metadata-ui' of github.com:edx/mitx i…
marcotuts May 12, 2013
125c9c1
Got clearing of fields working.
May 12, 2013
97de97c
minimal mce editor style changes to borders
marcotuts May 13, 2013
68cd922
Merge branch 'feature/christina/metadata-ui' of github.com:edx/mitx i…
marcotuts May 13, 2013
5edbf3d
Merge branch 'master' into feature/christina/metadata-ui
May 13, 2013
e29c940
Add display_names, update help, remove unnecessary things from templa…
May 13, 2013
8c36918
Support display names for choices.
May 13, 2013
2a8b8e2
Merge branch 'master' into feature/christina/metadata-ui
May 13, 2013
cb40193
cleaned up references to proper elements in settings header mode buttons
marcotuts May 13, 2013
aaffee5
Initial cleanup of open_ended_module and peer_grading_module.
May 13, 2013
f42850c
Merge branch 'feature/christina/metadata-ui' of github.com:edx/edx-pl…
May 13, 2013
0aaaf84
added number metadata template, cleaned up editor theme ui bordering …
marcotuts May 14, 2013
8d8c8d8
updated unit styling, added polyfill js library, updated javascript h…
marcotuts May 14, 2013
82899d6
Number view.
May 14, 2013
69832c5
Merge branch 'feature/christina/metadata-ui' of github.com:edx/edx-pl…
May 14, 2013
5bd0442
Merge branch 'master' into feature/christina/metadata-ui
May 14, 2013
17750a7
Use min, max, and step values from server.
May 14, 2013
064d21c
clean up of editor header styling
marcotuts May 14, 2013
6ec1a29
Merge branch 'feature/christina/metadata-ui' of github.com:edx/edx-pl…
marcotuts May 14, 2013
81e95f2
basic tab switching added
marcotuts May 15, 2013
98e692d
fixed broken coffee script caused by errant pseudo code I checked in
marcotuts May 15, 2013
47a4d6b
initial polyfill implementation and metadata number entry javascript …
marcotuts May 15, 2013
b9fc3f9
updated styles for input type numbers
marcotuts May 15, 2013
d4d3882
Updates for showanswer.
May 15, 2013
e157173
styling adjustments to codemirror and wrapped polyfill into a function
marcotuts May 15, 2013
d264c94
Merge branch 'feature/christina/metadata-ui' of github.com:edx/edx-pl…
marcotuts May 15, 2013
63960ee
style change for is-set
marcotuts May 15, 2013
faf31d9
Get toggling between Editor and Settings working.
May 15, 2013
4152e46
Merge branch 'feature/christina/metadata-ui' of github.com:edx/edx-pl…
May 15, 2013
a167406
Minor update.
May 15, 2013
56df114
style changes to component header
marcotuts May 15, 2013
5f4bded
Merge branch 'feature/christina/metadata-ui' of github.com:edx/edx-pl…
marcotuts May 15, 2013
06d3154
Set "editing" name.
May 15, 2013
0422350
final changes to codemirror styling, and clean up style for settings …
marcotuts May 15, 2013
b3e41d1
styling for static pages updated
marcotuts May 15, 2013
305b555
Merge branch 'feature/christina/metadata-ui' of github.com:edx/edx-pl…
May 15, 2013
cbdadae
updates moved slightly, will not use new styling
marcotuts May 15, 2013
2f8e8f4
border around course introduction which was lost in code mirror styli…
marcotuts May 15, 2013
ba11d37
clear button to match help icon visually
marcotuts May 15, 2013
d35b290
Clean up editable_metadata_fields.
May 15, 2013
fa1dfd7
Update unit test for editable_metadata_fields.
May 15, 2013
724678d
Merge branch 'feature/christina/metadata-ui' of github.com:edx/edx-pl…
May 15, 2013
d72b6b0
Merge branch 'master' into feature/christina/metadata-ui
May 15, 2013
c85cc5a
Fix bad merge.
May 15, 2013
12dae84
commented out firefox polyfill ad well as xmodule css editor changes
marcotuts May 15, 2013
bbb6a3c
resolved metadata-edit conflict, adding in latex item into settings
marcotuts May 15, 2013
ef14155
cleaned up latex styling, polyfill function wrapper, draft number tem…
marcotuts May 16, 2013
235ecff
In progress.
May 16, 2013
01ff839
Fix CodeMirror initialization problem.
May 16, 2013
a6c5e69
Update combined open ended and peer grading per conversation with Vik.
May 16, 2013
f58deb4
removed latex compiler buttom from settings tab
marcotuts May 16, 2013
29b7778
initial i18n changes to unit.html, component.html, and the individual…
marcotuts May 16, 2013
1f43fa1
internationalization stripped out
marcotuts May 17, 2013
a32a740
Merge branch 'feature/christina/metadata-ui' of github.com:edx/edx-pl…
May 17, 2013
5920ea9
One minor update.
May 17, 2013
1c9ebbc
Put colon on Visibility back in.
May 17, 2013
b16e17a
Some i18n work and other minor cleanup.
May 17, 2013
aa41aed
prototype for polyfill on number input fields, minimal styling to up …
marcotuts May 20, 2013
3229aaf
Call polyfill at right time.
May 20, 2013
32f7691
minor style changes for increment and decrement buttons on firefox nu…
marcotuts May 20, 2013
c356904
css styles for firefox input number fields
marcotuts May 20, 2013
2020923
Prevent invalid numeric entries.
May 20, 2013
25388de
Minor cleanup.
May 20, 2013
c0cff81
styled firefox number buttons
marcotuts May 20, 2013
7641e12
Merge branch 'feature/christina/metadata-ui' of github.com:edx/edx-pl…
marcotuts May 20, 2013
4d7c7f8
Merge branch 'master' into feature/christina/metadata-ui
May 20, 2013
79c78cb
made firefox input number increment objects positioned as % to respon…
marcotuts May 20, 2013
3cf9150
Merge branch 'feature/christina/metadata-ui' of github.com:edx/edx-pl…
marcotuts May 20, 2013
4facd26
Jasmine test for metadata model.
May 20, 2013
c8eeea2
Merge branch 'feature/christina/metadata-ui' of github.com:edx/edx-pl…
May 20, 2013
bb699f4
Update xblock, start Selenium.
May 21, 2013
3dc9791
Update xblock, start Selenium.
May 21, 2013
f3bd9ab
Get rid of empty, store ID.
May 21, 2013
c8d6d5d
Selenium tests.
May 23, 2013
c95b44d
Merge branch 'master' into feature/christina/metadata-ui
May 23, 2013
48703af
Merge.
May 23, 2013
1a8a721
Will not do unrelated test at this time.
May 23, 2013
7940ca5
studio - adjusts visual vertical spacing of save/cancel actions in mo…
talbs May 23, 2013
1371c8d
revises alignment of advanced editor and cheatsheet toggle
talbs May 23, 2013
8b76afb
converted undo image in component settings list to FontAwesome
May 24, 2013
c0aef20
Merge branch 'style/btalbot/metadata-ui' into feature/christina/metad…
marcotuts May 24, 2013
87d904c
Merge branch 'master' into feature/christina/metadata-ui
May 24, 2013
599a215
Move includes to right place.
May 27, 2013
17c710a
Merge branch 'master' into feature/christina/metadata-ui
May 28, 2013
34082ef
Merge branch 'master' into feature/christina/metadata-ui
May 28, 2013
851ed67
Continue merge.
May 28, 2013
a195c4f
Continue merge.
May 28, 2013
6be9463
Cleanup.
May 28, 2013
2c32200
Updated text per Alex's e-mail.
May 28, 2013
f3d4381
Minor cleanup.
May 28, 2013
625c6b5
Cleanup, change how we load templates.
May 28, 2013
24707f8
Jasmine test for views.
May 29, 2013
7d07309
Don't call setFixtures. Can stomp on other tests.
May 29, 2013
e3bc5e6
Update for metadata changes.
May 29, 2013
4920f08
i18n
May 29, 2013
551a1c1
pep8 and documentation cleanup.
May 29, 2013
b77919a
Remove unnecessary fields.
May 29, 2013
d7a1dda
Update display name.
May 29, 2013
f026075
Cleanup.
May 29, 2013
b2fe7f5
Update documentation (per Toddi).
May 29, 2013
5d41e2a
Updates from code review.
May 30, 2013
6627ca5
Tidy up the new lettuce tests for metadata editing a bit.
May 30, 2013
14eb9c9
Merge branch 'master' into feature/christina/metadata-ui
May 30, 2013
4a64c0c
Merge in from origin/feature/christina/metadata-ui
May 30, 2013
a1b6291
Merge branch 'feature/christina/metadata-ui' of github.com:edx/edx-pl…
May 30, 2013
2f504ec
fix merge conflict
May 30, 2013
c0c5e92
Go back to setFixtures.
May 30, 2013
1c20978
Merge branch 'master' into feature/christina/metadata-ui
May 30, 2013
86afe72
Refactor user factory usage for lettuce tests. Fix merge conflict.
May 30, 2013
8fd15ce
Review feedback.
May 30, 2013
46cf5e3
Merge branch 'feature/christina/metadata-ui' of github.com:edx/edx-pl…
May 30, 2013
6c06599
Prepare for Peter's change.
May 30, 2013
e6dfa8e
Merge branch 'master' into feature/christina/metadata-ui
May 31, 2013
ab5834f
Pylint cleanup.
May 31, 2013
57f8bbf
Updates to Selenium test based on feedback.
May 31, 2013
72e1fab
SASS variable and naming standards sync-up based on @talbs feedback c…
marcotuts May 31, 2013
290d049
Merge branch 'feature/christina/metadata-ui' of https://github.com/ed…
marcotuts May 31, 2013
a82daf0
Change to Backbone collection.
May 31, 2013
486d085
Merge branch 'feature/christina/metadata-ui' of github.com:edx/edx-pl…
May 31, 2013
4d311f4
Code review feedback.
Jun 1, 2013
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
25 changes: 16 additions & 9 deletions cms/djangoapps/contentstore/features/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
from nose.tools import assert_true
from nose.tools import assert_equal

from xmodule.modulestore.django import _MODULESTORES, modulestore
from xmodule.templates import update_templates
from auth.authz import get_user_by_email

from selenium.webdriver.common.keys import Keys
Expand Down Expand Up @@ -50,31 +48,31 @@ def i_press_the_category_delete_icon(step, category):

@step('I have opened a new course in Studio$')
def i_have_opened_a_new_course(step):
open_new_course()


####### HELPER FUNCTIONS ##############
def open_new_course():
world.clear_courses()
log_into_studio()
create_a_course()


####### HELPER FUNCTIONS ##############
def create_studio_user(
uname='robot',
email='robot+studio@edx.org',
password='test',
is_staff=False):
studio_user = world.UserFactory.build(
studio_user = world.UserFactory(
username=uname,
email=email,
password=password,
is_staff=is_staff)
studio_user.set_password(password)
studio_user.save()

registration = world.RegistrationFactory(user=studio_user)
registration.register(studio_user)
registration.activate()

user_profile = world.UserProfileFactory(user=studio_user)


def fill_in_course_info(
name='Robot Super Course',
Expand Down Expand Up @@ -153,4 +151,13 @@ def set_date_and_time(date_css, desired_date, time_css, desired_time):
world.css_fill(time_css, desired_time)
e = world.css_find(time_css).first
e._element.send_keys(Keys.TAB)
time.sleep(float(1))
time.sleep(float(1))


@step('I have created a Video component$')
def i_created_a_video_component(step):
world.create_component_instance(
step, '.large-video-icon',
'i4x://edx/templates/video/default',
'.xmodule_VideoModule'
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# disable missing docstring
#pylint: disable=C0111

from lettuce import world
from nose.tools import assert_equal
from terrain.steps import reload_the_page


@world.absorb
def create_component_instance(step, component_button_css, instance_id, expected_css):
click_new_component_button(step, component_button_css)
click_component_from_menu(instance_id, expected_css)


@world.absorb
def click_new_component_button(step, component_button_css):
step.given('I have opened a new course section in Studio')
step.given('I have added a new subsection')
step.given('I expand the first section')
world.css_click('a.new-unit-item')
world.css_click(component_button_css)


@world.absorb
def click_component_from_menu(instance_id, expected_css):
elem_css = "a[data-location='%s']" % instance_id
assert_equal(1, len(world.css_find(elem_css)))
world.css_click(elem_css)
assert_equal(1, len(world.css_find(expected_css)))


@world.absorb
def edit_component_and_select_settings():
world.css_click('a.edit-button')
world.css_click('#settings-mode')


@world.absorb
def verify_setting_entry(setting, display_name, value, explicitly_set):
assert_equal(display_name, setting.find_by_css('.setting-label')[0].value)
assert_equal(value, setting.find_by_css('.setting-input')[0].value)
settingClearButton = setting.find_by_css('.setting-clear')[0]
assert_equal(explicitly_set, settingClearButton.has_class('active'))
assert_equal(not explicitly_set, settingClearButton.has_class('inactive'))


@world.absorb
def verify_all_setting_entries(expected_entries):
settings = world.browser.find_by_css('.wrapper-comp-setting')
assert_equal(len(expected_entries), len(settings))
for (counter, setting) in enumerate(settings):
world.verify_setting_entry(
setting, expected_entries[counter][0],
expected_entries[counter][1], expected_entries[counter][2]
)


@world.absorb
def save_component_and_reopen(step):
world.css_click("a.save-button")
# We have a known issue that modifications are still shown within the edit window after cancel (though)
# they are not persisted. Refresh the browser to make sure the changes WERE persisted after Save.
reload_the_page(step)
edit_component_and_select_settings()


@world.absorb
def cancel_component(step):
world.css_click("a.cancel-button")
# We have a known issue that modifications are still shown within the edit window after cancel (though)
# they are not persisted. Refresh the browser to make sure the changes were not persisted.
reload_the_page(step)


@world.absorb
def revert_setting_entry(label):
get_setting_entry(label).find_by_css('.setting-clear')[0].click()


@world.absorb
def get_setting_entry(label):
settings = world.browser.find_by_css('.wrapper-comp-setting')
for setting in settings:
if setting.find_by_css('.setting-label')[0].value == label:
return setting
return None
13 changes: 13 additions & 0 deletions cms/djangoapps/contentstore/features/discussion-editor.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Feature: Discussion Component Editor
As a course author, I want to be able to create discussion components.

Scenario: User can view metadata
Given I have created a Discussion Tag
And I edit and select Settings
Then I see three alphabetized settings and their expected values

Scenario: User can modify display name
Given I have created a Discussion Tag
And I edit and select Settings
Then I can modify the display name
And my display name change is persisted on save
23 changes: 23 additions & 0 deletions cms/djangoapps/contentstore/features/discussion-editor.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# disable missing docstring
#pylint: disable=C0111

from lettuce import world, step


@step('I have created a Discussion Tag$')
def i_created_discussion_tag(step):
world.create_component_instance(
step, '.large-discussion-icon',
'i4x://edx/templates/discussion/Discussion_Tag',
'.xmodule_DiscussionModule'
)


@step('I see three alphabetized settings and their expected values$')
def i_see_only_the_settings_and_values(step):
world.verify_all_setting_entries(
[
['Category', "Week 1", True],
['Display Name', "Discussion Tag", True],
['Subcategory', "Topic-Level Student-Visible Label", True]
])
13 changes: 13 additions & 0 deletions cms/djangoapps/contentstore/features/html-editor.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Feature: HTML Editor
As a course author, I want to be able to create HTML blocks.

Scenario: User can view metadata
Given I have created a Blank HTML Page
And I edit and select Settings
Then I see only the HTML display name setting

Scenario: User can modify display name
Given I have created a Blank HTML Page
And I edit and select Settings
Then I can modify the display name
And my display name change is persisted on save
17 changes: 17 additions & 0 deletions cms/djangoapps/contentstore/features/html-editor.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# disable missing docstring
#pylint: disable=C0111

from lettuce import world, step


@step('I have created a Blank HTML Page$')
def i_created_blank_html_page(step):
world.create_component_instance(
step, '.large-html-icon', 'i4x://edx/templates/html/Blank_HTML_Page',
'.xmodule_HtmlModule'
)


@step('I see only the HTML display name setting$')
def i_see_only_the_html_display_name(step):
world.verify_all_setting_entries([['Display Name', "Blank HTML Page", True]])
67 changes: 67 additions & 0 deletions cms/djangoapps/contentstore/features/problem-editor.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
Feature: Problem Editor
As a course author, I want to be able to create problems and edit their settings.

Scenario: User can view metadata
Given I have created a Blank Common Problem
And I edit and select Settings
Then I see five alphabetized settings and their expected values
And Edit High Level Source is not visible

Scenario: User can modify String values
Given I have created a Blank Common Problem
And I edit and select Settings
Then I can modify the display name
And my display name change is persisted on save

Scenario: User can specify special characters in String values
Given I have created a Blank Common Problem
And I edit and select Settings
Then I can specify special characters in the display name
And my special characters and persisted on save

Scenario: User can revert display name to unset
Given I have created a Blank Common Problem
And I edit and select Settings
Then I can revert the display name to unset
And my display name is unset on save

Scenario: User can select values in a Select
Given I have created a Blank Common Problem
And I edit and select Settings
Then I can select Per Student for Randomization
And my change to randomization is persisted
And I can revert to the default value for randomization

Scenario: User can modify float input values
Given I have created a Blank Common Problem
And I edit and select Settings
Then I can set the weight to 3.5
And my change to weight is persisted
And I can revert to the default value of unset for weight

Scenario: User cannot type letters in float number field
Given I have created a Blank Common Problem
And I edit and select Settings
Then if I set the weight to abc, it remains unset

Scenario: User cannot type decimal values integer number field
Given I have created a Blank Common Problem
And I edit and select Settings
Then if I set the max attempts to 2.34, the max attempts are persisted as 234

Scenario: User cannot type out of range values in an integer number field
Given I have created a Blank Common Problem
And I edit and select Settings
Then if I set the max attempts to -3, the max attempts are persisted as 1

Scenario: Settings changes are not saved on Cancel
Given I have created a Blank Common Problem
And I edit and select Settings
Then I can set the weight to 3.5
And I can modify the display name
Then If I press Cancel my changes are not persisted

Scenario: Edit High Level source is available for LaTeX problem
Given I have created a LaTeX Problem
And I edit and select Settings
Then Edit High Level Source is visible
Loading