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

        Dongsheng Cai created issue -
        Dongsheng Cai made changes -
        Field Original Value New Value
        Attachment data_comment.patch [ 18523 ]
        Dongsheng Cai made changes -
        Attachment data_comment.patch [ 18523 ]
        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.
        Dongsheng Cai made changes -
        Attachment data_comment-2.patch [ 18601 ]
        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
        Dongsheng Cai made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Martin Dougiamas made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        QA Assignee nobody
        Martin Dougiamas made changes -
        Workflow jira [ 33451 ] MDL Workflow [ 63132 ]
        Martin Dougiamas made changes -
        Workflow MDL Workflow [ 63132 ] MDL Full Workflow [ 92353 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved: