Import course in Admin Backend

Description

I have been working in edx-platform since a long duration of time.
When we import a course from the CMS there is an issue I met while importing that.
When we already have any section/unit in Course but is not is the course that we are importing these course are kept in mongodb as it is the one that are same are replaced.
I just want to know if that was kept like that or is really a bug.
If that is a bug I would suggest to update the revision counter to something other than "draft" or "null" that can help recognizing.

Thanks and Regards
Chand Prakash

Steps to Reproduce

None

Current Behavior

None

Expected Behavior

None

Reason for Variance

None

Release Notes

None

User Impact Summary

None

Activity

Show:
Zubair Afzal
September 26, 2014, 2:16 PM

I am closing this issue as not a bug. If you have issue you can reopen it.

Zubair Afzal
September 26, 2014, 1:21 PM

to get orphans problems you will have to calculate them by traversing upward from problems to course. To have an ideathis view orphan_handler will return you the list of orphans for a course_key_string or you can do this directly:

chand prakash singh rawat
September 26, 2014, 1:10 PM

I can understand that thanks for the explanation.
Just a small question how can I get orphan_problems_count. It that there with course object or it has to be calculated.
If that needs to be calculated please let me have a hint for the same so that I can resolve the issues I was facing from a quite long duration.

Thanks for the help again.

Zubair Afzal
September 26, 2014, 12:44 PM
Edited

The thing is if there is a record in mongo like:

and you import a course which don't have this problem. So during referencing after importing a course this module will not have any parent so it will be in mongo but not be a part of course. This is the reason you are getting wrong number of problems (more then they need to be). So actual count of problems would be total_problems_count - orphan_problems_count.
To get a rough idea of how much orphans does your course have you can use a uri like this:

Please let me know if there is still any confusion.

chand prakash singh rawat
September 26, 2014, 12:16 PM

Thanks for attention Zubair
Here is the actual scenario:-
Suppose there is a course in mongo db whose course problem is below:-

"_id" : {
"tag" : "i4x",
"org" : "org_name",
"course" : "course_id",
"category" : "problem",
"name" : "202680ce24244ebdb345167ff599b9f0",
"revision" : null
},

now what I do is replace the course with a new course but I remove this problem from the course that will be imported.
This is what will happen :-
All the records in Mongodb that are not in the course that is being imported will be replaced and the problem that was in course earlier but now it is not there that remains as it in Mongodb.
Now if I count number of problems in Mongodb using
"org" : "org_name",
"course" : "course_id",
"category" : "problem",
This will show me a wrong count. As the problem that was in mongoDB has not been replaced.

Do let me know if you need more explanation.

Not a Bug

Assignee

Zubair Afzal

Reporter

chand prakash singh rawat

Labels

Reach

None

Impact

None

Platform Area

None

Customer

None

Partner Manager

None

URL

None

Contributor Name

None

Groups with Read-Only Access

None

Actual Points

None

Category of Work

None

Platform Map Area (Levels 1 & 2)

None

Platform Map Area (Levels 3 & 4)

None

Priority

CAT-3