changing course setting from DB

changing course setting from DB

by m question -
Number of replies: 3

Hi,

where this setting is stored in Moodle database

"Calculate the end date from the number of sections"

Average of ratings: -
In reply to m question

Re: changing course setting from DB

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
That doesn't sound like the sort of thing that would be in the database, but...

Don't. Don't ever make direct changes in the database. A load of stuff is cached and it's not likely to work as you expect.

A bit more info about what you are wanting to do will probably help us give you a more useful answer. 
In reply to Howard Miller

Re: changing course setting from DB

by m question -
Thank you,
I have more than 600 courses
by default, this option "Calculate the end date from the number of sections" is enabled, and courses had only 5 weeks

after 5 weeks, the courses disappeared from the courses lists (all courses are still active and students can access them using their dashboard)
but it is confusing for many of them and I received many questions about why their courses "disappear" from the list
Moodle does not support changing the courses settings after creating them in bulk
the number of courses is really large to change it one by one
so I am trying to change this option using DB
In reply to m question

Re: changing course setting from DB

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
I see your problem. In this case the setting you want is in the table...

mdl_course_format_options

I would update the settings and then purge the Moodle caches just to be sure. 

I have to advise you to take a database backup before doing anything like this. 
Average of ratings: Useful (1)