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

bad timeend with manual enrol

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Duplicate
    • 3.4.1
    • None
    • Enrolments
    • MOODLE_34_STABLE

    Description

      Hi,

      The calculated timeend returns false value with manual enrolment.
      Steps :

      • manually enrol a user in a course ( ex: today Feb 01 2018 )
      • set the duration to 180 days and save
      • Display user's enrolment informations :
        end date is : Jan 06 44598

      I search for the error and found that the problem is in the scrolling list for duration.

      In my old Moodle 3.1.5, values for this list are like this

      <option value="180">180 days</option>

      In Moodle 3.4.1 , values are like this

      <option value="15552000">180 days</option>

      But the calcul for timeend not change in file /enrol/manual/ajax.php, it's always :

      $timeend = $timestart + intval($duration*24*60*60);

      As workoraund, I just remove "*24*60*60" from the code and it works.

      Thank's a lot

      Bruno Malaval

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              uha Bruno Malaval
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: