Skip to content

Commit

Permalink
treesame commit of origin/stable/2015-08-29
Browse files Browse the repository at this point in the history
Treesame-Commit-Id: caf5d63
  • Loading branch information
roor0 committed Aug 30, 2015
3 parents b8b3559 + caf5d63 + d6c675a commit 869e0da
Show file tree
Hide file tree
Showing 945 changed files with 69,185 additions and 7,971 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ Gemfile.lock4
/tmp/
/vendor/plugins/rails_upgrade
npm-debug.log
mkmf.log
/vendor/bundle

# generated plugin stuff
Expand Down
2 changes: 1 addition & 1 deletion Gemfile.d/_before.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#

# # enforce the version of bundler itself, to avoid any surprises
req_bundler_version_floor, req_bundler_version_ceiling = '1.7.10', '1.10.5'
req_bundler_version_floor, req_bundler_version_ceiling = '1.7.10', '1.10.6'
bundler_requirements = [">=#{req_bundler_version_floor}",
"<=#{req_bundler_version_ceiling}"]
gem 'bundler', bundler_requirements
Expand Down
20 changes: 9 additions & 11 deletions Gemfile.d/other_stuff.rb → Gemfile.d/app.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@

if CANVAS_RAILS3
gem 'rails', '3.2.21', github: 'rails/rails', branch: '3-2-stable', ref: 'b344986bc3d94ca7821fc5e0eef1874882ac6cbb'
gem 'rails', '3.2.22'
gem 'rack', '1.4.5'
gem 'builder', '3.0.0'
gem 'routing_concerns', '0.1.0'
Expand All @@ -13,16 +12,17 @@
gem 'rails-observers', '0.1.2'
end
gem 'tzinfo', '0.3.43'
gem 'encrypted_cookie_store-instructure', '1.1.10', require: 'encrypted_cookie_store'
gem 'active_model_serializers', '0.9.0alpha1',
gem 'encrypted_cookie_store-instructure', '1.1.11', require: 'encrypted_cookie_store'
gem 'active_model_serializers', '0.9.0alpha1',
github: 'rails-api/active_model_serializers', ref: '61882e1e4127facfe92e49057aec71edbe981829'
gem 'authlogic', '3.4.2'
gem 'active_model-better_errors', '1.6.7', require: 'active_model/better_errors'
gem 'dynamic_form', '1.1.4', require: false
gem 'rails-patch-json-encode', '0.0.1'
gem 'switchman', '1.2.37'
gem 'folio-pagination', '0.0.7', require: 'folio/rails'
gem 'will_paginate', '3.0.4', require: false
gem 'switchman', '1.2.40'
gem 'folio-pagination', '0.0.9', require: 'folio/rails'
# for folio, see the folio README
gem 'will_paginate', '3.0.7', require: false

gem "after_transaction_commit", '1.0.1'
gem "aws-sdk", '1.63.0', require: false
Expand All @@ -46,7 +46,7 @@
gem 'i18n', '0.7.0'
gem 'i18nema', '0.0.8', platforms: [:ruby_20, :ruby_21, :ruby_22]
gem 'i18nema19', '0.0.8', platform: :ruby_19
gem 'i18nliner', '0.0.11'
gem 'i18nliner', '0.0.12'
gem 'icalendar', '1.5.4', require: false
gem 'ims-lti', '2.0.0.beta.27'
gem 'json', '1.8.2'
Expand All @@ -58,9 +58,7 @@
gem 'polyglot', '0.3.5', require: false
gem 'marginalia', '1.3.0', require: false
gem 'mime-types', '1.17.2', require: 'mime/types'
# attachment_fu (even the current technoweenie one on github) does not work
# with mini_magick 3.1
gem 'mini_magick', '1.3.2'
gem 'mini_magick', '4.2.7'
gem 'subexec', '0.0.4', require: false
gem 'multi_json', '1.10.1'
gem 'netaddr', '1.5.0', require: false
Expand Down
2 changes: 1 addition & 1 deletion Gemfile.d/development.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@


unless ENV['DISABLE_RUBY_DEBUGGING']
gem 'byebug', '4.0.5', platforms: [:ruby_20, :ruby_21, :ruby_22]
gem 'byebug', '5.0.0', platforms: [:ruby_20, :ruby_21, :ruby_22]
gem 'columnize', '0.9.0', platforms: [:ruby_20, :ruby_21, :ruby_22], require: false
gem 'debugger', '1.6.6', platforms: :ruby_19
end
Expand Down
1 change: 1 addition & 0 deletions Gemfile.d/development_and_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
gem 'coffee-script-source', '1.6.2' #pinned so everyone's compiled output matches
gem 'execjs', '1.4.0'
gem 'hashdiff', '0.2.0'
gem 'activerecord-colored_log_subscriber', '0.1.0'
end

2 changes: 2 additions & 0 deletions Gemfile.d/test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
gem 'rspec-rails', '3.2.3'
gem 'rspec-legacy_formatters', '1.0.0'
gem 'rspec-collection_matchers', '1.1.2'
gem 'shoulda-matchers', '2.8.0'

gem 'rubocop', require: false
gem 'rubocop-rspec', require: false
Expand All @@ -29,6 +30,7 @@
gem 'childprocess', '0.5.0', require: false
gem 'websocket', '1.0.7', require: false
gem 'selinimum', '0.0.1', require: false, path: 'gems/selinimum'
gem 'appium_lib', '7.0.0', require: false
gem 'test_after_commit', '0.4.0'
gem 'test-unit', '~> 3.0', require: false, platform: :ruby_22
gem 'webmock', '1.16.1', require: false
Expand Down
15 changes: 15 additions & 0 deletions app/coffeescripts/behaviors/tooltip.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ define [
'jqueryui/tooltip'
], (_, $, htmlEscape) ->

tooltipsToShortCirtuit = {}
shortCircutTooltip = (target) ->
tooltipsToShortCirtuit[target] || tooltipsToShortCirtuit[target[0]]

tooltipUtils = {

setPosition: (opts)->
Expand Down Expand Up @@ -59,6 +63,8 @@ define [
do ($) ->
$.widget "custom.timeoutTooltip", $.ui.tooltip,
_open: ( event, target, content ) ->
return null if shortCircutTooltip(target)

# Converts arguments to an array
args = Array.prototype.slice.call(arguments, 0)
args.splice(2, 1, htmlEscape(content).toString())
Expand Down Expand Up @@ -144,4 +150,13 @@ define [
.timeoutTooltip('open')
.click -> $this.timeoutTooltip('close')

restartTooltip = (event) ->
tooltipsToShortCirtuit[event.target] = false

stopTooltip = (event) ->
tooltipsToShortCirtuit[event.target] = true

$(this).bind("detachTooltip", stopTooltip);
$(this).bind("reattachTooltip", restartTooltip);

return tooltipUtils
16 changes: 8 additions & 8 deletions app/coffeescripts/calendar/EditAssignmentDetails.coffee
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
define [
'jquery'
'timezone'
'compiled/calendar/commonEventFactory'
'jst/calendar/editAssignment'
'jst/calendar/editAssignmentOverride'
'jst/calendar/genericSelectOptions'
'jquery.instructure_date_and_time'
'jquery.instructure_forms'
'jquery.instructure_misc_helpers'
], ($, commonEventFactory, editAssignmentTemplate, editAssignmentOverrideTemplate, genericSelectOptionsTemplate) ->
], ($, tz, commonEventFactory, editAssignmentTemplate, editAssignmentOverrideTemplate, genericSelectOptionsTemplate) ->

class EditAssignmentDetails
constructor: (selector, @event, @contextChangeCB, @closeCB) ->
Expand Down Expand Up @@ -85,15 +86,14 @@ define [
@$form.find(".more_options_link").attr('href', moreOptionsUrl)

setupTimeAndDatePickers: () =>
@$form.find(".datetime_field").datetime_field()

startDate = @event.startDate()
endDate = @event.endDate()

$field = @$form.find(".datetime_field")
$field.datetime_field()
widget = $field.data('instance')
startDate = $.unfudgeDateForProfileTimezone(@event.startDate())
if @event.allDay
@$form.find(".datetime_field").val(startDate.toString('MMM d, yyyy')).change()
widget.setDate(startDate)
else if startDate
@$form.find(".datetime_field").val(startDate.toString('MMM d, yyyy h:mmtt')).change()
widget.setDatetime(startDate)

formSubmit: (e) =>
e.preventDefault()
Expand Down
4 changes: 2 additions & 2 deletions app/coffeescripts/handlebars_helpers.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ define [
# stored elsewhere).

# expects: anything that $.datetimeString can handle
datetimeFormatted : (datetime, localized=true) ->
$.datetimeString(datetime, {localized: localized})
datetimeFormatted : (datetime) ->
$.datetimeString(datetime)

# Strips the time information from the datetime and accounts for the user's
# timezone preference. expects: anything tz() can handle
Expand Down
3 changes: 3 additions & 0 deletions app/coffeescripts/models/GroupCategory.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,9 @@ define [
assignUnassignedMembers: ->
$.ajaxJSON "/api/v1/group_categories/#{@id}/assign_unassigned_members", 'POST', {}, @setUpProgress

cloneGroupCategoryWithName: (name) ->
$.ajaxJSON "/group_categories/#{@id}/clone_with_name", 'POST', {name: name}

setUpProgress: (response) =>
@set progress_url: response.url

Expand Down
2 changes: 1 addition & 1 deletion app/coffeescripts/react_files/components/FilesApp.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ define [
header {},
h1 {className: 'screenreader-only'},
I18n.t('files_heading', "Files")
if ENV.use_new_styles
if ENV.use_new_styles and contextType == 'courses'
div {className: 'ic-app-nav-toggle-and-crumbs ic-app-nav-toggle-and-crumbs--files'},
button {
className:'Button Button--link Button--small ic-app-course-nav-toggle',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ define [

render: withReactElement ->
div {className: 'ReactModal__Layout'},
div {className: 'ReactModal__InnerSection ReactModal__Header'},
div {className: 'ReactModal__Header'},
div {className: 'ReactModal__Header-Title'},
h4 {},
I18n.t('Manage Usage Rights')
Expand All @@ -142,7 +142,7 @@ define [
i {className: 'icon-x'},
span {className: 'screenreader-only'},
I18n.t('Close')
div {className: 'ReactModal__InnerSection ReactModal__Body'},
div {className: 'ReactModal__Body'},
div { ref: 'form', className: 'form-dialog'},
div {},
div {className: 'UsageRightsDialog__paddingFix grid-row'},
Expand All @@ -158,7 +158,7 @@ define [
copyright: @copyright
cc_value: @cc_value
}
div {className: 'ReactModal__InnerSection ReactModal__Footer'},
div {className: 'ReactModal__Footer'},
div {className: 'ReactModal__Footer-Actions'},
button {
ref: 'cancelButton'
Expand Down
10 changes: 0 additions & 10 deletions app/coffeescripts/util/parseDatetime.coffee

This file was deleted.

2 changes: 2 additions & 0 deletions app/coffeescripts/views/DiscussionTopics/EditView.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,8 @@ htmlEscape, DiscussionTopic, Announcement, Assignment, $, preventDefault, Missin

getFormData: ->
data = super
for dateField in ['last_reply_at', 'posted_at', 'delayed_post_at']
data[dateField] = $.unfudgeDateForProfileTimezone(data[dateField])
data.title ||= I18n.t 'default_discussion_title', 'No Title'
data.discussion_type = if data.threaded is '1' then 'threaded' else 'side_comment'
data.podcast_has_student_posts = false unless data.podcast_enabled is '1'
Expand Down
2 changes: 2 additions & 0 deletions app/coffeescripts/views/DiscussionTopics/SummaryView.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@ define [

class DiscussionTopicSummaryView extends Backbone.View

tagName: 'li'
template: template

attributes: ->
'class': "discussion-topic #{@model.get('read_state')} #{if @model.selected then 'selected' else '' }"
'data-id': @model.id
'role': "listitem"

events:
'change .toggleSelected' : 'toggleSelected'
Expand Down
5 changes: 3 additions & 2 deletions app/coffeescripts/views/conferences/EditConferenceView.coffee
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
define [
'jquery'
'underscore'
'timezone'
'compiled/views/DialogBaseView'
'compiled/util/deparam'
'jst/conferences/editConferenceForm'
'jst/conferences/userSettingOptions'
'compiled/behaviors/authenticity_token'
], ($, _, DialogBaseView, deparam, template, userSettingOptionsTemplate, authenticity_token) ->
], ($, _, tz, DialogBaseView, deparam, template, userSettingOptionsTemplate, authenticity_token) ->

class EditConferenceView extends DialogBaseView

Expand Down Expand Up @@ -100,7 +101,7 @@ define [
when 'date_picker'
optionObj['isDatePicker'] = true
if(currentVal)
optionObj['value'] = tz.format(currentVal, "%b %-d, %Y %l:%M%P")
optionObj['value'] = tz.format(currentVal, 'date.formats.full_with_weekday')
else
optionObj['value'] = currentVal
break
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ define [
json.sections = _.map json.enrollments, (en) -> ENV.CONTEXTS['sections'][en.course_section_id]

users = {}
if observerEnrollments.length == 1 && !observerEnrollments[0].observed_user
if observerEnrollments.length >= 1 && _.all(observerEnrollments, (enrollment) -> !enrollment.observed_user)
users[''] = {name: I18n.t('nobody', 'nobody')}
else
for en in observerEnrollments
Expand Down
22 changes: 21 additions & 1 deletion app/coffeescripts/views/groups/manage/AssignToGroupMenu.coffee
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
define [
'compiled/views/groups/manage/PopoverMenuView'
'compiled/views/groups/manage/GroupCategoryCloneView'
'compiled/models/GroupUser'
'jst/groups/manage/assignToGroupMenu'
'jquery'
'underscore'
'compiled/jquery/outerclick'
], (PopoverMenuView, GroupUser, template, $, _) ->
], (PopoverMenuView, GroupCategoryCloneView, GroupUser, template, $, _) ->

class AssignToGroupMenu extends PopoverMenuView

Expand All @@ -31,6 +32,25 @@ define [
e.preventDefault()
e.stopPropagation()
newGroupId = $(e.currentTarget).data('group-id')
userId = @model.id

if @collection.get(newGroupId).get("has_submission")
@cloneCategoryView = new GroupCategoryCloneView
model: @model.collection.category
openedFromCaution: true
@cloneCategoryView.open()
@cloneCategoryView.on "close", =>
if @cloneCategoryView.cloneSuccess
window.location.reload()
else if @cloneCategoryView.changeGroups
@moveUser(newGroupId)
else
$("[data-user-id='#{userId}']").focus()
@hide()
else
@moveUser(newGroupId)

moveUser: (newGroupId) ->
@collection.category.reassignUser(@model, @collection.get(newGroupId))
@hide()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ define [
'i18n!EditGroupAssignmentView'
'compiled/views/DialogFormView'
'compiled/collections/GroupCollection'
'compiled/views/groups/manage/GroupCategoryCloneView'
'jst/groups/manage/editGroupAssignment'
'jst/EmptyDialogFormWrapper'
], ($, _, I18n, DialogFormView, GroupCollection, template, wrapper) ->
], ($, _, I18n, DialogFormView, GroupCollection, GroupCategoryCloneView, template, wrapper) ->

class EditGroupAssignmentView extends DialogFormView

Expand Down Expand Up @@ -41,8 +42,26 @@ define [
e.preventDefault()
e.stopPropagation()
targetGroup = @$('option:selected').val()
if targetGroup then @group.collection.category.reassignUser(@model, @group.collection.get(targetGroup))
@close()

if targetGroup
if @group.get('has_submission') or @group.collection.get(targetGroup).get('has_submission')
@close()
@cloneCategoryView = new GroupCategoryCloneView
model: @model.collection.category
openedFromCaution: true
@cloneCategoryView.open()
@cloneCategoryView.on "close", =>
if @cloneCategoryView.cloneSuccess
window.location.reload()
else if @cloneCategoryView.changeGroups
@moveUser(targetGroup, false)
else
@moveUser(targetGroup, true)

moveUser: (targetGroup, closeDialog) ->
@group.collection.category.reassignUser(@model, @group.collection.get(targetGroup))
if closeDialog
@close()
# focus override to the user's new group heading if they're moved
$("[data-id='#{targetGroup}'] .group-heading")?.focus()

Expand Down
Loading

0 comments on commit 869e0da

Please sign in to comment.