original_string: public function create_shared_area($method) {
          global $DB;
  
          // generate some unique random name for the new area
          $name = $method . '_' . sha1(rand().uniqid($method, true));
          // create new area record
          $area = array(
              'contextid'     => context_system::instance()->id,
              'component'     => 'core_grading',
              'areaname'      => $name,
              'activemethod'  => $method);
          return $DB->insert_record('grading_areas', $area);
      }
code: public function create_shared_area($method) {
          global $DB;
  
          // generate some unique random name for the new area
          $name = $method . '_' . sha1(rand().uniqid($method, true));
          // create new area record
          $area = array(
              'contextid'     => context_system::instance()->id,
              'component'     => 'core_grading',
              'areaname'      => $name,
              'activemethod'  => $method);
          return $DB->insert_record('grading_areas', $area);
      }
code_tokens: public function create_shared_area ( $ method ) { global $ DB ; // generate some unique random name for the new area $ name = $ method . '_' . sha1 ( rand ( ) . uniqid ( $ method , true ) ) ; // create new area record $ area = array ( 'contextid' => context_system :: instance ( ) -> id , 'component' => 'core_grading' , 'areaname' => $ name , 'activemethod' => $ method ) ; return $ DB -> insert_record ( 'grading_areas' , $ area ) ; }
docstring: Creates a new shared area to hold a grading form template
  
  Shared area are implemented as virtual gradable areas at the system level context
  with the component set to core_grading and unique random area name.
  
  @param string $method the name of the plugin we create the area for
  @return int the new area id
docstring_tokens: Creates a new shared area to hold a grading form template