Commit Graph

51 Commits

Author SHA1 Message Date
James Williams 12bd2627ab remove float rounding monkey-patch
used to turn 1.0.to_s to "1"

closes #CNVS-28310

Change-Id: I79106a4c0b42fe9b6d96097aaf9dd28a43024373
Reviewed-on: https://gerrit.instructure.com/75194
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins
QA-Review: KC Naegle <knaegle@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2016-04-22 18:17:18 +00:00
Jacob Fugal d79ccc78d9 localize values in datetime picker fields
fixes CNVS-21581, CNVS-21582

test-plan:
 - regression around all datepicker elements
 - for each, when it loads with prepopulated data, that data should be
   localized
 - the prepopulated localized data should be valid to the datepicker

Change-Id: I633034967c70066e337dc22d9b9ad0cd84793834
Reviewed-on: https://gerrit.instructure.com/60229
Tested-by: Jenkins
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Reviewed-by: Mike Nomitch <mnomitch@instructure.com>
Product-Review: Mike Nomitch <mnomitch@instructure.com>
2015-08-14 20:25:02 +00:00
Steven Burnett 5ea437ef60 fixing date time with assignments
fixed some errors with really early dates
with assignments in canvas

fixes CNVS-19936

test plan:
- create an assignment with an old date (before the year 1000)
- go to the assignment index notice no crash
- go to assignment show notice correctly shown date

Change-Id: I1733729989b4cf5954dd66c83d9cbd779d189430
Reviewed-on: https://gerrit.instructure.com/53451
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Hilary Scharton <hilary@instructure.com>
2015-05-13 22:28:23 +00:00
Cody Cutrer 9834937c8c don't autorequire a bunch of gems that are rarely used
Change-Id: I09ed3686629b62849d392684d587f30cb2047013
Reviewed-on: https://gerrit.instructure.com/51853
Tested-by: Jenkins
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2015-04-09 18:47:50 +00:00
Simon Williams bbd7ffa7d7 fix default zone argument
Stepping through the code, old and new, zone is set to nil when the call
to ::Time.zone happens in the default argument position, but not when it
happens as the first line of the function.  I don't yet know why.

fixes CNVS-16799

test plan:
- create an assignment with a due date
- view the assignment as a student.  the due date should match

(repeating test plan from commit that caused the regression)
- Create a new course shell and go to the courses settings page and set
  the courses time zone as Eastern and save the change.
- Create a new assignment and put a due date of whatever day you want,
  but have the time be 11pm and save it.
- When the page reloads, hover your mouse over the due date.
- The due date should be correct (on the day after).

Change-Id: I048d766f1552f2c244b5cdebbd7cc3445ed92969
Reviewed-on: https://gerrit.instructure.com/44148
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2014-11-10 16:15:12 +00:00
Ethan Vizitei 3d2a65eac4 fix day boundary in overridden time display
fixes CNVS-13541

write specs to identify the issue
 (and to confirm that it's not present
  in the javascript layer that does similar
  formatting work)

start breaking apart text helper
because we need some object that
can persist a zone override through
all the helpers

pull out a set of utils classes for dealing
with date and time presentation

fix the zone override when doing a date time
presentation across multiple zones

TEST PLAN:
 - Create a new course shell and go to the 
    courses settings page and set the courses 
    time zone as Eastern and save the change.
 - Create a new assignment and put a due date of 
    whatever day you want, but have the time be 
    11pm and save it.
 - When the page reloads, hover your mouse over 
    the due date.
 - The due date should be correct
    (on the day after).


Change-Id: I3274a502545bdbbb482bc7e529446e2fa422740c
Reviewed-on: https://gerrit.instructure.com/42064
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Matthew Wheeler <mwheeler@instructure.com>
QA-Review: Trevor deHaan <tdehaan@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2014-10-09 13:56:42 +00:00
Ethan Vizitei 3c19c96287 apply dual timezone filters
closes: CNVS-9814

add support throughout our formatting layer
to give us a way to convert values
to the wall clock time of the timezone for
a course (or really any other way we choose),
and then apply that to several selected
date/time displays.

TEST PLAN:

- Login as a user who's part of a course
with at least some data in each tab
- Check the following areas to ensure that
the correct timezone-differentiated hover
text is showing up:
  * Announcements -> Date Sent column
  * Announcement Detail -> Date Sent (top right)
  * Assignments -> Due Date column
  * Assignment Detail -> Due Date (bottom table)
  * Collaborations -> Start Date
  * Discussions -> Last Post Date
  * Discussions -> Due Date
  * Discussion Detail -> Post date of each reply
  * Modules -> (if locked) shows date to unlock
  * Quizzes -> Due Date
  * Syllabus -> Dates on the left
  * Syllabus -> Due dates on the right
  * Settings -> Course Details -> start/end date
  * Settings -> Sections -> start/end date
  * Recent activity page -> Everything

Change-Id: I048c2de85d9f9b196d35c6c65ae104dab7441eee
Reviewed-on: https://gerrit.instructure.com/34861
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Drew Bowman <dbowman@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2014-05-23 19:01:34 +00:00
Kenneth Romney 31361b5255 extract lib/text_helper to gems/canvas_text_helper
fixes: CNVS-12305

test plan:
summaries email should be formatted correctly with indentations.
twitter messages should not be longer than 140 characters.

Change-Id: I912a63b03c6c14de0c1d678063bb8fa33504d843
Reviewed-on: https://gerrit.instructure.com/33171
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2014-04-30 15:18:40 +00:00
Jacob Fugal 2474323372 don't localized datetimes formatted for datepicker
refs CNVS-12398

the eventual complete solution will involve teaching the date picker to
parse the localized datetime, but for now, just format the time in
english if the target is a datepicker's field value.

test-plan:
 - set locale to portuguese
 - datepickers (e.g. assignment due date when editing) populated on page
   load should contain the date time in english (e.g. "<date> at 3:00pm"
   vs. "<date> em 3:00")
 - using the date picker should produce a time in english in the field
 - saving the english time should work
 - non-datepicker field values with the same formatting rules (e.g.
   assignment due date when *not* editing) should display localized

Change-Id: Ibc69d2066518b4875c1f42b794df784c7e70c2c7
Reviewed-on: https://gerrit.instructure.com/33444
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Reviewed-by: Anthus Williams <awilliams@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2014-04-21 15:23:48 +00:00
Raphael Weiner 66e4ee8e66 create utf8_cleaner gem
test plan:
  * run specs

Change-Id: Ic2a76e3c6290c06f68f06796babbdc5ff3b405d9
Reviewed-on: https://gerrit.instructure.com/29733
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2014-03-25 21:56:33 +00:00
Raphael Weiner 6ae716da73 extracted html text helper methods into gem
test plan:
  * run specs

Change-Id: I8bd463396aee14853bdcf552eef144a509ffb62a
Reviewed-on: https://gerrit.instructure.com/29613
Reviewed-by: Zach Pendleton <zachp@instructure.com>
Product-Review: Zach Pendleton <zachp@instructure.com>
QA-Review: Zach Pendleton <zachp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2014-02-07 20:11:19 +00:00
Brian Palmer 82c39989de fix append_base_url for some versions of nokogiri
The spec testing this code was failing in travis-ci, and I tracked it
down to a bug with the selector -- it's not quite css, but not quite
xpath either. It works or not, depending on the underlying version of
libxml that Nokogiri is using. I was able to reproduce the failure using
a recent 64-bit ubuntu VM.

Change-Id: I18838e6132ef495c909329b0a33fb7bb439b2b5d
Reviewed-on: https://gerrit.instructure.com/29181
Reviewed-by: Zach Pendleton <zachp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Brian Palmer <brianp@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
2014-01-23 17:17:41 +00:00
James Williams 3332c6d60e i18n and html safety fixes for rails 3
Change-Id: Ibae01f4cd57bffff8d4875f0efdd229564a40a85
Reviewed-on: https://gerrit.instructure.com/27577
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2013-12-31 18:37:12 +00:00
Zach Wily f35373286e bring back balanced parens matching, but only a single level
This brings runtime of the regex back down from exponential to reasonable, and
still catches the most common cases of parens in urls.

test plan:
* In conversations, send a message that includes a url with a balanced
  pair of parenthesis in it, something like http://www.example.com/test(one).html
* The formatted display of the message should auto-linkify the entire
  url, it shouldn't stop at the opening parens

Change-Id: Iffaea14d1a1f6e1fd1535c115a62dc18caa455a4
Reviewed-on: https://gerrit.instructure.com/15003
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
2013-11-27 19:56:03 +00:00
Zach Pendleton 4e8a9f9401 stop adding line breaks to html announcement notifications
fixes CNVS-9124

test plan:
  * in a course with students, create a new announcement
    with at least 2 paragraphs;
  * as a site admin, navigate to /users/:id/messages, where
    :id is the ID of a student in the course;
  * verify that the html email sent to the student displays
    with only the line breaks included in the original
    announcement.

Change-Id: Ib1d38cda51110e2b66cffb9dae652ad349721076
Reviewed-on: https://gerrit.instructure.com/25723
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Marc LeGendre <marc@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
2013-10-30 17:08:25 +00:00
James Williams e370322471 prevent incompatible character encodings errors
refs #CNVS-5828

Change-Id: Id0a165363de05f000eee956bf976ffcff70adfc7
Reviewed-on: https://gerrit.instructure.com/21674
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
2013-06-25 19:13:13 +00:00
Eric Berry ee59a60e66 resolved html emails including html tags
fixes CNVS-5493

test steps:

Trigger the following emails and ensure that the HTML and plain text
versions of the email appear proper.

* conversation message received
* new announcement
* new discussion entry
* new discussion topic
* updated wiki page
* summary (daily or weekly)

Change-Id: I9638badb500eeb6cb23e4a83bd8395cd5dc40608
Reviewed-on: https://gerrit.instructure.com/20296
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Eric Berry <ericb@instructure.com>
QA-Review: Eric Berry <ericb@instructure.com>
2013-05-10 16:48:50 +00:00
Zach Pendleton 3efc58683b preserve html line breaks in discussion entry emails.
fixes CNVS-4514

test plan:
  * set up a student or teacher with asap notifications
    on discussion entries;
  * as a student or teacher that shares a class with the
    first user, reply to an existing discussion topic and
    include some line breaks in your response;
  * verify that the first user's discussion entry
    notification and verify that line breaks are preserved.

Change-Id: Iabfbc8db55e883d01621434400ce234a9b3a0e33
Reviewed-on: https://gerrit.instructure.com/18467
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Reviewed-by: Joel Hough <joel@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
2013-03-11 14:24:19 -06:00
Brian Palmer b9692005b2 strip invalid utf-8 from AR yaml columns serialized as binary by ruby 1.8
fixes CNVS-4174

Ruby 1.8 somtimes inserted invalid utf-8 into these columns using a
!binary tag, which 1.9 syck deserializes as ASCII-8BIT encoded. But then
it later blows up trying to append to a UTF-8 erb view or json output.

This adds a whitelisted set of columns for which we want to not only
strip invalid utf-8, but convert ascii encoded strings to utf-8 strings
and strip those too. These columns don't contain any binary data, so
that's an OK conversion to make.

Once Canvas only supports ruby 1.9, we shouldn't get any invalid utf-8
inserted even into serialized columns (YAML in 1.9 raises an exception
on serialization), so we won't need to keep this list up to date with
newly added columns, and we'll avoid accidentally converting a
serialized column that does contain binary data to utf-8.

test plan: rather than switching to ruby 1.8 and inserting bad data,
it'll be easier to just munge the database directly. create a
quiz_questions row with question_data that contains something like:

   question_name: !binary |
     oHRleHSg

then load the quiz in the UI using ruby 1.9. verify that you see a
question name "test" rather than a page error.

Change-Id: I8054026a06f28b1b61e05ba187bca8403a07fbb5
Reviewed-on: https://gerrit.instructure.com/18059
Reviewed-by: Paul Hinze <paulh@instructure.com>
QA-Review: Brian Palmer <brianp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2013-02-27 11:26:35 -07:00
Brian Palmer 9631cb122a strip invalid utf-8 when loading serialized AR columns
In ruby 1.8, it was possible to get invalid utf-8 into the database in
these columns, since the database doesn't check serialized columns
encoding, and ruby 1.8 won't check the encoding either. So in ruby 1.9,
you'll get an error when you try to actually use the data for most
things. This work-around recursively checks the serialized column for
any strings containing invalid utf-8, and just strips it out.

Fixes #CNVS-2587

test plan: using ruby 1.8, insert some bad utf-8 data into a serialized
column. one vector for doing this is to put it in a quiz question. then
switch to ruby 1.9, and verify you can load up the quiz question, and
the bad data has been scrubbed out.

Change-Id: I3272e46dbe5e9b424998c3c7459ea6f5b6b363d4
Reviewed-on: https://gerrit.instructure.com/16619
QA-Review: Clare Hetherington <clare@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2013-01-11 17:07:26 -07:00
Jon Jensen f74ebd096b self enrollment refactor to facilitate CN integration
fixes #CNVS-1119, potentially supersedes
https://gerrit.instructure.com/14501 with a little work.

simpler flow that is more consistent with FFT signup. whether you click
the "join course" button (popup) or go to the join url, the workflow is
the same:

1. if you are authenticated, you just click the enroll button.
2. if you are not authenticated, you can either:
   1. enter your (canvas/ldap) credentials and submit to join the course.
   2. register and join the course (single form). you will then be
      dropped on the course dashboard in the pre_registered state just
      like a /register signup (you have to follow the link in your email
      to set a password).

note that if open registration is turned off, option 2.2 is not available.

other items of interest:

* fix CSRF vulnerabilities where you can enroll authenticated users in
  open courses, or un-enroll them if you know their enrollment's UUID
* move to shorter course-id-less route (w/ join code)
* reuse UserController#create
* handy openAsDialog behavior and embedded view mode
* better json support in PseudonymSessionsController#create
* extract markdown helper from mt
* show "you need to confirm your email" popup when you land on the course
  page the first time (already showed on dashboard)

test plan:
1. test the authenticated/unauthenticated scenarios above, for both the
   popup and join pages
2. regression test of /registration forms

Change-Id: I0d8351695356d437bdbba72cb66c23ed268b0d1a
Reviewed-on: https://gerrit.instructure.com/15902
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Joe Tanner <joe@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2012-12-19 12:29:47 -07:00
Brian Palmer f02c21724e remove the parenthesis balancing matching in linkification
This has very bad performance in some cases.

test plan: text that is converted to html should still auto-linkify
urls, but a ( will now end the url rather than be included in it. for
instance, conversation messages when displayed on the dashboard.

Change-Id: I67f594a8ca18240ecc155d468b3c95d6616a8749
Reviewed-on: https://gerrit.instructure.com/14994
Reviewed-by: Zach Wily <zach@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
2012-11-02 16:18:49 -06:00
Ethan Vizitei 19cddc7047 [#5773] multiple ruby 1.9 spec fixes
Fix 'translation missing' helper spec
Fix intermittent timeout issue on 1.8.7
Send ZipFile::CREATE rather than true for 1.9 compatibility

Solve 2 more specs for 1.9.3 in the "lib/cc"
(the main problem here was that both files
used require strategies that assumed 1.8 style
load path configuration.  Wrapping them with
'expand_path' makes them able to find the helper.
Also, in the cc_helper, a spec was passing
in a string that needed to be specified as
UTF-8 in order to not confuse nokogiri.)

Fixed google doc id access
(in 1.8.7 the Atom::SimpleExtensions::ValueProxy
representing a document's ID was being to_s'd as
a single value.  In 1.9.3, it was including Array
braces around the value, causing the URL for
editing to be malformed.  Updating the
GoogleDocEntry class to pull the "first"
value from the ValueProxy allowed it to function
correctly (and is backwards compatible to 1.8))

Fix multiple helper requirement issues
Fix spec string encoding for incoming message processor spec
Fix the counts_report_spec for 1.9
Fix ruby 1.9 errors when testing text_helper.rb

Fix the splat handling for the notification 
policy data fixer

Change-Id: Ib70291442eaf2855565db6e451570c0a7670c6ed
Reviewed-on: https://gerrit.instructure.com/14517
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2012-10-23 10:14:24 -06:00
Brian Palmer 325d94955f strip_invalid_utf8 for error reports and incoming messages
If an incomplete utf-8 byte sequence comes at the end of an input
string, Iconv with //IGNORE will still include that incomplete sequence
in the output, causing psql errors among other problems. This new method
pads the string with spaces to work around the problem.

refs #10188

Change-Id: Idacae010462f2b98c02afbe4103974f39c0f24c1
Reviewed-on: https://gerrit.instructure.com/13258
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
2012-08-28 15:06:45 -06:00
Jeremy Stanley dd143ee73c add data-api-endpoint attribute to urls returned by the api
fixes #9954

test plan:
 - create a wiki page
 - put in links to pages, assignments, discussion topics,
   and files, and also to the index pages for these
 - retrieve the page via the API, and check that the
   data-api-endpoint and data-api-returntype attributes
   are set

Change-Id: Ife67f3119aa73971153f88fe46787d7e1563f0ef
Reviewed-on: https://gerrit.instructure.com/12925
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2012-08-17 16:41:18 -06:00
Brian Palmer b283bc3b87 formatting for ICS calendar events
Return the HTML as an ext ics attribute for those few clients that
support it (Outlook), and return better-formatted plain text for all
other clients.

closes #9107

Also refactor a bit.

test plan: add assignment and calendar events to the calendar with
links, formatted text, etc in their descriptions. Export the calendar
feed. In Outlook, you'll see the full HTML of the event. In most other
clients, you'll see a plain-text version of the description, but it'll
be much better formatted than it was before.

Change-Id: I50af1c407483d84c65ca285cbf364b6a303e0379
Reviewed-on: https://gerrit.instructure.com/11891
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
2012-07-02 11:05:48 -06:00
Jon Jensen bae0ce910a fix a couple little regressions
Change-Id: Ib630cecd8f5a05cdc37783e59553e786fa9873ea
Reviewed-on: https://gerrit.instructure.com/11322
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
2012-06-05 21:09:48 -06:00
Ryan Florence 255bd0ea0f new discussions UI
* faster discussion loading, uses materialized view
* threaded discussion support
* navigate between unread messages

test plan:
* use every feature within discussions

Change-Id: I9e89028e5a618c36a57dae958a16b0be73c35baa
Reviewed-on: https://gerrit.instructure.com/9584
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
2012-03-26 16:53:46 -06:00
Simon Williams df068f8b19 conversations rss feed; closes #6828
added a feed of all your conversation messages. each entry has the following
prperties:
- title is the first several words of the message
- author is the person who wrote the message
- content contains the body of the message, a list of any attachments, and
  a line adding context (other participants and shared classes/groups)

test plan:
- go to conversations view
- load the rss feed
- makes sure it contains your messages, attachments, and looks good

Change-Id: I3375dd01285429010b4d75fbea3bf1f7241ddddb
Reviewed-on: https://gerrit.instructure.com/8198
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
2012-02-06 13:27:19 -07:00
Brian Palmer 9c8c2939bd fix truncate_html for nokogiri 1.5.0
A bug in the upgraded nokogiri library was causing nil access errors
when trying to truncate html.

See https://github.com/tenderlove/nokogiri/issues/595

test plan: Send a discussion topic message to the dashboard that is more
than 50 words long. verify that it is truncated with ..., and no error
is generated.

Change-Id: I35523d125e50beac82ed8cf7214a64d6ce0d7001
Reviewed-on: https://gerrit.instructure.com/7989
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2012-01-11 09:29:23 -07:00
Jon Jensen a41081cf22 fix dashboard notifications for appointments
display stream items for new and updated appointment groups, as well as
when someone signs up another user (e.g. group signup)

removed unused message templates, fixed date_string range to just show a
single date if date parts are the same

test plan:

1. publish an appointment group and ensure all pertinent students get a
dashboard notification
2. add times to an appointment group and ensure all pertinent students
get a dashboard notification
3. sign up a group for a timeslot and ensure all other group members
get a dashboard notification

Change-Id: Id0dec52c0376fb6e14b0f26bb60e4695b25f7591
Reviewed-on: https://gerrit.instructure.com/7938
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2012-01-10 13:40:25 -07:00
Jon Jensen 80c90587d6 calendar and scheduler apis; refs #3395
Change-Id: I0bafb21630086ff2a99b8b881568bff51afabedc
Reviewed-on: https://gerrit.instructure.com/7823
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2012-01-06 12:35:27 -07:00
Jacob Fugal 399355c9dc replace usage of Date.today
Date.today does not accomodate Time.zone. This is a problem when the
time at the time of the call is between Time.zone's midnight and the
system time zone's midnight; Date.today will think it's a day
earlier/later (depending on direction of offset) than Time.zone.today in
that case.

Change-Id: I54083d26dcf704ac00d812597ee6aec95ffa0685
Reviewed-on: https://gerrit.instructure.com/7584
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2011-12-20 15:25:45 -07:00
Zach Wily bc0b1f6f62 truncate text to max bytes; fixes #5881
Change-Id: I7d4226d575a508d23c32fe59fabc0e5dd820a2b2
Reviewed-on: https://gerrit.instructure.com/6043
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-10-10 08:30:19 -06:00
Cody Cutrer 6ad5852d11 provide more helpful access denied messages for students. fixes #5517
Change-Id: Icaf643ad6cc94a8414dab9ce4d35e110db9b6d85
Reviewed-on: https://gerrit.instructure.com/5992
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Mark Suman <marks@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-10-07 15:41:44 -06:00
Brian Palmer 60aa7baf5e add encoding magic comments to files with utf-8 chars
Change-Id: Ieba9245724da8aeeb816d7f178bb704b3dcda80f
Reviewed-on: https://gerrit.instructure.com/5832
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
2011-09-27 10:27:35 -06:00
Jon Jensen be9dd5671a lock down linkification
Change-Id: Ice456817a8fff4ec3b3e61880fbc6594ab825ab0
Reviewed-on: https://gerrit.instructure.com/5350
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-08-30 16:55:06 -06:00
Jacob Fugal 69d13cb200 localize PageViews
Change-Id: I22451fe3adedbd893aa3b1a70b21954f9e64b928
Reviewed-on: https://gerrit.instructure.com/4257
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
2011-06-24 10:40:14 -06:00
Cody Cutrer e5ec8c6462 fix mt inlinify for multiple inline tags
Change-Id: Ic254eba25a318dc89e7bc11bd66949391be312f6
Reviewed-on: https://gerrit.instructure.com/4307
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2011-06-21 14:38:15 -06:00
Zach Wily 790f951135 wiki pages i18n
Change-Id: I71474f36823d1a2e641ab9abea0e5973edae77dc
Reviewed-on: https://gerrit.instructure.com/4146
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2011-06-17 09:32:36 -06:00
Brian Palmer a7f520ad87 treat html_safe as a "superset" of markdown_safe
You can't have a string that's both markdown_safe and html_safe, so
without this change you can't have a substitution with html in it.

Change-Id: I0f121c5dbfffd1035f937977d2bdb0851a66c320
Reviewed-on: https://gerrit.instructure.com/4251
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
2011-06-16 16:15:29 -06:00
Cody Cutrer 6d7a5abbcf i18n collaborations
Change-Id: Id300f665039f13f27f4300da7ba75753367fdbf6
Reviewed-on: https://gerrit.instructure.com/4243
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
2011-06-16 15:02:30 -06:00
Brian Palmer 8a879e63e0 html escape the translated string in mt, rather than use RDiscount html stripping
this lets us use wrappers and stuff with markdown

Change-Id: Ia0f778df30ca17d3b734f0ec52b295d237e6517e
Reviewed-on: https://gerrit.instructure.com/4231
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-06-16 09:01:19 -06:00
JT Olds 23d215c460 don't call TimeWithZone directly
rails docs discourage the use of ActiveSupport::TimeWithZone.new

Change-Id: I6310ea3a5d29fd1dabd9f0be7a3385564cf011d3
Reviewed-on: https://gerrit.instructure.com/4126
Reviewed-by: JT Olds <jt@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-06-09 10:46:12 -06:00
Brian Palmer d2dedbeb9a extract strings for ContextController
Change-Id: I1f9fff665c8d3a8a653dc3b602f40f292795f3f1
Reviewed-on: https://gerrit.instructure.com/4122
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-06-09 09:35:57 -06:00
Jon Jensen 58a25bd462 preliminary i18n setup, closes #4124
* i18n key scoping for controller/model/js/etc.
 * inline English translation support
 * rdiscount gem for markdown'ed translations
 * html_safe interpolation tweaks
 * label helpers
 * crummy tweak to translate symbol keys
 * internationalized most of lib, and some plugins/messages
 * conference i18n (view/model/controller/js)

Change-Id: I42772b9e19a110efbe855dc83a681be49ec98df2
Reviewed-on: https://gerrit.instructure.com/4080
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-06-06 14:19:03 -06:00
Cody Cutrer 63bad32df0 Handle incoming mails. Closes #4016.
* Uses Mailman gem
 * Can be configured for POP3, Maildir, or stdin (push from mailserver)
 * Maildir can be chained with fetchmail or similar to support IMAP
 * Can be run as part of the job server, or as a separate process

Change-Id: I000000000000000000000000000001
Reviewed-on: https://gerrit.instructure.com/2971
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>
2011-04-07 10:46:11 -06:00
Brian Palmer c14f66f81a correctly truncate text that contains MB chars, fixes #4135
TextHelper#truncate_html doesn't appear to have this issue, because it
always splits and truncates on word boundaries (using String#split()).

Change-Id: I8bf301055818d7080d8e12859707458ba41e89f4
Reviewed-on: https://gerrit.instructure.com/2851
Reviewed-by: Zach Wily <zach@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-03-29 10:07:59 -06:00
Brian Palmer e1b6f066b4 improved auto-linkification of text fields, refs #3706
Change-Id: I6ffe2f4f946b551c527eeb4249dfff959f77a22e
Reviewed-on: https://gerrit.instructure.com/2154
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-02-04 12:10:27 -07:00
Zach Wily 03c4e204f2 make sure that the truncated html strings are not escaped
fixes #3677

Change-Id: Id758d0c21fd6dabf078e5f5a7a0ba7547f496013
Reviewed-on: https://gerrit.instructure.com/2089
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-02-02 11:03:58 -07:00