The sample size for B is not "too small" for logistic regression. Logistic regression does not make assumptions about sample sizes. You may have low power, though, or you may have other problems. The first thing I notice is that the data don't make sense in the context of your story (viz., the proportions don't equate to whole numbers of questions missed out of 25). As a result, software wouldn't let you fit a logistic regression model to these data. In addition, I doubt these are really distributed as a binomial. A binomial distribution is composed of a number of coin flips (metaphorically speaking), where each has an equal probability of being a success. That isn't likely to be the case with test questions: some will be harder and some will be easier. On the other hand, test questions are often given equal weight towards the test grade irrespective of that, so you may prefer to model it that way anyhow. Your other choice is to do something to allow for greater variance than the binomial expects, such as using the quasi-binomial distribution.
You are right that a t-test would not be appropriate here, but the Wilcoxon rank sum test does not require unskewed data, so it could be an acceptable choice as well. The rank sum test will implicitly assume that the questions are all equally hard, which is probably false, but if the test is scored that way, it might be acceptable nonetheless.
d = read.table(text="row prop.pass Group studentid
1 0.10 A Student01
26 0.05 B Student15", header=T)
d = d[,-c(1,4)]
colnames(d) = "prop.failed"
## R unhappy:
m1 = glm(prop.failed~Group, d, family=binomial, weights=rep(25, 26))
# Warning message:
# In eval(expr, envir, enclos) : non-integer #successes in a binomial glm!
# Estimate Std. Error z value Pr(>|z|)
# (Intercept) -1.8362 0.1299 -14.140 < 2e-16 ***
# GroupB -2.7589 0.8308 -3.321 0.000898 ***
# (Dispersion parameter for binomial family taken to be 1)
# Null deviance: 163.54 on 25 degrees of freedom
# Residual deviance: 135.52 on 24 degrees of freedom
# AIC: 181.91
d$failed = round(d$prop.failed*25, digits=0)
d$passed = 25-d$failed
## no problems:
m2 = glm(cbind(passed, failed)~Group, d, family=quasibinomial)
# Estimate Std. Error t value Pr(>|t|)
# (Intercept) 1.8489 0.3265 5.663 7.85e-06 ***
# GroupB 3.1550 2.5320 1.246 0.225
# (Dispersion parameter for quasibinomial family taken to be 6.263472)
# Null deviance: 169.23 on 25 degrees of freedom
# Residual deviance: 138.96 on 24 degrees of freedom
# AIC: NA
# Wilcoxon rank sum test with continuity correction
# data: prop.failed by Group
# W = 90, p-value = 0.06086
# alternative hypothesis: true location shift is not equal to 0
The second logistic regression model (the one that uses the rounded data in successes to failures format with the quasi-binomial distribution) is not significant because it is assuming more variability under the null. This would be my first choice, though. On the other hand, using the binomial distribution might be OK, as might the rank sum test. You do need to clarify your data, though, and make sure they are actually correct.