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

Change Field Used to Filter recordings in check_dismissed_recordings task

XMLWordPrintable

    • MOODLE_401_STABLE, MOODLE_402_STABLE, MOODLE_403_STABLE
    • MOODLE_403_STABLE, MOODLE_404_STABLE
    • MDL-80061-401
    • MDL-80061-403
    • MDL-80061-404
    • MDL-80061-master
    • Hide

      Run CLI script  : mod/bigbluebuttonbn/cli/update_dismissed_recordings.php

      Show
      Run CLI script  : mod/bigbluebuttonbn/cli/update_dismissed_recordings.php
    • Hide
      • Login as admin
      • Create course C1 and BBB activity B1
      • Create two recordings R1 and R2 and run cron so that each record's status field is set to 2 (processed) in bigbluebuttonbn_recordings table
      • Change the status to 1 (dismissed) for each and the timemodified field for one recording to at least 31 days ago e.g

      UPDATE `m_bigbluebuttonbn_recordings`
      SET `status` = '1',
          `timemodified` = CASE WHEN `id` IN ('1') THEN '1706393411' ELSE `timemodified` END
      WHERE `id` IN ('1', '2');

      • Run the check_dismissed_recordings task
      • Confirm the dismissed recording within the 30 day time limit was processed again and the other recording was not
      Show
      Login as admin Create course C1 and BBB activity B1 Create two recordings R1 and R2 and run cron so that each record's status field is set to 2 (processed) in bigbluebuttonbn_recordings table Change the status to 1 (dismissed) for each and the timemodified field for one recording to at least 31 days ago e.g UPDATE `m_bigbluebuttonbn_recordings` SET `status` = '1' ,   `timemodified` = CASE WHEN `id` IN ( '1' ) THEN '1706393411' ELSE `timemodified` END WHERE `id` IN ( '1' , '2' ); Run the check_dismissed_recordings task Confirm the dismissed recording within the 30 day time limit was processed again and the other recording was not

      This ticket will be focused on replacing timecreated to timemodified when filtering recordings in the check_dismissed_recordings task. The way we handle dismissed recordings will have to be dealt with in https://tracker.moodle.org/browse/MDL-80225 

      More information below:

      If for some reason, a recording is not available when Moodle checks its availability, it will be marked as "RECORDING_DISMISSED".
      The `mod_bigbluebuttonbn\task\check_dismissed_recordings` task has been modified in https://tracker.moodle.org/browse/MDL-76339 to verify dismissed recordings and re-enable them if they become available.
      However, this task use a hardcoded limit of 30 days(RECORDING_TIME_LIMIT_DAYS) based on `bigbluebuttonbn_recordings.timecreated` field to filter which recordings should be check.
      https://github.com/moodle/moodle/blob/e4d1369475eb0d7ebd69a21cd5ca277c6ed688cb/mod/bigbluebuttonbn/classes/recording.php#L791

      So , for instance, if a recording was created 3 months ago (timecreated > 30 days) and is marked as dismissed, it will never become available again in Moodle. Even if the record is available on BBB server.

      Since the `bigbluebuttonbn_recordings.timemodified` field is updated when a record is set to "RECORDING_DISMISSED", I think it would make more sense to use `bigbluebuttonbn_recordings.timemodified` to filter recordings to checks. This way only recordings not updated for more than 30 days would be ignored.
      And ideally 30 days should be a default as stated in RECORDING_TIME_LIMIT_DAYS description https://github.com/moodle/moodle/blob/e4d1369475eb0d7ebd69a21cd5ca277c6ed688cb/mod/bigbluebuttonbn/classes/recording.php#L75 currently no setting allow us to override this value (but maybe this should be done in another dedicated issue).

      Currently a workaround to re-enable those records is to regulary (through a dedicated cron task) run CLI script mod/bigbluebuttonbn/cli/update_dismissed_recordings.php which does not use time filtering.

            shamiso.jaravaza Shamiso Jaravaza
            ak4t0sh Arnaud Trouvé
            Laurent David Laurent David
            Amaia Anabitarte Amaia Anabitarte
            Kim Jared Lucas Kim Jared Lucas
            Votes:
            1 Vote for this issue
            Watchers:
            12 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour, 33 minutes
                1h 33m

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