Problem:
The command aggregate for a collection needs a cursor option (mongodb 3.6
https://docs.mongodb.com/manual/reference/command/aggregate/#dbcmd.aggregate)
Solution:
Location:
/edx/app/edxapp/edx-platform/common/lib/xmodule/xmodule/contentstore/mongo.py
function: get_all_content_for_course
change the next code:
items = self.fs_files.aggregate(pipeline_stages)
if items['result']:
result = items['result'][0]
count = result['count']
assets = list(result['results'])
else:
no results
count = 0
assets = []
for this:
count = 0
assets = []
items = self.fs_files.aggregate(pipeline_stages,cursor=
{"batchSize": 0 })
for result in items:
count= result['count']
assets=list(result['results'])
--
You received this message because you are subscribed to the Google Groups
"General Open edX discussion" group.
To view this discussion on the web visit
https://groups.google.com/d/msgid/edx-code/49ac8116-d34f-4115-a07e-fd7b78a129ee%40googlegroups.com.