Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-75195

Missing supportemail field on Moodle install_database.php

XMLWordPrintable

    • MOODLE_400_STABLE, MOODLE_401_STABLE
    • MOODLE_401_STABLE, MOODLE_402_STABLE
    • MDL-75195-401
    • MDL-75195-402
    • MDL-75195-master
    • Hide

      After using

      php admin/cli/install_database.php ...

      ... do the following:

      php admin/cli/cfg.php --name="noreplyaddress" --set="support@local.localhost"

      Show
      After using php admin/cli/install_database.php ... ... do the following: php admin/cli/cfg.php --name="noreplyaddress" --set="support@local.localhost"
    • Hide

      Testing instructions

       

      Test 1 - New param "support email"
      1- Create empty database and point your configuration at it.
      2- Run from the terminal the following script:

      php admin/cli/install_database.php --agree-license --adminpass=test --supportemail="support@example.com"  

      3- Access to your moodle instance and go to Server / Support contact
      4- Verify that "Support email" field is "support@example.com"
       
      Test 2 - Use adminemail as support email 
      1- Drop and re-create the database
      2- Run from the terminal the following script:

      php admin/cli/install_database.php --agree-license --adminpass=test --adminemail="adminemail@example.com"  

      3- Access to your moodle instance and go to Server / Support contact
      4- Verify that "Support email" is adminemail@example.com

      Test 3 - New CLI help string
      1- Run from the terminal the following script:

      php admin/cli/install_database.php -h

      2- Verify that there is an entry in the returned text that says '--supportemail=STRING Email address for support and help.'

      Test 4 - Validate supportemail
      1- Run from the terminal the following script (malformed email is set for supportemail):

      php admin/cli/install_database.php --agree-license --adminpass=test --supportemail="supportexamplecom"  

      2- Verify that you receive an error that says 'Error, incorrect value "supportexamplecom" for "supportemail"'

      Show
      Testing instructions   Test 1 - New param "support email" 1- Create empty database and point your configuration at it. 2- Run from the terminal the following script: php admin/cli/install_database.php --agree-license --adminpass=test --supportemail= "support@example.com"   3- Access to your moodle instance and go to Server / Support contact 4- Verify that "Support email" field is "support@example.com"   Test 2 - Use adminemail as support email   1- Drop and re-create the database 2- Run from the terminal the following script: php admin/cli/install_database.php --agree-license --adminpass=test --adminemail= "adminemail@example.com"   3- Access to your moodle instance and go to Server / Support contact 4- Verify that "Support email" is adminemail@example.com Test 3 - New CLI help string 1- Run from the terminal the following script: php admin/cli/install_database.php -h 2- Verify that there is an entry in the returned text that says ' --supportemail=STRING Email address for support and help. ' Test 4 - Validate supportemail 1- Run from the terminal the following script (malformed email is set for supportemail): php admin/cli/install_database.php --agree-license --adminpass=test --supportemail= "supportexamplecom"   2- Verify that you receive an error that says ' Error, incorrect value "supportexamplecom" for "supportemail" '
    • 2
    • Team Hedgehog 2023 Sprint 2.3

      When the CLI `install_database.php` script is used `supportemail` is not set.

      Even when an admin logs into the site via the web UI and navigates around they are not prompted to set this field. However when the support contact details are edited this field is marked as required and cannot be left blank if the form needs to be saved.

      The original reports details are below.

      The behaviour should be:

      • Add an optional CLI param to `install_database.php` to allow this to be explicitly set
      • If a value isn't explicitly passed to `install_database.php` set to the admin email address.

      I'm trying to develop a function to create the Moodle instance automatically, so all users even the ones who don't have knowledge on server installation can create a new instance of Moodle in easy way. And I was about to use install_database.php to transfer the user provided information to the new Moodle instance. It works well, but when I tried to access the site, it still requires user to put in the user support email, cause it is missed from the install_database.php file.

        1. cli-help-command.png
          cli-help-command.png
          81 kB
        2. cli-incorrect-email.png
          cli-incorrect-email.png
          21 kB
        3. MDL-75195.png
          MDL-75195.png
          836 kB
        4. without-support-email.png
          without-support-email.png
          146 kB
        5. with-support-email.png
          with-support-email.png
          141 kB

            raquel.ortega@moodle.com Raquel Ortega
            bobnguyen Bob Nguyen
            David Woloszyn David Woloszyn
            Huong Nguyen Huong Nguyen
            Ron Carl Alfon Yu Ron Carl Alfon Yu
            Votes:
            1 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 day, 3 hours
                1d 3h

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.