Assignment MDL-23192  - fixed query to reflect updated field name mdl_block_instances.contextid->mdl_block_instances.parentcontextid  - fixed records iteration.
Assignment MDL-23192
 - fixed query to reflect updated field name mdl_block_instances.contextid->mdl_block_instances.parentcontextid
 - fixed records iteration.

dilawar/moodle