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.
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, 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.
92
93
94
95
96
|
# File 'lib/ucb_ldap_student_term.rb', line 92
def 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
23
24
25
|
# File 'lib/ucb_ldap_student_term.rb', line 23
def change_datetime
UCB::LDAP.local_datetime_parse(berkeleyEduStuChangeDate)
end
|
#college_code ⇒ Object
27
28
29
|
# File 'lib/ucb_ldap_student_term.rb', line 27
def college_code
berkeleyEduStuCollegeCode
end
|
#college_name ⇒ Object
31
32
33
|
# File 'lib/ucb_ldap_student_term.rb', line 31
def college_name
berkeleyEduStuCollegeName
end
|
#level_code ⇒ Object
35
36
37
|
# File 'lib/ucb_ldap_student_term.rb', line 35
def level_code
berkeleyEduStuEduLevelCode
end
|
#level_name ⇒ Object
39
40
41
|
# File 'lib/ucb_ldap_student_term.rb', line 39
def level_name
berkeleyEduStuEduLevelName
end
|
#major_code ⇒ Object
51
52
53
|
# File 'lib/ucb_ldap_student_term.rb', line 51
def major_code
berkeleyEduStuMajorCode
end
|
#major_name ⇒ Object
55
56
57
|
# File 'lib/ucb_ldap_student_term.rb', line 55
def major_name
berkeleyEduStuMajorName
end
|
#registration_status_code ⇒ Object
59
60
61
|
# File 'lib/ucb_ldap_student_term.rb', line 59
def registration_status_code
berkeleyEduStuRegStatCode
end
|
#registration_status_name ⇒ Object
63
64
65
|
# File 'lib/ucb_ldap_student_term.rb', line 63
def registration_status_name
berkeleyEduStuRegStatName
end
|
#role_code ⇒ Object
43
44
45
|
# File 'lib/ucb_ldap_student_term.rb', line 43
def role_code
berkeleyEduStuEduRoleCode
end
|
#role_name ⇒ Object
47
48
49
|
# File 'lib/ucb_ldap_student_term.rb', line 47
def role_name
berkeleyEduStuEduRoleName
end
|
#term_code ⇒ Object
67
68
69
|
# File 'lib/ucb_ldap_student_term.rb', line 67
def term_code
berkeleyEduStuTermCode
end
|
#term_name ⇒ Object
71
72
73
|
# File 'lib/ucb_ldap_student_term.rb', line 71
def term_name
berkeleyEduStuTermName
end
|
#term_status ⇒ Object
75
76
77
|
# File 'lib/ucb_ldap_student_term.rb', line 75
def term_status
berkeleyEduStuTermStatus
end
|
#term_year ⇒ Object
79
80
81
|
# File 'lib/ucb_ldap_student_term.rb', line 79
def term_year
berkeleyEduStuTermYear
end
|
#under_graduate_code ⇒ Object
83
84
85
|
# File 'lib/ucb_ldap_student_term.rb', line 83
def under_graduate_code
berkeleyEduStuUGCode
end
|