Commit Graph

292 Commits

Author SHA1 Message Date
Jon Jensen 0bb49eb8f0 include config file localizations in i18n:generate output
Change-Id: Icbc831a7b3158b685671db870ce201d83120eec4
Reviewed-on: https://gerrit.instructure.com/4624
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2011-07-14 14:35:07 -06:00
Jon Jensen 68cd8cb31a js translation bundle generator, refs #4993
Change-Id: I85d03fe5ff5358327545b660fb88d739872367c7
Reviewed-on: https://gerrit.instructure.com/4604
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
2011-07-13 10:58:16 -06:00
Cody Cutrer 07c17ea38e expand masquerade capabilities to root account admins
closes #4332

 * Allow :become_user to be granted to any root account admin role,
   not just site admin roles.
 * Adjust policy on User objects to properly grant :become_user:
   * You can always become yourself (stop masquerading)
   * Site admins can become any user besides other site admins
   * Root account admins can only become users that are not account
     admins, and that belong to accounts that this root account admin
     has permissions to
 * Adjust masquerading code to check for :become_user on the user
   object itself, rather than checking just on the site admin account
   * This means we have to figure out the target user before checking
     permissions
   * Because the permission check already checks for becoming another
     site admin user, that special case was removed in the
     masquerading code
   * Special case the UI to not show the "become" link for the
     current user (i.e. you can't become yourself, and you can't
     become the user that you already are)

Change-Id: I69bc855b8ee24098b9a63b0b1c8d7edf2063b625
Reviewed-on: https://gerrit.instructure.com/4614
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
2011-07-12 14:46:54 -06:00
Ryan Shaw 4a5da6012f also include user's sortable_name in api response
this is for better sorting in gradebook2

Change-Id: I772969a746397a5c95d8de1eaa6dab598cdcd484
Reviewed-on: https://gerrit.instructure.com/4649
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-07-12 14:11:27 -06:00
Ryan Shaw 6eb5e17680 return secondary_identifier fields if can manage_students
Before, in the api, we only returned sis_user_id
and sis_login_id if they were an account admin.

This relaxes the restriction to also include anyone
that can manage_students in the course.  It also
returns a login_id, which is the unique_id column
from the database.

Change-Id: Ice36c5414b48a706c10d337533778a78da3b3f5e
Reviewed-on: https://gerrit.instructure.com/4648
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-07-12 14:11:15 -06:00
JT Olds 76fed4b1e2 prevent users without permission from using the user list parsing feature
we don't want unauthorized gathering of real names from usernames

Change-Id: I01448d351c9672c32110fccdd5c9bf8750f820cf
Reviewed-on: https://gerrit.instructure.com/4594
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
2011-07-12 11:54:47 -06:00
JT Olds 98ffbbc83e allow enrollments through the UI with usernames
also adds enrollments in batches, instead of one at a time via ajax.

closes #4835

Change-Id: Ic2aac24db2c4d5fb4482901daf8627419c548e37
Reviewed-on: https://gerrit.instructure.com/4584
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2011-07-12 11:54:38 -06:00
JT Olds 45f0fbd370 renaming EmailList to UserList
Change-Id: I35d8f072ed19741baa8598e78813c00d0e54a28a
Reviewed-on: https://gerrit.instructure.com/4585
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
2011-07-12 11:54:30 -06:00
Bracken Mosbacker 724f1857f4 fix html importing for canvas cartridges
the html files were being parse in xml mode, they should
have been in html mode

Change-Id: I0227684e95412b35d2a16d8ff2b1e7990a4617d4
Reviewed-on: https://gerrit.instructure.com/4593
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-07-07 15:58:33 -06:00
Jon Jensen dd41f5e189 better view scope inference
Change-Id: I208e1664a468e2a31ffc82444a06cffc3032c536
Reviewed-on: https://gerrit.instructure.com/4591
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
2011-07-07 15:51:34 -06:00
Brian Palmer 493a26d541 use more specific sis field names in api, and support both user sis ids
users have both a SIS user_id and login_id, return both in the API and
allow both as ids when specifying a user in API calls using the syntax
sis_user_id:someid and sis_login_id:someid

These columns in the db aren't well named, unfortunately, but we'll try
to at least be consistent in the API.

This is technically a breaking change for the API. We've decided to go
ahead with it, as this API functionality was only recently added.

Change-Id: I8eabe4226580aa3b1aec7e5b7082b045f786e605
Reviewed-on: https://gerrit.instructure.com/4556
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: JT Olds <jt@instructure.com>
2011-07-07 15:44:25 -06:00
Bracken Mosbacker b4f08ddf07 improve error handling for course exports
single-item failures don't stop the whole export
all errors are saved to the export object and also
written to the manifest file of the export

Change-Id: Ib92d33c2d205b1f5d09f8d60c5b87bf18abb56ed
Reviewed-on: https://gerrit.instructure.com/4588
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-07-07 10:28:48 -06:00
Jon Jensen 35705ee7bc various i18n fixes/deduplication
added checks to extractor for some common typos/oversights (and more line numbers)

Change-Id: I7a2b080cf2a26cb6711539220fe2486a1a4f04b5
Reviewed-on: https://gerrit.instructure.com/4581
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2011-07-06 17:29:33 -06:00
Jon Jensen 44659148d6 remove whitespace from en defaults (only for non-mt translate calls in html views)
Change-Id: Ic6bc858c147b5954f21125c9466039057e2dd02a
Reviewed-on: https://gerrit.instructure.com/4573
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-07-06 16:23:17 -06:00
Jon Jensen 724057fd39 correctly handle explicit scopes
Change-Id: I31d6084b0d58823c09b8a4e07706e82040407ab2
Reviewed-on: https://gerrit.instructure.com/4569
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-07-06 12:27:34 -06:00
Cody Cutrer 5c0c1582ca avoid requesting all google docs just to see if we still have access
With some users that have thousands of files, that request can take
upwards of 10-15 seconds; even doing a head and/or limiting results
doesn't speed it up (silly googles).  So instead, do a head for the
api that returns info on the token (yes, it says it's for AuthSub,
but it works for OAuth as well).

Change-Id: If838d0f6f04f313887dc734786d5cdeffa3e28a5
Reviewed-on: https://gerrit.instructure.com/4561
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-07-06 10:46:52 -06:00
Cody Cutrer b83b3a67cf don't puke on nil msg when processing incoming messages
Change-Id: I62cd76c0174ffc5adb7aafcf034c3e366b411917
Reviewed-on: https://gerrit.instructure.com/4551
Reviewed-by: Zach Wily <zach@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-07-05 14:01:20 -06:00
Brian Palmer 45a4266dd4 teacher activity / student interaction report, closes #4316
Change-Id: I116c9130c3af9a7c2891cf6387de7e2b361c8d4b
Reviewed-on: https://gerrit.instructure.com/4481
Reviewed-by: Brian Whitmer <brian@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-06-29 16:24:24 -06:00
Ryan Shaw 5456031ed6 create gradebook2
uses coffeescript, slickgrid, actual canvas APIs
reachable at /courses/x/gradebook2
does not include commenting or things external
to the grid like filtering and sorting options

Change-Id: I6967c2dbdd16f7ea4d8c1ad1995511d7c498226a
Reviewed-on: https://gerrit.instructure.com/4371
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-06-29 16:21:27 -06:00
Brian Palmer 6a1bddc9bc enable "download zip" link for students, closes #4305
Change-Id: Ifd22d7d79e21d0cc8a4d1326b062058f06f6a0dc
Reviewed-on: https://gerrit.instructure.com/4357
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>
2011-06-29 14:17:23 -06:00
Ryan Shaw b9fe6ae0df catch trailing commas in check_syntax task
Change-Id: I7b068ed6ebdf7f4a5949c18a1b38f4d0b27dcf43
Reviewed-on: https://gerrit.instructure.com/4447
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-06-29 12:24:44 -06:00
Brian Palmer 4ddce72a8e extend submissions for_student api for gradebook2
Change-Id: I32c9ae92495ebb3fecca52983a3b50dcd162b620
Reviewed-on: https://gerrit.instructure.com/4399
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
2011-06-28 16:15:41 -06:00
Jon Jensen e0c93365b1 make js hash matching a little more flexible
Change-Id: Ife7f28d4a571a99c69f558efd4071b775d607731
Reviewed-on: https://gerrit.instructure.com/4406
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
2011-06-28 12:57:01 -06:00
JT Olds eaf2c6390a abstract course importer
Change-Id: Ic96bc376171a8d52bc7f175395eba7687d4dac28
Reviewed-on: https://gerrit.instructure.com/4089
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: JT Olds <jt@instructure.com>
2011-06-27 11:01:32 -06:00
Jon Jensen 93898e620f targeted i18n:check
sample usage:

 # just models
 rake i18n:check ONLY=app/models

 # just js:
 rake i18n:check ONLY=*.js

 # just a couple files:
 rake i18n:check ONLY=app/views/shared/_aligned_outcomes.html.erb,public/javascripts/aligned_outcomes.js
 # or even better:
 rake i18n:check ONLY=*aligned_outcomes*

Change-Id: I469d7fc1fa65ddbf51c06550fa27043a7fc5c956
Reviewed-on: https://gerrit.instructure.com/4375
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-06-24 13:02:50 -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
Jacob Fugal 774a5d7735 localize Profile
Change-Id: Ifa944757f5656157aa3c360666ccc88ca12dbaf0
Reviewed-on: https://gerrit.instructure.com/4343
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2011-06-24 09:32:53 -06:00
Jon Jensen 46f093f171 update js extractor (and views) for new js_block scoping usage
Change-Id: Ic614e156b90175eced2bb28102c219bd66c08f7b
Reviewed-on: https://gerrit.instructure.com/4341
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-06-23 17:08:27 -06:00
Zach Wily 12ba408bc7 be sure to initialize class vars in HostUrl
Change-Id: Ibdc3e24263b87f06f602243aa2dec7bf52015bfa
Reviewed-on: https://gerrit.instructure.com/4347
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-06-23 16:25:13 -06:00
Jon Jensen 170948fba4 make toPercentage/etc. available to I18n.scoped, fix extractor issue
Change-Id: I37c951989ba896dd5022b18ba67a933fae46628c
Reviewed-on: https://gerrit.instructure.com/4358
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2011-06-23 15:32:46 -06:00
Jon Jensen c9501256ca i18n rest of vendor/plugins (and lib/canvas/plugin stragglers)
Change-Id: I7379afbcc0461ba10e41a14a55ef87b00871f9f7
Reviewed-on: https://gerrit.instructure.com/4345
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
2011-06-23 12:51:55 -06:00
Zach Wily 0bcf2dfd2c don't allow logins to the files domain; fixes #4726 and gh issue 23
Change-Id: Ia292e4c8a375e1eb61f812aed8d6fe8b3d83c901
Reviewed-on: https://gerrit.instructure.com/3914
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-06-22 16:10:54 -06:00
Jon Jensen b07449c2ed i18n extractor for javascript (files and js_blocks)
fixed several key collisions and other minor issues

Change-Id: Ibe15c9963c26226d1d4676066b96b8a76bf50931
Reviewed-on: https://gerrit.instructure.com/4321
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
2011-06-22 15:00:04 -06:00
Jon Jensen 8e772b108a Revert "jammit fu for i18n.js"
This reverts commit d14eacb828.

Change-Id: Id4735548c24cbfba2813b5a2e09876877616bef9
Reviewed-on: https://gerrit.instructure.com/4328
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-06-22 13:30:18 -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
Jon Jensen d14eacb828 jammit fu for i18n.js
this initializer does two things:

 1. it includes the core/default en translations for things like date/time
    formats
 2. it includes the corresponding localization file for each bundle (if
    present). these will be generated offline by an as-yet-unwritten
    js translation generator

Change-Id: If588cb287b027f3de62e8113dc8fa8977f41e830
Reviewed-on: https://gerrit.instructure.com/4244
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-06-21 14:18:20 -06:00
Zach Wily d590384c6b fix divide by zero on quiz statistics page
Change-Id: I1b3c51c3d39cabb2e86e40ff5535f1b694df6dc4
Reviewed-on: https://gerrit.instructure.com/4299
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-06-21 08:00:07 -06:00
Brian Palmer 0cc58830c2 i18n handle label_tag calls
Change-Id: I83081d9521621f2ec66d2184130ddc3415c0e9bb
Reviewed-on: https://gerrit.instructure.com/4291
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-06-20 13:12:55 -06:00
JT Olds 5a62f11d64 catch rails validation errors in setup rake task
Change-Id: Ie86819fa40ae9a3257882bb92031b5854b2e7f20
Reviewed-on: https://gerrit.instructure.com/4234
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-06-19 22:06:22 -06:00
Cody Cutrer 4f521c04db i18n fixes
and provide line numbers in a few places for i18n:check

Change-Id: I3de64db270bb5ae7a8ac36e6a2857f3c3adf14b6
Reviewed-on: https://gerrit.instructure.com/4279
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-06-17 16:23:03 -06:00
Jon Jensen f544db6bc1 translation checker/extractor for rb/erb files
Change-Id: I019f701758d35d630bf39141bb283911cc483aa5
Reviewed-on: https://gerrit.instructure.com/4237
Reviewed-by: Zach Wily <zach@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-06-17 10:30:02 -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 46d5349155 fix send_to_inbox for submission comments, closes #4898
Change-Id: I46fa01a07074e2e1719b526c09a56a736404c565
Reviewed-on: https://gerrit.instructure.com/4248
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-06-16 13:20: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 5cd6d3b679 make non-sis crosslisting sticky
if a user crosslists via the ui, we don't want the SIS to blow away those
changes. fixes #4840, refs #4815

Change-Id: Ia3f844b3a33d9c9a6e9433dc79ce74e433f1f389
Reviewed-on: https://gerrit.instructure.com/4162
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-06-16 08:42:46 -06:00
JT Olds 4bbeacce99 set enrollment restriction to course/section dates when provided
closes #4832

Change-Id: I204a00863d7c85c1e4c8489d1dc367e99bcffde6
Reviewed-on: https://gerrit.instructure.com/4156
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-06-16 08:42:36 -06:00
JT Olds c567ff64fe support running specs in parallel
Change-Id: I521adc994f5f2bd58099a89315468111435dbbf8
Reviewed-on: https://gerrit.instructure.com/4218
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-06-15 15:18:42 -06:00
Brian Palmer 1e635d0133 fix syntax errors in twitter_user_poller
Change-Id: I5a71c81125eb51e9deb89e8f46e7f098b30f19f1
Reviewed-on: https://gerrit.instructure.com/4213
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2011-06-15 10:43:57 -06:00