Details

    • Type: Sub-task Sub-task
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0
    • Component/s: Comments
    • Labels:
      None
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE

      Gliffy Diagrams

        Activity

        Hide
        Dongsheng Cai added a comment -

        database transactions check and restore support

        backup/restore module is broken right now, test of backup/restore data is needed.

        Show
        Dongsheng Cai added a comment - database transactions check and restore support backup/restore module is broken right now, test of backup/restore data is needed.
        Hide
        Petr Skoda added a comment -

        please remove the try-catch from the database module comments upgrade code, the exceptions are handled automatically, you should never call print_error() this way in upgrade code, thanks

        Show
        Petr Skoda added a comment - please remove the try-catch from the database module comments upgrade code, the exceptions are handled automatically, you should never call print_error() this way in upgrade code, thanks
        Hide
        Petr Skoda added a comment -

        hmm, I think it is not necessary to use the table_exists too, the version number test should prevent it

        Show
        Petr Skoda added a comment - hmm, I think it is not necessary to use the table_exists too, the version number test should prevent it
        Hide
        Dongsheng Cai added a comment -

        Thanks, Petr.

        To summrize:
        1. remove try-catch code
        2. call get_coursemodule_from_instance only when dataid or courseid changed
        3. delete record if comment->add run successfully
        4. use upgrade_set_timeout

        I kept table_exists there to prevent an upgrade error.

        Show
        Dongsheng Cai added a comment - Thanks, Petr. To summrize: 1. remove try-catch code 2. call get_coursemodule_from_instance only when dataid or courseid changed 3. delete record if comment->add run successfully 4. use upgrade_set_timeout I kept table_exists there to prevent an upgrade error.
        Hide
        Dongsheng Cai added a comment -

        feel free to reopen if you find any problem

        Show
        Dongsheng Cai added a comment - feel free to reopen if you find any problem

          People

          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: