Skip to content
This repository was archived by the owner on Jun 30, 2024. It is now read-only.

Commit 9504888

Browse files
committed
course was hard coded -- someone should have written a unit test.
1 parent 64bc325 commit 9504888

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

controllers/admin.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1690,7 +1690,6 @@ def _copy_one_assignment(course, oldid):
16901690
return "success"
16911691

16921692

1693-
16941693
@auth.requires(lambda: verifyInstructorStatus(auth.user.course_name, auth.user), requires_login=True)
16951694
def courselog():
16961695
thecourse = db(db.courses.id == auth.user.course_id).select().first()
@@ -1699,12 +1698,11 @@ def courselog():
16991698
data = pd.read_sql_query("""
17001699
select sid, useinfo.timestamp, event, act, div_id, chapter, subchapter
17011700
from useinfo left outer join questions on div_id = name and questions.base_course = '{}'
1702-
where course_id = 'fopp'
1701+
where course_id = '{}'
17031702
order by useinfo.id
17041703
""".format(thecourse.base_course, course), settings.database_uri)
17051704
data = data[~data.sid.str.contains('@')]
17061705

1707-
17081706
response.headers['Content-Type']='application/vnd.ms-excel'
17091707
response.headers['Content-Disposition']= 'attachment; filename=data_for_{}.csv'.format(auth.user.course_name)
17101708
return data.to_csv(na_rep=" ")

0 commit comments

Comments
 (0)