Moodle

comments api for database module

Details

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

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 Škoda (skodak) 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 Škoda (skodak) 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 Škoda (skodak) 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 Škoda (skodak) 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

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: