Commit Graph

136 Commits

Author SHA1 Message Date
jsa
427468565f don't show the add response button if responses are not allowed.
JIRA: FOR-452
2014-02-05 12:49:52 -05:00
Calen Pennington
f6731342de Make Studio load XBlock fragment js and css on the client-side
[LMS-1421][LMS-1517]
2014-02-04 15:38:13 -05:00
Calen Pennington
49217ebe8b Allow multiple client-side runtimes on a single page
Make XBlock client-side runtimes proper classes, so that handlerUrl can
be defined in a per-runtime way, and we can have multiple runtimes on a
single page.

[LMS-1630][LMS-1421][LMS-1517]
2014-02-04 08:55:36 -05:00
Greg Price
4e1c595472 Merge pull request #2377 from edx/gprice/forum-thread-pagination
Add pagination of responses to forum threads
2014-02-03 08:55:20 -08:00
Greg Price
062025eeec Add pagination of repsonses to forum threads
Users will first be shown the first 25 responses of a viewed thread and
then have the option of loading 100 more at a time until all responses
have been loaded. This mitigates the performance impact of very large
threads by avoiding the need to render and transfer over the network
all content of a large thread at once. It will also allow students with
slower browsers to interact with large threads even if they cannot load
all of the responses.
2014-01-31 18:17:04 -05:00
Greg Price
285d3579bb Fix unread comment count tooltip rendering
JIRA: FOR-434
2014-01-31 13:30:39 -05:00
jsa
9b54abe308 add "Add A Response" button to thread views in discussion tab / inline
JIRA: FOR-373
2014-01-28 17:13:16 -05:00
Giulio Gratta
65c76cd6a7 Added help text to tooltips and sr flag spans 2014-01-27 13:27:24 -08:00
jsa
168445f7c8 i18n: extract strings from underscore templates
JIRA: FOR-400
2014-01-22 11:07:35 -05:00
Greg Price
e634586882 Merge pull request #2222 from edx/gprice/forum-new-post-buttons
Fix forum buttons
2014-01-22 08:04:35 -08:00
Greg Price
60fb3cfbb2 Make forum New Post buttons behave as buttons
JIRA: FOR-205
2014-01-17 16:38:51 -05:00
Greg Price
2014d34c8a Fix forum button keyboard activation
Previously, buttons were activated on pressing Enter, but the expected
behavior is to activate on pressing Space. Several JavaScript errors
that prevented various buttons from properly activating via the keyboard
are also fixed.
2014-01-17 16:38:51 -05:00
jsa
22d6c6806b expand forums' search text input whenever the field receives focus.
JIRA: FOR-203
2014-01-17 14:13:40 -05:00
Greg Price
f8732a8b3d Internationalize the forums post Markdown editor
This includes removing the "PREVIEW" label for the preview pane from CSS
and adding it to the generated DOM.
2014-01-16 14:10:51 -05:00
Greg Price
a8e3bca8c8 Internationalize forums CoffeeScript code 2014-01-14 13:04:51 -05:00
Greg Price
a1dc49cc9b Remove defunct forum post tagging code 2014-01-14 13:03:56 -05:00
Greg Price
5147a41b07 Merge pull request #2034 from carsongee/cg/notification_prefs_missing_slash
Added missing slash to avoid 302 when calling /notification_prefs/status
2014-01-09 13:01:29 -08:00
Greg Price
b7d7751dc2 Improve accessibility of forum vote buttons
This change involves substantial refactoring of the relevant code to
reduce duplication. It also makes the templates for the vote buttons
more consistent and cleaner.

JIRA: FOR-64
2014-01-06 17:08:53 -05:00
Carson Gee
2796af4abc Added missing slash to avoid 302 when calling /notification_prefs/status 2013-12-23 15:43:00 -05:00
Calen Pennington
c684a66ac3 Add information to xblocks about when they complete initialization that's visible in javascript 2013-12-17 13:18:22 -05:00
Calen Pennington
80fd12b9aa Merge pull request #1692 from cpennington/pure-xblock-handler-urls
Update handler_url support to match the latest in the xblock repo, for both js and python runtimes
2013-12-10 10:54:55 -08:00
Calen Pennington
d937da8d47 Update handler_url support to match the latest in the xblock repo, for both js and python runtimes
[LMS-1613]
2013-12-10 12:04:18 -05:00
Greg Price
cec58f885b Remove forum user profile moderator toggle button
This button has been broken for at least a year, so the code has
suffered from bit rot and should be reimplmemented if the feature is
necessary in the short term (which is unlikely since it has been broken
for so long).
2013-12-09 10:23:21 -05:00
Greg Price
81798dd8be Improve accessibility of inline discussions
The show/hide toggle now properly acts like a button, and focus is now
trapped on the loading element for both the show/hide action and loading
of a new page.
2013-11-26 14:12:34 -05:00
Greg Price
a0fa9d0b14 Refactor keypress activation for forum buttons
This removes the use of the space key to activate buttons, which is not
expected behavior.
2013-11-26 14:12:34 -05:00
Greg Price
7e074f1a7e Add error recovery to inline discussion loading
Now the interface will reset apropriately and allow a user to retry
expanding the discussion or loading a new page, and the alert message
will ask the user to retry.

JIRA: FOR-300, FOR-301
2013-11-22 11:00:10 -05:00
Greg Price
95932610a7 Add focus trap on forum navigation thread loading
For accessibility purposes, it is bad to allow a user to initiate
loading of additional threads in the navigation sidebar and then shift
focus away from the sidebar, only to have focus snap back when the
additional threads are loaded. Now, we trap focus on the loading element
as recommended by our accessibility consultant.

JIRA: FOR-238
2013-11-19 10:06:30 -05:00
Greg Price
2e31ff8c35 Recover from error loading forum thread list
When a user attempts to load more threads in the forum navigation
sidebar, reset the state of the world so the user can retry, and alert
the user appropriately.
2013-11-19 10:06:30 -05:00
Greg Price
89924c5e61 Alert users when forum AJAX requests fail
AJAX requests on forums pages occasionally fail (usually when a request
to the comments service times out), but the user is not made aware of
the failure. This manifests as either the system not appearing to store
state (e.g. if an attempt to flag a post fails) or something taking
forever to load. Now, a modal will pop up to alert the user that a
request has failed and instruct them to reload the page.

In the longer term, we should fix each user gesture that results in an
AJAX call to gracefully handle a failure by resetting the state of the
world appropriately and aleritng the user.

JIRA: FOR-37
2013-11-19 09:55:49 -05:00
Greg Price
0c28858c64 Remove unused forum CoffeeScript code 2013-11-19 09:52:21 -05:00
Calen Pennington
864d831ce3 Use XBlock handlers for handle_ajax in XModules
Adds xblock handler_url support to the LMS, and makes handle_ajax use
that code.

[LMS-230] [LMS-229]
2013-11-08 11:08:48 -05:00
Greg Price
2123d5e7ae Merge pull request #1570 from edx/gprice/forum-staff-label
Remove label from forum posts by global staff
2013-11-01 13:10:54 -07:00
Greg Price
c4cdb457de Remove label from forum posts by global staff
The motivation for this change is performance. The forums UI code gets
the list of users for each role and renders the staff label based on
those lists. The list for the staff role is expensive to compute because
there is no index on the is_staff attribute, and we cannot create one
because the User model is built into django.

Users with is_staff=True are still assigned the Moderator role upon
enrolling in a course, so this change will have no practical effect
except that a user who is granted staff privileges after enrolling in a
course will have to be made a Moderator in order for their posts to be
labeled.

Additionally, the UI did not use the list of users with the Student
role, so that list has been removed as well.
2013-11-01 14:16:55 -04:00
Greg Price
b6f5348181 Improve accessibility of forum follow buttons
They now include screen reader-friendly text, have the ARIA checkbox
role, activate on keypress (for space or enter), and occur in the DOM
after the header information (title, etc.)
2013-10-31 11:00:28 -04:00
Calen Pennington
ce6fbae693 Add an XBlock javascript runtime, and use it to run XModules
[LMS-57]
2013-10-18 16:31:32 -04:00
Greg Price
1187e71880 Add accessible text to forum loading animations 2013-10-11 10:52:10 -04:00
Greg Price
69859cff5b Improve accessibility of forums flagging feature
The "Report Misuse" div is now focusable, responds to keyboard input,
and has appropriate attributes to indicate that it is a toggle button.
This fixes FOR-201 and FOR-209.
2013-10-10 14:14:23 -04:00
David Baumgold
d97921e6e2 Convert Studio JS to use require.js 2013-10-04 13:43:50 -04:00
Greg Price
c850be4ab9 Merge pull request #1167 from edx/fix/kevin/forums_accessibility 2013-09-27 14:18:09 -07:00
Kevin Chugh
9a5e6f1fdd code review cleanup 2013-09-27 17:12:48 -04:00
Greg Price
cbbb5c7e7e Improve focus management of forums nav sidebar
Now, when the list is reset (e.g. by sorting), the first thread is
focused. When the "Load more" link is clicked, upon loading more
threads, focus moves to the thread immediately following the thread
that was previously last in the list.
2013-09-27 16:57:11 -04:00
Kevin Chugh
d816d5fade update coffeescript to dynamically render sr spans 2013-09-27 16:24:30 -04:00
Greg Price
f39886ef57 Ensure nav sidebar is sized correctly on page load 2013-09-27 15:34:32 -04:00
Greg Price
98142c02d3 Improve accessibility of forum nav sort buttons 2013-09-20 13:31:37 -04:00
Greg Price
8a32f274be Fix forums nav sidebar overlapping content
Previously, when the window was scrolled down past the top of the
discussion content pane, scrolling right would cause the sidebar to
appear above the background of the content pane but below the text.
This is only an issue with very small windows or with the text size
increased significantly, which is why this came up in an accessibility
audit. Now the sidebar is fixed to the left side of the page instead
of the left side of the viewport.
2013-09-11 14:24:58 -04:00
Miles Steele
cb7a3ad8eb switch from log_event to Logger.log
keep log_event for compatibility
2013-08-20 16:52:18 -04:00
Kevin Chugh
4f7edbf67d fix notifications URL 2013-07-30 01:50:33 -04:00
Kevin Chugh
5c91edd4a5 update coffeescript to use new status url 2013-07-30 01:43:49 -04:00
Kevin Chugh
8f98a1c2be remove failing jasmine tests and print statements 2013-07-30 00:46:47 -04:00
Kevin Chugh
99f235ec56 first pass at jasmine tests 2013-07-30 00:13:03 -04:00