original_string: function notemptyfield($value, $name) {
          global $USER;
  
          $names = explode('_', $name);
          if ($names[2] == 'file') {
              $usercontext = context_user::instance($USER->id);
              $fs = get_file_storage();
              $files = $fs->get_area_files($usercontext->id, 'user', 'draft', $value);
              return count($files) >= 2;
          }
          return false;
      }
code: function notemptyfield($value, $name) {
          global $USER;
  
          $names = explode('_', $name);
          if ($names[2] == 'file') {
              $usercontext = context_user::instance($USER->id);
              $fs = get_file_storage();
              $files = $fs->get_area_files($usercontext->id, 'user', 'draft', $value);
              return count($files) >= 2;
          }
          return false;
      }
code_tokens: function notemptyfield ( $ value , $ name ) { global $ USER ; $ names = explode ( '_' , $ name ) ; if ( $ names [ 2 ] == 'file' ) { $ usercontext = context_user :: instance ( $ USER -> id ) ; $ fs = get_file_storage ( ) ; $ files = $ fs -> get_area_files ( $ usercontext -> id , 'user' , 'draft' , $ value ) ; return count ( $ files ) >= 2 ; } return false ; }
docstring: Custom notempty function
  
  @param string $value
  @param string $name
  @return bool
docstring_tokens: Custom notempty function