
8 So.3d 299 (2008)
Ex parte Brett YANCEY.
(In re Paul Dodd and Cynthia Dodd, as parents and next friends of Charles Alexander Coker, a minor v. Matthew Messer and Brett Yancey).
1070922.
Supreme Court of Alabama.
October 31, 2008.
*300 Mark S. Boardman and Katherine C. Hortberg of Boardman, Carr, Hutcheson & Bennett, P.C., Chelsea, for petitioner.
Rex W. Slate and W. Cone Owen, Jr., of Smith & Alspaugh, P.C., Birmingham, for respondents Paul Dodd and Cythia Dodd, on behalf on their minor child, Alex Coker.
Rebecca A. Walker, Gadsden, for respondent Matthew Messer.
BOLIN, Justice.
Brett Yancey, a football coach and teacher employed by the Etowah County Board of Education ("the Board"), petitions this Court for a writ of mandamus directing the Etowah Circuit Court to enter a summary judgment in his favor on the basis of State-agent immunity as to the negligence and wantonness claims asserted against him by Paul Dodd and Cynthia Dodd, as next friends and parents of Charles Alexander Coker, a minor (collectively referred to as "Coker"), and by Matthew Messer.

Facts
At the time of the incident made the basis of this action, Charles was enrolled in the 11th grade at Southside High School ("the school"). Brett Yancey was employed as the head football coach and director of athletics at the school. In the spring of 2004, Charles was enrolled in the first-block weight-lifting class taught by Yancey for those students participating in the school's football program. Yancey was *301 given no guidelines or direction on how to teach the weight-lifting class, and there was no textbook for the class. The weight-lifting class consisted of the students' lifting weights and participating in speed and agility drills as part of the strength and conditioning program for the members of the football team. The students were required by Yancey, as part of the weight-lifting class, to clean the weight room, locker room, and bathrooms located in the field house. Yancey stated that the purpose of having the students clean the field house was to help prepare them for football by instilling "team discipline" in the students.
On April 13, 2004, at the conclusion of the weight-lifting class and after the students had changed into their school clothes, Charles and the other students cleaned the field house as they normally did. After the field house was cleaned, Yancey directed several students, including Charles and Messer, to carry the filled trash barrels to the school's dumpsters, which were located behind the school's cafeteria, a relatively short distance from the field house. Messer, a licensed driver, retrieved his pick-up truck from a campus parking lot and drove it to the field house, where the students loaded the trash barrels onto the pick-up truck.[1] Although Yancey testified that he routinely allowed students to use their pick-up trucks to haul the trash barrels to the dumpsters, he did not specifically instruct the studentsincluding Messer on this occasionto use one of their vehicles to carry the trash barrels to the dumpsters.[2]
After the trash barrels were loaded onto Messer's pick-up truck, Messer and three other students climbed into the cab of the truck while Charles and Barry Hill, another student in Yancey's weight-lifting class, climbed into the bed of the pick-up truck with the trash barrels. Messer stated that he was not aware that Charles had climbed onto the truck. Charles, on the other hand, testified that Messer was aware that he had climbed onto the truck. The tailgate on Messer's truck was left down. Charles testified that he could have closed the tailgate and then climbed over it when he entered the bed of the truck but did not do so. Charles testified that he sat near the rear of the truck bed with his legs extended out in front of him. Hill testified in his affidavit that Charles kneeled on the tailgate and held onto the tailgate's support cable.
The field house is located at the end of the athletic practice field for the school. The practice field is surrounded by a track and enclosed by a fence. School parking lots are located on both the right and left sides of the practice field. A one-way *302 street runs adjacent to the parking lot on the left side of the practice field. This one-way street, which runs in the opposite direction of the field house, separates the parking lot on the left side of the practice field from an additional school parking lot located across the one-way street. The school's cafeteria and dumpsters are located behind the field house.
There appears to have been three possible routes from the field house to the dumpsters. Yancey did not instruct Messer and the other students to take a particular route to the dumpsters. He testified that the route students normally took to the dumpsters, and the one he assumed the students would take on the day in question, required a truck to be positioned in the parking lot on the left side of the practice field close to the field house. The students would carry the trash barrels from the field house to the truck through a small opening in the fence that encloses the practice field. Once the trash barrels were loaded onto the truck, the truck would exit the parking lot and turn right onto the one-way street, going the wrong way. The truck would then travel a short distance in the wrong direction on the one-way street to the dumpsters. Yancey opined that this route did not require the students to actually leave the campus.
Yancey testified that when he carried the trash barrels to the dumpsters he would drag them along a walking path. This path runs to the rear of the field house along the left side and across a parking lot to the dumpsters.
The route actually taken by Messer and the students on the day in question allowed Messer to position his truck directly in front of the field house by driving onto the track surrounding the practice field through a gate on the fence on the right side of the practice field. Once the trash barrels were loaded onto the truck, Messer exited the practice field through the gate by which he had entered and drove into the parking lot on the right side of the field house. Messer then drove to the lower end of the parking lot and turned right onto a street.[3] Messer then turned right off of this street onto the one-way street that bisects the parking lots and proceeded in the wrong direction on the one-way street to the dumpsters. This route, as opposed to the route students normally took to the dumpsters, required Messer to drive in the wrong direction on the one-way street for a greater distance in order to reach the dumpsters.[4] As Messer was driving down the one-way street to the dumpsters his truck hit a "dip" and Charles fell from the bed of the truck and was severely injured.
Charles testified that the students could have walked the trash barrels to the dumpsters from the field house in less time than it took to retrieve Messer's truck and haul the barrels to the dumpsters. Charles also testified that he could have walked to the dumpsters to meet Messer and the other students to help them unload the trash barrels.
Yancey presented the affidavit of Jerome Wilkens, a retired member of the Board, who testified that the Board had no written policy prohibiting students from leaving the school campus in their vehicles during school hours. Yancey stated that students were permitted to leave campus during school hours to attend vocational school, baseball practice, and softball practice. *303 However, the student handbook in effect at the time of the incident provides under its general rules provision that "[s]tudents are not permitted to go to a car or parking lot without permission of Principal or Assistant Principal." The student handbook also provides the following with regard to parking rules: "All students will come immediately into the school after parking their cars, and shall not return to the car until the end of the school day without permission from the administration. When possible an administrator will accompany the student to the car." Yancey stated that he was provided a copy of the student handbook but that he had not read it. Following the accident, Gene Johnson, the school's principal, notified Yancey by letter that when "giving instructions to students be very specific to detail and at no time can you let a student use their vehicle unless we have written permission from the parent."
Coker sued Messer, who was then a minor, alleging negligence and wantonness in the operation of his truck, which proximately resulted in Charles's being injured.[5] On April 5, 2006, Coker amended his complaint to add Yancey as a defendant, alleging that Yancey had negligently and wantonly directed the students to remove the trash barrels to the school dumpsters and had negligently and wantonly supervised the students.
On May 4, 2006, Yancey answered the complaint, asserting among other defenses, State-agent immunity as a defense to Coker's complaint. On May 11, 2006, Messer answered Coker's complaint and cross-claimed against Yancey.[6] Messer alleged that Yancey had negligently and wantonly ordered him to drive his truck off campus by requiring him to carry the trash barrels to the dumpsters without first obtaining permission from a parent and had negligently and wantonly failed to supervise the students Yancey had ordered to remove the trash barrels to the dumpsters.
On November 13, 2007, Messer moved for a summary judgment as to the cross-claim asserted against Yancey. Messer argued that Yancey was not entitled to State-agent immunity because, Messer argued, Yancey was not acting within the general scope of his authority because his actions violated school policy set forth in the student handbook. On November 15, 2007, Yancey moved for a summary judgment arguing, among other things, that he was entitled to State-agent immunity as to the negligence and wantonness claims asserted against him by Coker and Messer. The trial court, on February 21, 2008, entered an order denying Yancey's motion for a summary judgment. This petition followed.

Standard of Review
This Court has stated:
"`While the general rule is that the denial of a motion for summary judgment is not reviewable, the exception is that the denial of a motion grounded on a claim of immunity is reviewable by petition for writ of mandamus. Ex parte Purvis, 689 So.2d 794 (Ala.1996)....
"`Summary judgment is appropriate only when "there is no genuine issue as to any material fact and ... the moving party is entitled to a judgment as a matter of law." Rule 56(c)(3), Ala. R. Civ. P., Young v. La Quinta Inns, Inc., 682 So.2d 402 (Ala.1996). A court considering *304 a motion for summary judgment will view the record in the light most favorable to the nonmoving party, Hurst v. Alabama Power Co., 675 So.2d 397 (Ala.1996), Fuqua v. Ingersoll-Rand Co., 591 So.2d 486 (Ala.1991); will accord the nonmoving party all reasonable favorable inferences from the evidence, Fuqua, supra, Aldridge v. Valley Steel Constr., Inc., 603 So.2d 981 (Ala.1992); and will resolve all reasonable doubts against the moving party, Hurst, supra, Ex parte Brislin, 719 So.2d 185 (Ala. 1998).
"`An appellate court reviewing a ruling on a motion for summary judgment will, de novo, apply these same standards applicable in the trial court. Fuqua, supra, Brislin, supra. Likewise, the appellate court will consider only that factual material available of record to the trial court for its consideration in deciding the motion. Dynasty Corp. v. Alpha Resins Corp., 577 So.2d 1278 (Ala.1991), Boland v. Fort Rucker Nat'l Bank, 599 So.2d 595 (Ala.1992), Rowe v. Isbell, 599 So.2d 35 (Ala.1992).'"
Ex parte Turner, 840 So.2d 132, 135 (Ala. 2002) (quoting Ex parte Rizk, 791 So.2d 911, 912-13 (Ala.2000)). A writ of mandamus is an extraordinary remedy available only when the petitioner can demonstrate: "`(1) a clear legal right to the order sought; (2) an imperative duty upon the respondent to perform, accompanied by a refusal to do so; (3) the lack of another adequate remedy; and (4) the properly invoked jurisdiction of the court.'" Ex parte Nall, 879 So.2d 541, 543 (Ala.2003) (quoting Ex parte BOC Group, Inc., 823 So.2d 1270, 1272 (Ala.2001)).

Discussion
In Ex parte Cranman, 792 So.2d 392 (Ala.2000), a plurality of this Court restated the test for determining when a State employee is entitled to State-agent immunity:
"A State agent shall be immune from civil liability in his or her personal capacity when the conduct made the basis of the claim against the agent is based upon the agent's
"(1) formulating plans, policies, or designs; or
"(2) exercising his or her judgment in the administration of a department or agency of government, including, but not limited to, examples such as:
"(a) making administrative adjudications;
"(b) allocating resources;
"(c) negotiating contracts;
"(d) hiring, firing, transferring, assigning, or supervising personnel; or
"(3) discharging duties imposed on a department or agency by statute, rule, or regulation, insofar as the statute, rule, or regulation prescribes the manner for performing the duties and the State agent performs the duties in that manner; or
"(4) exercising judgment in the enforcement of the criminal laws of the State, including, but not limited to, law-enforcement officers' arresting or attempting to arrest persons; or
"(5) exercising judgment in the discharge of duties imposed by statute, rule, or regulation in releasing prisoners, counseling or releasing persons of unsound mind, or educating students.
"Notwithstanding anything to the contrary in the foregoing statement of the rule, a State agent shall not be immune from civil liability in his or her personal capacity
"(1) when the Constitution or laws of the United States, or the Constitution of this State, or laws, rules, or regulations of this State enacted or promulgated for *305 the purpose of regulating the activities of a governmental agency require otherwise; or
"(2) when the State agent acts willfully, maliciously, fraudulently, in bad faith, beyond his or her authority, or under a mistaken interpretation of the law."
792 So.2d at 405. Although Cranman was a plurality decision, the restatement of law as it pertains to State-agent immunity set forth in Cranman was subsequently adopted by this Court in Ex parte Rizk, 791 So.2d 911 (Ala.2000), and Ex parte Butts, 775 So.2d 173 (Ala.2000).
Additionally, this Court has stated:
"This Court has established a `burden-shifting' process when a party raises the defense of State-agent immunity. Giambrone v. Douglas, 874 So.2d 1046, 1052 (Ala.2003). In order to claim State-agent immunity, a State agent bears the burden of demonstrating that the plaintiff's claims arise from a function that would entitle the State agent to immunity. Giambrone, 874 So.2d at 1052; Ex parte Wood, 852 So.2d 705, 709 (Ala.2002). If the State agent makes such a showing, the burden then shifts to the plaintiff to show that the State agent acted willfully, maliciously, fraudulently, in bad faith, or beyond his or her authority. Giambrone, 874 So.2d at 1052; Wood, 852 So.2d at 709; Ex parte Davis, 721 So.2d 685, 689 (Ala.1998). `A State agent acts beyond authority and is therefore not immune when he or she "fail[s] to discharge duties pursuant to detailed rules or regulations, such as those stated on a checklist."' Giambrone, 874 So.2d at 1052 (quoting Ex parte Butts, 775 So.2d 173, 178 (Ala. 2000))."
Ex parte Estate of Reynolds, 946 So.2d 450, 452 (Ala.2006).

I.
We first must determine whether Yancey sufficiently demonstrated that the claims asserted against him arise from a function that would entitle him to Stateagent immunity. As stated in Cranman:
"A State agent shall be immune from civil liability in his or her personal capacity when the conduct made the basis of the claim against the agent is based upon the agent's
"....
"(5) exercising judgment in the discharge of duties imposed by statute, rule, or regulation in releasing prisoners, counseling or releasing persons of unsound mind, or educating students."
792 So.2d at 405 (emphasis added).
"Generally, State agents are afforded immunity from civil liability when the conduct made the basis of the claim is based on the exercise of judgment in supervising and educating students." Ex parte Nall, 879 So.2d at 544. This Court recently stated that "[e]ducating students includes not only classroom teaching, but also supervising and educating students in all aspects of the educational process." Ex parte Trottman, 965 So.2d 780, 783 (Ala. 2007).
Yancey was employed by the Board as the school's head football coach and the director of athletics. Part of his duties included teaching a weight-lifting class for those students participating in the school's football program. Yancey was given no guidelines or direction on how to teach the weight-lifting class, and there was no textbook for the class. Yancey required the students, as part of the weight-lifting class, to clean the weight room, locker room, and bathrooms located in the field house. Yancey's purpose for having the students clean the field house was to help prepare them for football by instilling "team discipline" in the students. Because Yancey was given *306 no guidelines in teaching the weight-lifting class, the conduct of the class was left to the exercise of his judgment and discretion. Accordingly, we conclude that, at the time of Charles's injury, Yancey was engaged in a function that would entitle him to immunity. Ex parte Cranman, supra.

II.
Because we have concluded that when Charles was injured Yancey was engaged in a function that would entitle him to immunity, the burden shifts to Coker and Messer to establish that Yancey acted willfully, maliciously, fraudulently, in bad faith, or beyond his authority. Ex parte Cranman, supra. "A State agent acts beyond authority and is therefore not immune when he or she `fail[s] to discharge duties pursuant to detailed rules or regulations, such as those stated on a checklist.'" Giambrone v. Douglas, 874 So.2d 1046, 1052 (Ala.2003) (quoting Ex parte Butts, 775 So.2d at 178).
In this case Yancey was provided a copy of the student handbook that prohibited students from going to their vehicles or to the parking lot "without the permission of Principal or Assistant Principal." The handbook also required students to come immediately into the school after parking their cars and forbade them from returning to their vehicles until the end of the school day without first obtaining "permission from the administration."
Yancey contends that he is not bound by the student handbook because, he says, it governs students only and not faculty. He further contends that, assuming he is bound by the student handbook, as the school's athletics director he was a member of the "administration" and, therefore, had the authority to allow the students to return to their vehicles during the course of the school day. We disagree.
The student handbook was provided to both students and faculty alike. Although the handbook primarily references student conduct, it nonetheless establishes by implication limits on the faculty's authority. In the context of a student-teacher relationship, the teacher assumes the role of the authority figure. In order to function in that role, the teacher assumes a duty pursuant to the handbook to ensure that the student abides by the limits placed on the conduct by the handbook. For example, if the handbook limits the student's conduct by forbidding the student from returning to his or her vehicle in the parking lot during the school day, the teacher's authority with respect to permitting or directing the student's conduct must be correspondingly limited. Otherwise, the teacher would become complicit in the violation of the rule, and the rule would be rendered meaningless. Accordingly, we conclude that the student handbook established limits on Yancey's authority in exercising his judgment in educating students.
As for Yancey's contention that as the director of athletics for the school he was a member of the "administration," we note that the handbook identifies on its cover the principal and assistant principal of the school, along with the superintendent and assistant superintendent and other school officials. The director of athletics is not identified there. Rather, the director of athletics is identified on the inside of the handbook, together with the other teachers, under a section entitled "Faculty and Staff." Thus, we conclude that Yancey was a teacher and an administrator insofar as school athletics are concerned but that he was not a school administrator, and therefore he had no authority to grant permission for a student to return to his vehicle during the school day. Moreover, even assuming Yancey could have been considered an administrator, he would *307 have had the authority under the handbook only to allow the students to return to their vehicles during the school day. Nothing in the handbook can be read as giving an administrator the authority to permit the students to operate their vehicles for the purpose of hauling trash. This is further supported by the letter to Yancey from Principal Johnson following the accident informing Yancey that the students are not allowed to operate their vehicles during the school day without permission from their parents.
The materials before this Court indicate that Yancey, by his own admission, routinely permitted his students to return to, and use, their vehicles to remove trash barrels from the field house to the dumpsters behind the field house. This practice is a clear violation of the policy set forth in the student handbook, to which Yancey is bound. Accordingly, we conclude that Coker and Messer presented substantial evidence, in large degree through Yancey's own statements, that Yancey acted beyond his authority in permitting Messer to use his vehicle to move the trash barrels from the field house to the dumpsters and has therefore failed to establish a clear legal right to the relief sought. Therefore, his petition for the writ of mandamus is denied.
PETITION DENIED.
COBB, C.J., and LYONS, WOODALL, STUART, SMITH, and PARKER, JJ., concur.
SEE, J., concurs specially.
MURDOCK, J., dissents.
SEE, Justice (concurring specially).
I agree with the main opinion that Yancey has not demonstrated that he is entitled to the writ of mandamus. The doctrine of sovereign immunity does more than offer a defense at trial. Qualified immunity "is an immunity from suit rather than a mere defense to liability; and like an absolute immunity, it is effectively lost if a case is erroneously permitted to go to trial." Mitchell v. Forsyth, 472 U.S. 511, 526, 105 S.Ct. 2806, 86 L.Ed.2d 411 (1985). See also Siegert v. Gilley, 500 U.S. 226, 232, 111 S.Ct. 1789, 114 L.Ed.2d 277 (1991) ("One of the purposes of immunity, absolute and qualified, is to spare a defendant not only unwarranted liability but unwarranted demands customarily imposed upon those defending a long drawn out lawsuit."). Therefore, we should be reluctant to send the question of sovereign immunity to the jury, because doing so defeats a fundamental function of the doctrine.
Additionally, sovereign immunity is not intended to be limited to protecting a public actor only when he or she is acting in complete compliance with every statute, rule, and regulation; instead, it is intended to protect the public actor when he or she has a lapse in judgment or imperfectly carries out responsibilities. See, e.g., Ex parte Kennedy, 992 So.2d 1276, 1280 (Ala. 2008) ("`State-agent immunity protects state employees, as agents of the State, in the exercise of their judgment in executing their work responsibilities.'" (quoting Ex parte Hayles, 852 So.2d 117, 122 (Ala. 2002))).
I have previously noted that "to deny teachers State-agent immunity and to require them to defend themselves in civil actions brought by students or parents would discourage them in the performance of their public responsibilities." Giambrone v. Douglas, 874 So.2d 1046, 1057 (Ala.2003) (See, J., specially concurring). In the case before us, however, Yancey did not display a mere lapse in judgment by allowing Messer to use his own truck to move the trash barrels to the dumpster. *308 The record indicates that it was Yancey's practice to allow the students in his weight-lifting class to use their personal cars and trucks to move the trash barrels to the dumpstera practice that is a direct violation of a clear school policy stated in the student handbook. There is no suggestion that Yancey had requested or received a variance from compliance with that policy or that the handbook is not binding on Yancey. See Ex parte Cranman, 792 So.2d 392, 405 (Ala.2000) ("Notwithstanding anything to the contrary in the foregoing statement of the rule, a State agent shall not be immune from civil liability in his or her personal capacity ... when the State agent acts willfully, maliciously, fraudulently, in bad faith, beyond his or her authority, or under a mistaken interpretation of the law.").
Thus, I agree that Yancey has failed to demonstrate that he has a clear legal right to a summary judgment based on his immunity defense. I also agree, therefore, that Yancey is not entitled to the writ of mandamus. Ex parte Nall, 879 So.2d 541, 543 (Ala.2003).
NOTES
[1]  Yancey testified that immediately after instructing the students to carry the trash barrels to the dumpsters, he returned to his office in the field house to take a telephone call. He stated that he was not present when the students were loading the barrels onto Messer's pick-up truck. Charles testified in his deposition taken on February 28, 2006, that he and the other students loaded the barrels onto the truck and that Yancey was not present. However, later in the same deposition Charles stated that he did not load any trash barrels onto Messer's pick-up truck; rather, he stated that Yancey asked him to "go help them unload it." It could be inferred from this statement that Yancey was present when the trash barrels were being loaded onto Messer's pick-up truck. Messer testified that Yancey was present when the trash barrels were being loaded onto his truck and told the students to "put up the tailgate." Nevertheless, Yancey testified that he routinely allowed the students in the weight-lifting class to use their pick-up trucks to remove the trash barrels to the dumpsters.
[2]  Football coaches before Yancey had routinely allowed the students to use their personal vehicles to carry the trash barrels to the dumpsters.
[3]  Nothing in the materials before us indicates whether this street runs through the school campus or whether it is off campus.
[4]  Hill testified in his affidavit that because a gate was kept locked the only possible way to access the dumpsters was to drive on the one-way street.
[5]  Coker also named as a defendant Messer's grandfather, with whom Messer resided. The grandfather was later dismissed.
[6]  By the time Messer filed his answer and cross-claim, he had reached the age of majority.
