No minor may plead guilty to an offense under this chapter except in open court before a judge.