File tree 2 files changed +13
-2
lines changed
server_extensions/assignment_list
2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -172,8 +172,13 @@ def parse_assignments(self):
172
172
info ['has_exchange_feedback' ] = has_exchange_feedback
173
173
info ['feedback_updated' ] = feedback_updated
174
174
if has_local_feedback :
175
- info ['local_feedback_path' ] = os .path .join (
176
- assignment_dir , 'feedback' , info ['timestamp' ])
175
+ full_path_assignment_dir = os .path .abspath (assignment_dir )
176
+ if os .path .exists (full_path_assignment_dir ):
177
+ info ['local_feedback_path' ] = os .path .join (
178
+ full_path_assignment_dir , 'feedback' , info ['timestamp' ])
179
+ else :
180
+ info ['local_feedback_path' ] = os .path .join (
181
+ assignment_dir , 'feedback' , info ['timestamp' ])
177
182
else :
178
183
info ['local_feedback_path' ] = None
179
184
Original file line number Diff line number Diff line change @@ -140,6 +140,12 @@ def list_submitted_assignments(self, course_id=None):
140
140
}
141
141
else :
142
142
for assignment in assignments :
143
+ for submission in assignment ["submissions" ]:
144
+ if submission ['local_feedback_path' ] \
145
+ and os .path .exists (submission ['local_feedback_path' ]):
146
+ submission ['local_feedback_path' ] = \
147
+ os .path .relpath (submission ['local_feedback_path' ],
148
+ self ._root_dir )
143
149
assignment ["submissions" ] = sorted (
144
150
assignment ["submissions" ],
145
151
key = lambda x : x ["timestamp" ])
You can’t perform that action at this time.
0 commit comments