original_string: public static function reset_course_page_comments($context) {
          global $DB;
          $contexts = array();
          $contexts[] = $context->id;
          $children = $context->get_child_contexts();
          foreach ($children as $c) {
              $contexts[] = $c->id;
          }
          list($ids, $params) = $DB->get_in_or_equal($contexts);
          $DB->delete_records_select('comments', "commentarea='page_comments' AND contextid $ids", $params);
      }
code: public static function reset_course_page_comments($context) {
          global $DB;
          $contexts = array();
          $contexts[] = $context->id;
          $children = $context->get_child_contexts();
          foreach ($children as $c) {
              $contexts[] = $c->id;
          }
          list($ids, $params) = $DB->get_in_or_equal($contexts);
          $DB->delete_records_select('comments', "commentarea='page_comments' AND contextid $ids", $params);
      }
code_tokens: public static function reset_course_page_comments ( $ context ) { global $ DB ; $ contexts = array ( ) ; $ contexts [ ] = $ context -> id ; $ children = $ context -> get_child_contexts ( ) ; foreach ( $ children as $ c ) { $ contexts [ ] = $ c -> id ; } list ( $ ids , $ params ) = $ DB -> get_in_or_equal ( $ contexts ) ; $ DB -> delete_records_select ( 'comments' , "commentarea='page_comments' AND contextid $ids" , $ params ) ; }
docstring: Delete page_comments in whole course, used by course reset
  
  @param stdClass $context course context
docstring_tokens: Delete page_comments in whole course used by course reset