Closed igobranco closed 6 months ago
After some investigation, I can conclude that the courses were created as manual runs.
From what I've checked, there are 4 course_runs
registered, all with the same dates, times and resource_links
.
# There are 4 objects in this query
<TranslatableQuerySet [
<CourseRun: Course run 645 starting 24/05/05 23:00 - >,
<CourseRun: Course run 714 starting 24/05/05 23:00 - >,
<CourseRun: Course run 717 starting 24/05/05 23:00 - >,
<CourseRun: Course run 533 starting 23/05/02 00:00 - >
]>
All of them have manual has their sync_mode
.
I have no idea why it happened like this but the option currently on top of the table is to remove these 3 Course Run entries.
On of the course run was set to automatically sync, as referenced by @igobranco. All of the course runs created were erased via python shell.
The course run is now displaying the information properly.
@sandroscosta please write the command that was run?
Commands to check this issue
Run these commands inside the Richie container by running python manage.py shell
.
Import course model and fetch course instance
from richie.apps.courses.models import Course
# get course instance
course = Course.objects.filter(code='ILP')
Check course run Every course has on or two page instances, if it has one or two languages defined. By default, PT and EN are created. Course runs do not duplicate between languages.
# this returns a <TranslatableQuerySet> of course_runs
course[0].course_runs
# you can also use course_runs_dict
course[0].course_runs_dict
**Remove course runs that might have sync issues.
You can always use sync_mode
to check the course_run sync mode.
course[0].course_run[0].sync_mode
# to remove the course run
course[0].course_run[0].delete()
Once the offending course_run is taking care of, the page will again display all course_runs
The courses to be shown on NAU Richie that as course runs on edx.org aren't being shown correctly.
Example: https://www.nau.edu.pt/pt/curso/iniciacao-a-lingua-portuguesa/
There are 2 course runs, but any are showing on side page of the course. Using the API https://www.nau.edu.pt/api/v1.0/courses/?limit=21&offset=0&organizations=942 we can view that there are 2 course runs.
I've got a feeling that the Synchronization mode wasn't put in Manual, and Richie backend isn't validating it. Then the frontend crashes because of the synchronization mode, impossibility the user to fix the its data.
Documented from a meeting with @carolinamado