Collaborative learning tool based on Ruby on Rails
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
app
config
db
doc
lib
log
public
script
test
vendor
.gitignore
Gemfile
Gemfile.lock
Procfile
README.rdoc
Rakefile
config.ru

README.rdoc

Collablearn

Collablearn is a social network for the purpose of online learning and sharing of knowledge and wisdom.

Terminology

In this documentation, maintained means CRUD (Create, Read, Update, Delete)

The Structure

In Collablearn, two usergroups are targeted. One usergroup is the one which only wants to consume and not to contribute. This usergroup is the “consumer”-usergroup The other usergroup is the group of users which registered for the service and collaborate and deliver content. This usergroup is the “prosumer”-usergroup.

For all this groups there are two specific “areas” in the application:

  1. “Consumer”

All Pages available through the "pages"-controller are also available for the non-registered users. This pages are "static" (in terms of userdata) and can be accessed without creating an account.
  1. “Prosumer”

The whole application (and of course the "pages"-controller pages) are accessible for a registered user (of course with the respect of the users-rights).

Functionality

A “Consumer” can see collections, users-profiles and can search the collablearn database. He can also learn collections without creating an account. If he want to generate content, he needs to register. The “Prosumer” can create an account and can add detailed information associated to his account (name, bio etc.). He can update the password of his account, can create collections, questions and fellowships to collections and other users. The collections and questions created by him can be maintained by him.

Who can do what?

  1. Users

Of course, only the user can update his account-infos and password. Only he is able to maintain his fellowships.
If a user is deleted, the collections and questions associated to his account will be deleted aswell.
  1. Collections

One collection always has (ONLY) one owner. This owner can maintain the whole collection (he can delete the collection, questions in the collection and update information for this collection). No other user can modify the content of a collection. If the collection is marked as "open" other members can contribute questions to this collection. Otherwise, only the owner of the collection can add questions to it.
If a collection is deleted, the questions corresponding to this collection will be deleted aswell.
  1. Questions

A Questions always belongs to (ONLY) one collection and (ONLY) one user.
A question can be either added to a collection created by the user (then, the user is able to maintain that question in the collection) or added to a foreign-collection (then only the owner of the collection can maintain the question (as mentioned above)).
If a question is deleted, only the question will be deleted.

Important implementations / files

  • app/helpers/application_helper.rb

    • Contains a helper for the title-attribute in the html-head

    • Contains devise-helpers to use devise in non-devise-forms

  • app/helpers/pages_helper.rb

    • Contains the acts_as_taggable_on pages-helper (for tag_cloud generation and so on)

  • app/views/devise/*.rb

    • Contains the whole views for the devise-usage

  • app/views/pages/_learn.js.erb

    • JavaScript only embedded in the learn-page for learning the questions without reloading the page

  • config/environments/*.rb

    • Mailer needs to be added here to get the right URL when sending E-Mail Messages

    • Added the Google Analytics Token (only in production.rb)

  • config/initializers/acts_as_taggable_on.rb

    • The config for the gem “acts-as-taggable-on” to delete not used tags and to lowercase all tags in the database

  • config/initializers/devise.rb

    • Configs for the devise-gem

  • config/initializers/json_escape.rb

    • For usage of safe json in html-templates (e.g. used in the learn-page for the json in the JavaScript)

  • config/initializers/mail.rb

    • The config for sending mails in development and production mode (uses the account infos of the collablearn sendgrid-account on heroku)

  • config/initializers/newrelic_reconnect.rb

    • When using unicorn and newrelic, on each deploy, the connection must be reestablished

  • config/initializers/simple_captcha.rb

    • Settings for the usage of simple_captcha

  • config/locales/*

    • Locales for devise

    • Locales for the simple_captcha gem

  • config/application.rb

    • Settings for locale, time and the logging behaviour

  • config/newrelic.yml

    • Configs for the newrelic environment

  • config/unicorn.rb

    • Settings for unicorn which will be loaded when deploying the app

  • Procfile

    • This file will be opened when deploying the app –> Unicorn will be stated when executing this file

Gems used

  • devise –> For Authentication, authorization and user management (e.g. forgotten passwords)

  • acts-as-taggable-on –> For the tagging feature available in the collections and user (self maintained –> dead resourcecs will be automatically deleted)

  • acts_as_follower –> For the fellowships (self maintained –> dead resourcecs will be automatically deleted)

  • unicorn –> Fot better performance on a heroku dyno

  • newrelic –> application monitoring

  • sass-rails –> More easy stylesheets

  • bootstra-sass –> Twitter Bootstrap for SASS

  • haml-rails –> HAML for the html-pages (with erb)

  • rails_autolink –> automatic generated links when detecting an internet-address

  • will_paginate –> For Pagination

  • galetahub-simple_captcha –> A simple captcha which can be embedded in forms

  • rails-i18n –> Easy internationalization for rails

  • coffee-rails –> Coffescript support for rails

  • jquery-rails –> jQuery in the asset pipeline for rails

  • pg –> Postgres Database support

  • google-analytics-rails –> Enables Google Analytic tracking

  • jquery-tablesorter –> Enables the possibility to sort tables with the help of JavaScript

Vendor assets used

  • fastclick.js –> Disables the mobile Browser 300ms delay when clicking an Element