
558 N.W.2d 807 (1997)
251 Neb. 575
Kristoffer A. KOLESNICK, a minor, By and Through his Mother and Next Friend, Edith SHAW, Appellee,
v.
OMAHA PUBLIC SCHOOL DISTRICT et al., Appellants.
No. S-95-099.
Supreme Court of Nebraska.
January 24, 1997.
*810 David M. Pedersen and David J. Kramer, of Baird, Holm, McEachen, Pedersen, Hamann & Strasheim, Omaha, for appellants.
C. Jan Headley and Jeffrey T. Palzer, Omaha, for appellee.
Catherine Mahern, of Creighton Legal Clinic, for amicus curiae Paul Dilly.
WHITE, C.J., and FAHRNBRUCH, LANPHIER, WRIGHT, CONNOLLY, and GERRARD, JJ.
LANPHIER, Justice.
The Omaha Public School District (OPS) adopted a student code of conduct for the 1994-95 school year, which provided for a two-semester expulsion for the possession of a weapon, including a knife, at school. On September 23, 1994, Kristoffer Kolesnick, an eighth grade student at King Science Center, brought a switchblade knife to school. On September 29, after learning about the knife incident, Deborah Frison, the assistant principal at King Science Center, sent a letter to Kolesnick's mother, Edith Shaw, recommending expulsion of Kolesnick for the current semester and the following semester. On October 4, OPS received a request for a hearing concerning the recommendation that Kolesnick be expelled. On October 11, a hearing was held, whereby the hearing officer *811 to the department of student personnel for OPS recommended expulsion. Kolesnick was notified of this decision on October 17. Kolesnick appealed this decision, and on November 11, the ad hoc discipline hearing committee of the board of education of OPS affirmed the expulsion decision.
Kolesnick filed a petition in Douglas County District Court by and through his mother and next friend, appealing this decision. The district court found that Kolesnick had been prejudiced by the two-semester expulsion because his substantial rights were violated. The district court then reduced the two-semester expulsion to a one-semester expulsion. OPS appealed the district court's decision pursuant to the Administrative Procedure Act and filed a petition to bypass review by the Nebraska Court of Appeals. We granted OPS' petition to bypass.

BACKGROUND
OPS adopted a student code of conduct for the 1994-95 school year, which included the following section:
e. Weapons (Guns, Knives and Other Dangerous Weapons) (Grades 7-12)
Students are forbidden knowingly and voluntarily to bring to school, possess, handle, transmit or use any gun, knife, or other dangerous weapons in school or on school grounds or at a school function off school grounds.
First Offense: Expulsion. Remainder of the semester and the following semester or the remainder of the semester, summer school and the first semester of the following year.....
In August 1994, Kolesnick signed a form acknowledging his receipt of a handbook containing the student code of conduct and other school rules.
Sometime prior to September 23, 1994, Kolesnick obtained a switchblade comb. Kolesnick and a friend removed the comb portion of the switchblade and replaced it with a knife blade. Kolesnick boarded OPS bus 686 on the morning of September 23, with the switchblade knife in his pocket. In the presence of Tim Condon, a fourth grade student on the bus, Kolesnick opened the switchblade knife and poked a hole in his own jacket sleeve. Condon stated that Kolesnick also poked a hole in the seat in front of him. Condon told two other students that Kolesnick had a knife. Kolesnick then placed the knife in his notebook, where he carried it throughout the schoolday at King Science Center.
That evening, Condon told his parents about the incident on the bus. Condon's mother asked him not to discuss the incident with anyone for fear of retaliation by Kolesnick. On the evening of September 27, Condon's mother informed Frank Murch, OPS bus 686's regular driver, of the incident and told him she had been keeping Condon home out of concern for Condon's safety.
On the morning of September 28, Murch related his conversation with Condon's mother to his supervisor, Martha Holmes. Holmes immediately contacted King Science Center to inform them that Kolesnick was in possession of a knife on OPS bus 686. Upon receiving that information, Frison and Forth Carmichael, a security officer, immediately searched Kolesnick's locker. When no knife was found, Kolesnick was asked to go to Frison's office.
Frison asked Kolesnick about the incident on OPS bus 686. Kolesnick stated that he had shown Condon a nail clipper with a foldout knife he had found on the street. Frison then contacted Condon's mother, who related Condon's story about the switchblade knife to Frison. Robert Jorgensen, principal of King Science Center, questioned Kolesnick as to where the switchblade was. Kolesnick told him it was at his home. Jorgensen then suggested that Frison and Kolesnick go to Kolesnick's home and retrieve the knife.
Frison, Carmichael, and Kolesnick then went to Kolesnick's home. Frison explained the situation to Shaw, and Shaw invited Frison and Carmichael into her home. Kolesnick then went to his room and produced a nail clipper which did not fit Condon's description of the knife he saw. Frison explained to Shaw and Kolesnick that the item did not match the description of the object on the bus. After a more extensive search by Shaw and Kolesnick, the switchblade knife was produced and given to Frison.
On September 29, 1994, Frison sent a letter to Shaw notifying her that Frison was *812 recommending that Kolesnick be expelled from King Science Center for the remainder of the current semester and the following semester. On October 4, OPS received a request for a hearing concerning the recommendation that Kolesnick be expelled. On October 11, a hearing was held before a hearing officer to the department of student personnel for OPS, and expulsion was recommended. On October 17, Ronald Burmood, director of student personnel services for OPS, notified Kolesnick of the decision to expel him for the remainder of the current semester and the following semester. Kolesnick filed a timely appeal of that decision of the superintendent to the board of education. On November 9, the ad hoc discipline hearing committee of the board of education of OPS affirmed the decision.
Pursuant to Neb.Rev.Stat. § 79-4,201 (Reissue 1994), Kolesnick then filed a petition in the district court for Douglas County by and through his mother and next friend to appeal the decision of the board of education and asked for an injunction. The defendants are OPS, the board of education for the city of Omaha, Frison, and Burmood. The court found that Kolesnick was prejudiced because his "substantial rights were violated by the decision of the Defendants." The court then found that the OPS decision should be modified to an expulsion of Kolesnick for the remainder of the 1994 fall semester only.
OPS and the other defendants appeal from that decision.

ASSIGNMENTS OF ERROR
Summarized and restated, OPS assigns as error (1) the district court's ruling that the two-semester expulsion was in violation of constitutional provisions and (2) the district court's failure to rule that Kolesnick's expulsion with regard to the switchblade knife was within the statutory authority of OPS; was supported by competent, material, and substantial evidence in the record as made on review; and was neither arbitrary nor capricious.

STANDARD OF REVIEW
Appeals from the district court under the Student Discipline Act are governed by the Administrative Procedure Act. On an appeal under the Administrative Procedure Act, an appellate court reviews the judgment of the district court for errors appearing on the record and will not substitute its factual findings for those of the district court where competent evidence supports those findings. Rainbolt v. State, 250 Neb. 567, 550 N.W.2d 341 (1996); Knowlton v. Harvey, 249 Neb. 693, 545 N.W.2d 434 (1996); Metro Renovation v. State, 249 Neb. 337, 543 N.W.2d 715 (1996); George Rose & Sons v. Nebraska Dept. of Revenue, 248 Neb. 92, 532 N.W.2d 18 (1995).
A final order rendered by a district court in a judicial review pursuant to the Administrative Procedure Act may be reversed, vacated, or modified by an appellate court for errors appearing on the record. Val-Pak of Omaha v. Department of Revenue, 249 Neb. 776, 545 N.W.2d 447 (1996).

ANALYSIS
The Student Discipline Act, Neb.Rev.Stat. § 79-4,169 et seq. (Reissue 1994), was passed to assure the protection of elementary and secondary school students' due process rights within the educational system. Section 79-4,201 gives a person aggrieved by a final decision under this act the right to seek judicial review. Section 79-4,204(2) gives the district court the power to
affirm the decision of the school board or board of education, remand the case for further proceedings, or reverse or modify the decision if the substantial rights of the petitioner may have been prejudiced because the board's decision is:
(a) In violation of constitutional provisions;
(b) In excess of the statutory authority or jurisdiction of the board;
(c) Made upon unlawful procedure;
(d) Affected by other error of law;
(e) Unsupported by competent, material, and substantial evidence in view of the entire record as made on review; or
(f) Arbitrary or capricious.
Pursuant to this section, the district court is given the power to review the decision of the board of education. The power to affirm, reverse, modify, or remand the case for further proceedings, however, depends on *813 whether the petitioner's substantial rights have been prejudiced. Thus, to determine whether the decision of the board should be altered in this case, we must first determine if Kolesnick was prejudiced.
First, Kolesnick argues that his substantial rights were prejudiced because his constitutional rights were violated. Education, however, has not been determined to be a fundamental right under the U.S. Constitution. See, Plyler v. Doe, 457 U.S. 202, 102 S.Ct. 2382, 72 L.Ed.2d 786 (1982); San Antonio School District v. Rodriguez, 411 U.S. 1, 93 S.Ct. 1278, 36 L.Ed.2d 16 (1973); Craig v. Selma City School Bd., 801 F.Supp. 585 (S.D.Ala.1992). Article VII, § 1, of the Constitution of the State of Nebraska provides that "[t]he Legislature shall provide for the free instruction in the common schools of this state of all persons between the ages of five and twenty-one years." We have not construed this language in the context of student discipline to mean that a fundamental right to education exists in this state, and we decline to do so today. Rather, we have construed the term "free instruction" in right to education cases as pertinent to the issue of the constitutionality of school financing, including collection of fees, tuition, and taxes. See, Banks v. Board of Education of Chase County, 202 Neb. 717, 277 N.W.2d 76 (1979); Tagge v. Gulzow, 132 Neb. 276, 271 N.W. 803 (1937); State, ex rel. Baldwin, v. Dorsey, 108 Neb. 134, 187 N.W. 879 (1922); Martins v. School District, 101 Neb. 258, 162 N.W. 631 (1917). See, also, Doe v. Superintendent of Sch. of Worcester, 421 Mass. 117, 653 N.E.2d 1088 (1995).
We decline to hold, in the context of student discipline, that a student has a fundamental right to education, which would trigger strict scrutiny analysis whenever a student's misconduct results in expulsion for the interest of safety. See Doe v. Superintendent of Sch. of Worcester, supra. Therefore, in the context of student discipline cases, no fundamental right to education exists in Nebraska, nor does such a right exist under the federal Constitution. Accordingly, the appropriate level of scrutiny is the rational basis test. See San Antonio School District v. Rodriguez, supra.
Under the rational basis test, as long as the official action is directed to a legitimate purpose and is rationally related to achieving that purpose, it is not unconstitutional. See, Plyler v. Doe, supra; Williamson v. Lee Optical Inc., 348 U.S. 483, 75 S.Ct. 461, 99 L.Ed. 563 (1955). Applying this rational basis test to the facts of this case, we conclude that Kolesnick's expulsion was rationally related to the board and the school officials' interest in protecting other students and staff from violence. The board was aware that Kolesnick knowingly possessed a knife on school property and used the knife to poke holes in his coat and a bus seat. The board was also aware of Condon's mother's decision to keep her son out of school for fear of repercussions by Kolesnick. Both the use of the knife and Condon's mother's fear for her son's safety reinforce the school's interest in protecting students and staff from violence. Expulsion is a rationally related means of protecting students and staff from violence. Accordingly, Kolesnick's expulsion did not violate his rights under the Nebraska or federal Constitution.
While some courts have recognized substantive due process limitations on the severity of disciplinary sanctions imposed on students in the public education system, these courts have determined that a court may overturn a school district's ruling if there is a shocking disparity between the punishment and the offense. See, New v. City of Minneapolis, 792 F.2d 724, 726 (8th Cir.1986) (stating that defendant-appellant's conduct must be "`offensive to human dignity'"); Fitzgerald v. Williamson, 787 F.2d 403 (8th Cir.1986); Mitchell v. Board of Trustees of Oxford, etc., 625 F.2d 660 (5th Cir.1980); Lee v. Macon County Board of Education, 490 F.2d 458 (5th Cir.1974); Petrey v. Flaugher, 505 F.Supp. 1087 (1981); Adams v. City of Dothan Bd. of Educ., 485 So.2d 757 (Ala.App.1986). We find this rationale persuasive. The fact that the board opted for consistency of punishment rather than a tailoring of the punishment to the child does not implicate the Due Process Clause of the Constitution. Mitchell v. Board of Trustees of Oxford, etc., supra. Therefore, we do not find a shocking disparity *814 between the expulsion sentence and the offense.
Kolesnick's next argument is that the discipline and sentence ordered by the board exceeded statutory authority. This argument is also without merit. Sections 79-4,175 to 79-4,180 delegate to local school boards the right to establish and promulgate rules and standards regarding student conduct. Section 79-4,179 specifically provides for an expulsion not to exceed the remaining semester and the following semester for knowingly possessing a weapon.
Kolesnick argues that the mandatory maximum sentence should not be given to all offenders and that §§ 79-4,179 and 79-4,180 clearly reflect legislative intent that alternate methods of punishment, including long-term suspensions and mandatory reassignments, be used. These sections, however, list only the grounds for which the above measures may be used. They in no way mandate use of any one form of punishment. We have held that "[t]he wisdom or expediency of a rule adopted by a school board and the motive prompting it are not open to judicial inquiry, where it is within the administrative power of that body." Richardson v. Braham, 125 Neb. 142, 145, 249 N.W. 557, 559 (1933).
We have also held that an appellate court will sustain the decision of an administrative body if there is evidence in the record to sustain its findings. In re Application of Jantzen, 245 Neb. 81, 511 N.W.2d 504 (1994). Here, we find the decision of the board to be both within its power and supported by competent evidence. Therefore, the decision to assert the maximum punishment against Kolesnick was within the statutory authority of OPS.
Kolesnick next asserts that the board's assignment of the maximum sentence to him was arbitrary and capricious. An arbitrary action is one which is taken "in disregard of the facts or circumstances of the case, without some basis which would lead a reasonable and honest person to the same conclusion." In re Application of Jantzen, 245 Neb. at 100, 511 N.W.2d at 517. A capricious action is one "guided by fancy rather than by judgment or settled purpose; such a decision is apt to change suddenly; it is freakish, whimsical, humorsome." Id. An agency's judgment must be based on a factual foundation and must give due consideration to all the essential elements involved. Id. If a school board acts within the power conferred upon it by the Legislature, courts cannot question the manner in which the board has exercised its discretion in regard to subject matter over which it has jurisdiction, unless such action is so unreasonable and arbitrary as to amount to abuse of the discretion reposed in it. School Dist. of Waterloo v. Hutchinson, 244 Neb. 665, 508 N.W.2d 832 (1993). Because of the express authority given OPS by §§ 79-4,175 to 79-4,180, OPS' adoption of a mandatory code cannot, by its very nature, be arbitrary or capricious.
The evidence is clear that Kolesnick brought a knife to school in violation of the OPS code. The penalty for that violation is expulsion. The board did not disregard the facts, nor was it guided by fancy in applying the stated penalty to Kolesnick. Accordingly, OPS was well within the authority given to it by the Student Discipline Act to expel Kolesnick for the semester in which the incident occurred and the following semester. Such action was neither arbitrary nor capricious.
Finally, Kolesnick asserts that the board's decision was not supported by competent, material, or substantial evidence. We disagree. The facts clearly establish that OPS had an expulsion policy for students who bring weapons, including knives, to school. Kolesnick brought the knife to King Science Center by way of OPS bus 686, showed the weapon to another student, and used it to cut his coat sleeve. The evidence clearly indicates that Kolesnick knowingly and voluntarily possessed the switch-blade knife on the schoolbus and at school. Accordingly, the board's decision was supported by competent, material, and substantial evidence.

CONCLUSION
The appellants did not prejudice Kolesnick's substantial rights by ordering the two-semester expulsion. We reject Kolesnick's argument that the appellants violated his *815 state and federal constitutional right to an education, acted outside statutory authority, made an arbitrary or capricious decision, and meted out a penalty unsupported by competent, material, and substantial evidence. Therefore, the district court order was in error in modifying the decision of the ad hoc discipline committee of the board of education.
REVERSED.
CAPORALE, J., not participating.
FAHRNBRUCH, Justice, concurring in part, and in part dissenting.
I agree with the trial court and with the majority of this court that expulsion from school is an appropriate sanction when a student takes a weapon to school. It should be pointed out, however, that under the Omaha Public School District's rule, expulsion for the semester in which the violation occurs and the following semester is inherently inequitable.
Under the rule, if a weapons violation occurs the first week of the fall semester, the violator is expelled not only for the remainder of the fall semester, but also for the spring semester. On the other hand, if a violation occurs the last week before the end of the fall semester, the violator is expelled for only 1 week of the fall semester, plus the entire spring semester. Thus, the student violating the rule at the beginning of the fall semester is punished more severely than the student committing the same violation in the last week of the fall semester.
Fairness dictates that the length of Kolesnick's expulsion should have been reduced. In that regard, the decision of the trial judge should have been affirmed.
