Skip to main content

New Semester Site Creation

Goal: prepare and clone the Moodle production site for the new semester using the validated template from EL-CRON.

Pre-Checks

  1. Ensure the template site is up to date (latest Moodle version and all plugins updated) – see Chapter 2 – Template Validation.
  2. Confirm the baseline configuration (theme, categories, settings) is ready for cloning.
  3. Ensure the OpenLiteSpeed logs show no fatal errors for the template site:
    ssh 192.168.23.128 'tail -n 100 /usr/local/lsws/logs/error.log'

Cloning Process

  1. Create Moodle Web Directory:
    cp -a /elearning_data/template/{platformname}_template45 /elearning_data/production/{platformname}_{semester}
  2. Create Moodledata Directory:
    cp -a /elearning_data/template/production_{platformname}_template45 /elearning_data/production/production_{platformname}_{semester}
  3. Clone Database:
    mysqldump -h192.168.23.167 -u root -p production_{platformname}_template45 \
        | mysql -h192.168.23.167 -u root -p production_{platformname}_{semester}

Configuration Updates

  1. Edit config.php in the new Moodle web directory:
    • Update $CFG->dbname to production_{platformname}_{semester}
    • Update $CFG->wwwroot to the new semester URL (example: https://{platformname}.umt.edu.my/{semester})
    • Update $CFG->dataroot to /elearning_data/production/production_{platformname}_{semester}
  2. Ensure permissions are correct:
    chown -R nobody:nogroup /elearning_data/production/{platformname}_{semester}
    chown -R nobody:nogroup /elearning_data/production/production_{platformname}_{semester}

Post-Clone Adjustments

  1. Log in as admin to the new semester site.
  2. Go to Site administration → Notifications and complete any pending database upgrade steps.
  3. Remove old semester-specific banners or announcements.
  4. Confirm cron is running:
    /usr/local/lsws/lsphp82/bin/php /elearning_data/production/{platformname}_{semester}/admin/cli/cron.php

Validation

  1. Access the front page and confirm the site loads without errors.
  2. Check Site administration → Plugins → Plugins overview for any missing updates.
  3. Verify the correct semester name and platform branding are displayed.
  4. Test login for a sample lecturer and student account.

Handover

  • Notify lecturers that the new semester site is live and ready for course content preparation.
  • Remind that course content updates are handled by lecturers, not during the cloning process.