Skip to content

Commit

Permalink
Merge pull request #153 from lepo-project/import-oneroster-data
Browse files Browse the repository at this point in the history
Release v0.3.1
  • Loading branch information
kyoshizaki authored Nov 9, 2018
2 parents 802edaf + cda7f54 commit 41463a8
Show file tree
Hide file tree
Showing 54 changed files with 500 additions and 138 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

# Ignore the default SQLite database.
/db/*.sqlite3
/db/*.sqlite3-journal
/db/*.sqlite3*
/db/schema.rb

# Ignore all logfiles and tempfiles.
Expand Down
4 changes: 3 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ git_source(:github) do |repo_name|
"https://github.com/#{repo_name}.git"
end

# Fix autoprefixer-rails verstion 8 to precompile assets with therubyracer
gem 'autoprefixer-rails', '~>8.6.5'
gem 'autosize', '~> 2.4'
gem 'bootstrap', '~> 4.1.0'
# gem "chartkick"
Expand Down Expand Up @@ -34,6 +36,7 @@ gem 'shrine', '~> 2.11.0'
# gem 'therubyracer', platforms: :ruby
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '~> 4.1.14'
gem 'whenever', require: false

group :development, :test do
gem 'sqlite3', '~> 1.3.0'
Expand All @@ -48,7 +51,6 @@ group :development do
# meta_request is necessary for rails_panel chrome extension
# gem 'meta_request'
gem 'rubocop', require: false
gem 'scss_lint', '~> 0.57.0', require: false
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring'
gem 'spring-watcher-listen', '~> 2.0.0'
Expand Down
43 changes: 22 additions & 21 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ GEM
io-like (~> 0.3.0)
arel (7.1.4)
ast (2.4.0)
autoprefixer-rails (9.1.4)
autoprefixer-rails (8.6.5)
execjs
autosize (2.4.0.0)
bindex (0.5.0)
Expand All @@ -78,6 +78,7 @@ GEM
chromedriver-helper (2.1.0)
archive-zip (~> 0.10)
nokogiri (~> 1.8)
chronic (0.10.2)
climate_control (0.2.0)
coffee-rails (4.2.2)
coffee-script (>= 2.2.0)
Expand All @@ -88,12 +89,12 @@ GEM
coffee-script-source (1.12.2)
combine_pdf (1.0.15)
ruby-rc4 (>= 0.1.5)
concurrent-ruby (1.0.5)
concurrent-ruby (1.1.3)
crass (1.0.4)
database_cleaner (1.6.2)
domain_name (0.5.20180417)
unf (>= 0.0.5, < 1.0.0)
down (4.6.0)
down (4.6.1)
addressable (~> 2.5)
erubis (2.7.0)
execjs (2.7.0)
Expand All @@ -110,7 +111,7 @@ GEM
http-cookie (1.0.3)
domain_name (~> 0.5)
http_accept_language (2.1.1)
i18n (1.1.0)
i18n (1.1.1)
concurrent-ruby (~> 1.0)
i18n_generators (2.2.0)
activerecord (>= 3.0.0)
Expand All @@ -134,12 +135,12 @@ GEM
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
ruby_dep (~> 1.2)
loofah (2.2.2)
loofah (2.2.3)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
mail (2.7.0)
mail (2.7.1)
mini_mime (>= 0.1.1)
method_source (0.9.0)
method_source (0.9.1)
mime-types (3.2.2)
mime-types-data (~> 3.2015)
mime-types-data (3.2018.0812)
Expand All @@ -156,7 +157,7 @@ GEM
net-ldap (0.16.1)
netrc (0.11.0)
nio4r (2.3.1)
nokogiri (1.8.4)
nokogiri (1.8.5)
mini_portile2 (~> 2.3.0)
paperclip (6.0.0)
activemodel (>= 4.2.0)
Expand All @@ -165,12 +166,12 @@ GEM
mimemagic (~> 0.3.0)
terrapin (~> 0.6.0)
parallel (1.12.1)
parser (2.5.1.2)
parser (2.5.3.0)
ast (~> 2.4.0)
popper_js (1.14.3)
powerpack (0.1.2)
public_suffix (3.0.3)
rack (2.0.5)
rack (2.0.6)
rack-test (0.6.3)
rack (>= 1.0)
rails (5.0.7)
Expand Down Expand Up @@ -210,21 +211,21 @@ GEM
http-cookie (>= 1.0.2, < 2.0)
mime-types (>= 1.16, < 4.0)
netrc (~> 0.8)
rubocop (0.59.2)
rubocop (0.60.0)
jaro_winkler (~> 1.5.1)
parallel (~> 1.10)
parser (>= 2.5, != 2.5.1.1)
powerpack (~> 0.1)
rainbow (>= 2.2.2, < 4.0)
ruby-progressbar (~> 1.7)
unicode-display_width (~> 1.0, >= 1.0.1)
unicode-display_width (~> 1.4.0)
ruby-progressbar (1.10.0)
ruby-rc4 (0.1.5)
ruby-vips (2.0.13)
ffi (~> 1.9)
ruby_dep (1.5.0)
rubyzip (1.2.2)
sass (3.6.0)
sass (3.7.0)
sass-listen (~> 4.0.0)
sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4)
Expand All @@ -235,12 +236,9 @@ GEM
sprockets (>= 2.8, < 4.0)
sprockets-rails (>= 2.0, < 4.0)
tilt (>= 1.1, < 3)
scss_lint (0.57.1)
rake (>= 0.9, < 13)
sass (~> 3.5, >= 3.5.5)
selenium-webdriver (3.14.0)
selenium-webdriver (3.141.0)
childprocess (~> 0.5)
rubyzip (~> 1.2)
rubyzip (~> 1.2, >= 1.2.2)
shrine (2.11.0)
down (~> 4.1)
spring (2.0.2)
Expand Down Expand Up @@ -280,14 +278,17 @@ GEM
websocket-driver (0.6.5)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.3)
xpath (3.1.0)
whenever (0.10.0)
chronic (>= 0.6.3)
xpath (3.2.0)
nokogiri (~> 1.8)

PLATFORMS
ruby

DEPENDENCIES
annotate (~> 2.7.0)
autoprefixer-rails (~> 8.6.5)
autosize (~> 2.4)
bootstrap (~> 4.1.0)
byebug
Expand Down Expand Up @@ -317,7 +318,6 @@ DEPENDENCIES
rest-client (~> 2.0.0)
rubocop
sass-rails (~> 5.0.6)
scss_lint (~> 0.57.0)
selenium-webdriver (~> 3.4)
shrine (~> 2.11.0)
spring
Expand All @@ -326,6 +326,7 @@ DEPENDENCIES
uglifier (~> 4.1.14)
unicorn (~> 5.4.0)
web-console (>= 3.6.0)
whenever

BUNDLED WITH
1.16.2
1.17.1
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ LePo is a Web-based LMS (Learning Management System) that is developing with the

1. rails db:migrate

1. set "SECRET_KEY_BASE_DEVELOPMENT" and "SECRET_KEY_BASE_TEST" values as environment variable
(the values can be obtained by "rails secret" command)

1. rails s -b 127.0.0.1

1. access the top page ( localhost:3000 ) with web browser and follow the shown instruction.
Expand All @@ -26,7 +29,7 @@ LePo is a Web-based LMS (Learning Management System) that is developing with the

# For Production Environment

* set "SECRET_KEY_BASE" value as environment variable
* set "SECRET_KEY_BASE_PRODUCTION" value as environment variable

* recommended environments: Nginx, Unicorn and MariaDB (MySQL)

Expand Down
2 changes: 1 addition & 1 deletion app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ def render_content_page(pg, force_replace_all = false)
# def send_push_notification(registration_id)
# fcm_url = 'https://fcm.googleapis.com/fcm/send'
# payload = "{\"registration_ids\":[\"" + registration_id + "\"],\"delay_while_idle\":true,\"collapse_key\":\"lepo\"}"
# headers = { content_type: :json, accept: :json, Authorization: 'key=' + FCM_AUTHORIZATION_KEY }
# headers = { content_type: :json, accept: :json, Authorization: 'key=' + Rails.application.secrets.fcm_authorization_key }
# RestClient.post fcm_url, payload, headers
# end

Expand Down
6 changes: 3 additions & 3 deletions app/controllers/course_members_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -169,15 +169,15 @@ def autocomplete_manager
private

def get_resources
@course = Course.find session[:nav_id]
@course = Course.find_enabled_by session[:nav_id]
@managers = User.sort_by_signin_name @course.managers
@assistants = User.sort_by_signin_name @course.assistants
@learners = User.sort_by_signin_name @course.learners
end

def update_role(user_id, course_id, role)
course_member = CourseMember.find_by(user_id: user_id, course_id: course_id)
course = Course.find course_id
course = Course.find_enabled_by course_id
if course_member
if (course_member.role == 'manager') && (course.evaluator? user_id)
flash.now[:message] = 'レッスンの評価担当者は、教師である必要があります'
Expand All @@ -204,7 +204,7 @@ def invalid_autocomplete_request?(param)
def exclude_members(tmp_managers, course_id)
excludes = tmp_managers.nil? ? [] : tmp_managers.map(&:to_i)
# Considering that the value of course_id is -1 (new course), use find_by instead of find
course = Course.find_by(id: course_id)
course = Course.find_enabled_by course_id
return excludes if course.nil?
learners = course.learners
learners.each do |l|
Expand Down
Loading

0 comments on commit 41463a8

Please sign in to comment.