Interface

This commit is contained in:
2008-03-06 20:08:01 -03:00
parent 304a41f610
commit 8671d2350b
4 changed files with 6 additions and 4 deletions

View File

@@ -19,7 +19,9 @@ class CoursesController < ApplicationController
#after_filter :cache_sweep, :only => [ :create, :update, :destroy ]
def index
@courses = Course.find(:all, :order => 'period asc, full_name asc')
@courses = Course.find(:all,
:order => 'period asc, full_name asc',
:conditions => (logged_in? and !@current_user.courses.empty? ? [ 'id not in (?)', @current_user.courses] : ''))
respond_to do |format|
format.html