Details

    • Type: Sub-task
    • Status: Closed
    • Priority: 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

        Attachments

          Activity

          dongsheng Dongsheng Cai created issue -
          dongsheng Dongsheng Cai made changes -
          Field Original Value New Value
          Attachment data_comment.patch [ 18523 ]
          dongsheng Dongsheng Cai made changes -
          Attachment data_comment.patch [ 18523 ]
          Hide
          dongsheng 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 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 Dongsheng Cai made changes -
          Attachment data_comment-2.patch [ 18601 ]
          Hide
          skodak 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
          skodak 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
          skodak 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
          skodak 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 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 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 Dongsheng Cai added a comment -

          feel free to reopen if you find any problem

          Show
          dongsheng Dongsheng Cai added a comment - feel free to reopen if you find any problem
          dongsheng Dongsheng Cai made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          dougiamas Martin Dougiamas made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          QA Assignee nobody
          dougiamas Martin Dougiamas made changes -
          Workflow jira [ 33451 ] MDL Workflow [ 63132 ]
          dougiamas 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:
                Fix Release Date:
                24/Nov/10