original_string: public static function delete_entry($entryid) {
          global $PAGE, $DB;
  
          $params = array('entryid' => $entryid);
          $params = self::validate_parameters(self::delete_entry_parameters(), $params);
          $warnings = array();
  
          $record = $DB->get_record('data_records', array('id' => $params['entryid']), '*', MUST_EXIST);
          list($database, $course, $cm, $context) = self::validate_database($record->dataid);
  
          if (data_user_can_manage_entry($record, $database, $context)) {
              data_delete_record($record->id, $database, $course->id, $cm->id);
          } else {
              throw new moodle_exception('noaccess', 'data');
          }
  
          $result = array(
              'status' => true,
              'warnings' => $warnings
          );
          return $result;
      }
code: public static function delete_entry($entryid) {
          global $PAGE, $DB;
  
          $params = array('entryid' => $entryid);
          $params = self::validate_parameters(self::delete_entry_parameters(), $params);
          $warnings = array();
  
          $record = $DB->get_record('data_records', array('id' => $params['entryid']), '*', MUST_EXIST);
          list($database, $course, $cm, $context) = self::validate_database($record->dataid);
  
          if (data_user_can_manage_entry($record, $database, $context)) {
              data_delete_record($record->id, $database, $course->id, $cm->id);
          } else {
              throw new moodle_exception('noaccess', 'data');
          }
  
          $result = array(
              'status' => true,
              'warnings' => $warnings
          );
          return $result;
      }
code_tokens: public static function delete_entry ( $ entryid ) { global $ PAGE , $ DB ; $ params = array ( 'entryid' => $ entryid ) ; $ params = self :: validate_parameters ( self :: delete_entry_parameters ( ) , $ params ) ; $ warnings = array ( ) ; $ record = $ DB -> get_record ( 'data_records' , array ( 'id' => $ params [ 'entryid' ] ) , '*' , MUST_EXIST ) ; list ( $ database , $ course , $ cm , $ context ) = self :: validate_database ( $ record -> dataid ) ; if ( data_user_can_manage_entry ( $ record , $ database , $ context ) ) { data_delete_record ( $ record -> id , $ database , $ course -> id , $ cm -> id ) ; } else { throw new moodle_exception ( 'noaccess' , 'data' ) ; } $ result = array ( 'status' => true , 'warnings' => $ warnings ) ; return $ result ; }
docstring: Deletes an entry.
  
  @param int $entryid the record entry id
  @return array of warnings success status
  @since Moodle 3.3
  @throws moodle_exception
docstring_tokens: Deletes an entry .