Skip to content

Commit 5bd3590

Browse files
committed
Remove pdb
1 parent a968121 commit 5bd3590

File tree

2 files changed

+17
-3
lines changed

2 files changed

+17
-3
lines changed

nbgrader/nbextensions/course_list/course_list.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,17 +123,23 @@ define([
123123

124124
Course.prototype.make_row = function () {
125125
var row = $('<div/>').addClass('col-md-12');
126+
var course_id = this.course_id;
127+
128+
if(course_id === '') {
129+
course_id = 'Default formgrader';
130+
}
131+
126132
var container = $('<span/>').addClass('item_name col-sm-2').append(
127133
$('<a/>')
128134
.attr('href', this.url)
129135
.attr('target', '_blank')
130-
.text(this.course_id));
136+
.text(course_id));
131137
row.append(container);
132138
row.append($('<span/>').addClass('item_course col-sm-2').text(this.formgrader_kind));
133139
this.element.empty().append(row);
134140
};
135141

136142
return {
137-
'CourseList': CourseList,
143+
'CourseList': CourseList
138144
};
139145
});

nbgrader/server_extensions/course_list/handlers.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,13 @@ def check_for_local_formgrader(self, config):
7575
self.log.error(traceback.format_exc())
7676
raise gen.Return([])
7777

78+
coursedir = CourseDirectory(config=config)
79+
if not coursedir.course_id:
80+
gen.Return([])
81+
7882
if status:
7983
raise gen.Return([{
80-
'course_id': config.CourseDirectory.course_id,
84+
'course_id': coursedir.course_id,
8185
'url': base_url + '/formgrader',
8286
'kind': 'local'
8387
}])
@@ -96,6 +100,7 @@ def check_for_noauth_jupyterhub_formgraders(self, config):
96100
# We are running on JupyterHub, so maybe there's a formgrader
97101
# service. Check if we have a course id and if so guess the path to the
98102
# formgrader.
103+
99104
coursedir = CourseDirectory(config=config)
100105
if not coursedir.course_id:
101106
raise gen.Return([])
@@ -169,6 +174,9 @@ def get(self):
169174
courses = []
170175
local_courses = yield self.check_for_local_formgrader(config)
171176
jhub_courses = yield self.check_for_jupyterhub_formgraders(config)
177+
178+
import pdb; pdb.set_trace()
179+
172180
courses.extend(local_courses)
173181
courses.extend(jhub_courses)
174182

0 commit comments

Comments
 (0)