Class: UCB::LDAP::StudentTerm
- Inherits:
-
Entry
- Object
- Entry
- UCB::LDAP::StudentTerm
show all
- Defined in:
- lib/ucb_ldap/student_term.rb
Overview
UCB::LDAP::StudentTerm
This class models a student’s term entries in the UCB LDAP directory.
terms = StudentTerm.find_by_uid("1234")
StudentTerms are usually loaded through a Person instance:
p = Person.find_by_uid("1234") terms = p.student_terms
Note on Binds
You must have a privileged bind and pass your credentials to UCB::LDAP.authenticate() before performing your StudentTerm search.
Constant Summary
Constants inherited
from Entry
Entry::TESTING
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Entry
#assigned_attributes, #attributes, canonical, #canonical, combine_filters, create, create!, #delete, #delete!, #dn, entity_name, filter_in, find_by_dn, #initialize, make_search_filter, #method_missing, #modify, #modify_operations, #net_ldap, net_ldap, object_classes, required_attributes, required_schema_attributes, schema_attribute, schema_attributes_array, schema_attributes_hash, search, set_schema_attributes, #setter_method?, tree_base, tree_base=, unique_object_class, #update_attributes, #update_attributes!, #value_getter, #value_setter
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
in the class UCB::LDAP::Entry
Class Method Details
.find_by_uid(uid) ⇒ Object
Returns an Array of JobAppointment for uid
, sorted by record_number(). Returns an empty Array ([]) if nothing is found.
91
92
93
94
95
|
# File 'lib/ucb_ldap/student_term.rb', line 91
def self.find_by_uid(uid)
base = "uid=#{uid},ou=people,dc=berkeley,dc=edu"
filter = Net::LDAP::Filter.eq("objectclass", 'berkeleyEduPersonTerm')
search(:base => base, :filter => filter)
end
|
Instance Method Details
#change_datetime ⇒ Object
22
23
24
|
# File 'lib/ucb_ldap/student_term.rb', line 22
def change_datetime
UCB::LDAP.local_datetime_parse(berkeleyEduStuChangeDate)
end
|
#college_code ⇒ Object
26
27
28
|
# File 'lib/ucb_ldap/student_term.rb', line 26
def college_code
berkeleyEduStuCollegeCode
end
|
#college_name ⇒ Object
30
31
32
|
# File 'lib/ucb_ldap/student_term.rb', line 30
def college_name
berkeleyEduStuCollegeName
end
|
#level_code ⇒ Object
34
35
36
|
# File 'lib/ucb_ldap/student_term.rb', line 34
def level_code
berkeleyEduStuEduLevelCode
end
|
#level_name ⇒ Object
38
39
40
|
# File 'lib/ucb_ldap/student_term.rb', line 38
def level_name
berkeleyEduStuEduLevelName
end
|
#major_code ⇒ Object
50
51
52
|
# File 'lib/ucb_ldap/student_term.rb', line 50
def major_code
berkeleyEduStuMajorCode
end
|
#major_name ⇒ Object
54
55
56
|
# File 'lib/ucb_ldap/student_term.rb', line 54
def major_name
berkeleyEduStuMajorName
end
|
#registration_status_code ⇒ Object
58
59
60
|
# File 'lib/ucb_ldap/student_term.rb', line 58
def registration_status_code
berkeleyEduStuRegStatCode
end
|
#registration_status_name ⇒ Object
62
63
64
|
# File 'lib/ucb_ldap/student_term.rb', line 62
def registration_status_name
berkeleyEduStuRegStatName
end
|
#role_code ⇒ Object
42
43
44
|
# File 'lib/ucb_ldap/student_term.rb', line 42
def role_code
berkeleyEduStuEduRoleCode
end
|
#role_name ⇒ Object
46
47
48
|
# File 'lib/ucb_ldap/student_term.rb', line 46
def role_name
berkeleyEduStuEduRoleName
end
|
#term_code ⇒ Object
66
67
68
|
# File 'lib/ucb_ldap/student_term.rb', line 66
def term_code
berkeleyEduStuTermCode
end
|
#term_name ⇒ Object
70
71
72
|
# File 'lib/ucb_ldap/student_term.rb', line 70
def term_name
berkeleyEduStuTermName
end
|
#term_status ⇒ Object
74
75
76
|
# File 'lib/ucb_ldap/student_term.rb', line 74
def term_status
berkeleyEduStuTermStatus
end
|
#term_year ⇒ Object
78
79
80
|
# File 'lib/ucb_ldap/student_term.rb', line 78
def term_year
berkeleyEduStuTermYear
end
|
#under_graduate_code ⇒ Object
82
83
84
|
# File 'lib/ucb_ldap/student_term.rb', line 82
def under_graduate_code
berkeleyEduStuUGCode
end
|