Skip to content

Commit 02b20fb

Browse files
authored
Merge pull request #818 from uw-it-aca/hotfix/MUWM-3897
Hotfix/muwm 3897
2 parents f663d78 + 6fe4a20 commit 02b20fb

File tree

15 files changed

+15
-16
lines changed

15 files changed

+15
-16
lines changed

myuw/dao/instructor_schedule.py

+11-3
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@
2222
logger = logging.getLogger(__name__)
2323

2424

25-
def _get_instructor_sections(person, term, future_terms=0):
25+
def _get_instructor_sections(person, term,
26+
future_terms=0,
27+
include_secondaries=True):
2628
"""
2729
@return a uw_sws.models.ClassSchedule object
2830
Return the actively enrolled sections for the current user
@@ -31,7 +33,10 @@ def _get_instructor_sections(person, term, future_terms=0):
3133
if person is None or term is None:
3234
return None
3335
return get_sections_by_instructor_and_term(
34-
person, term, future_terms=future_terms,
36+
person,
37+
term,
38+
future_terms=future_terms,
39+
include_secondaries=include_secondaries,
3540
transcriptable_course='all')
3641

3742

@@ -164,7 +169,10 @@ def is_instructor(request):
164169
return True
165170

166171
person = get_person_of_current_user()
167-
sections = _get_instructor_sections(person, term, future_terms=2)
172+
sections = _get_instructor_sections(person,
173+
term,
174+
future_terms=2,
175+
include_secondaries=False)
168176
if len(sections) > 0:
169177
add_seen_instructor(user_netid, term)
170178
return True
Original file line numberDiff line numberDiff line change
@@ -34,18 +34,6 @@
3434
"SectionID":"A",
3535
"Year":"2013"},
3636
{"Href":"\/student\/v5\/course\/2013,spring,PHYS,121\/A.json",
37-
"CourseNumber":"121",
38-
"CurriculumAbbreviation":"PHYS",
39-
"Quarter":"spring",
40-
"SectionID":"A",
41-
"Year":"2013"},
42-
{"Href":"\/student\/v5\/course\/2013,spring,PHYS,121\/AC.json",
43-
"CourseNumber":"121",
44-
"CurriculumAbbreviation":"PHYS",
45-
"Quarter":"spring",
46-
"SectionID":"A",
47-
"Year":"2013"},
48-
{"Href":"\/student\/v5\/course\/2013,spring,PHYS,121\/AQ.json",
4937
"CourseNumber":"121",
5038
"CurriculumAbbreviation":"PHYS",
5139
"Quarter":"spring",

myuw/test/dao/instructor_schedule.py

+3
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ def test_is_instructor(self):
1919
get_request_with_user('bill', now_request)
2020
self.assertTrue(is_instructor(now_request))
2121

22+
get_request_with_user('billpce', now_request)
23+
self.assertTrue(is_instructor(now_request))
24+
2225
def test_get_current_quarter_instructor_schedule(self):
2326
now_request = get_request()
2427
get_request_with_user('bill', now_request)

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
'unittest2',
3535
'AuthZ-Group',
3636
'python-binary-memcached',
37-
'UW-RestClients-SWS<2.0,>=1.3',
37+
'UW-RestClients-SWS<2.0,>=1.4',
3838
'UW-RestClients-PWS<1.0',
3939
'UW-RestClients-HFS<1.0',
4040
'UW-RestClients-GWS<1.0',

0 commit comments

Comments
 (0)