E.L., a minor child, by and through his next friend, Sharon Love, on behalf of himself and all others similarly situated, sued J. Walter Wood, Jr., executive director of the Department of Youth Services (“the Department”), and other fictitiously named defendants, on theories of negligence and wantonness, seeking damages as a result of Wood’s alleged failure to provide adequate educational programs for children committed to the Department’s facilities. Wood moved for a summary judgment, arguing that he was entitled to State or State-agent immunity in his capacity as the executive director of the Department. The trial court denied the summary-judgment motion, and Wood petitioned this Court for a writ of mandamus directing the trial court to enter a summary judgment on the basis that Wood is entitled to immunity from liability. We deny the petition.
The Department operates facilities for, and provides social and educational services to, delinquent youth committed to its *707custody in accordance with State law. As executive director of the Department, Wood implements the policies and procedures established by the Alabama Youth Services Board.1 Wood has worked in the juvenile justice system for over 28 years; he was appointed to his current position as executive director of the Department on July 19,1999.
E.L. was adjudicated a delinquent and was placed at the Vacca campus operated by the Department on December 4, 2001. E.L. alleges that he and other class members at the Vacca campus have not received the curriculum and course of study mandated by State law. He states that he attends school for only two hours each school day, as opposed to the six hours required by § 16-1-1, Ala.Code 1975, and Rule 290-3-1-.02 of the Alabama State Department of Education. E.L. claims that during those two-hour classes he has received no educational instruction and that, instead, he and his classmates watch movies during class time at the Vacca campus.2 E.L. further asserts that Wood, as executive director, is required to periodically monitor the Department’s programs to determine their effectiveness and whether they adhere to the Department’s policy and procedure.
E.L. sued Wood, “in his individual capacity as Director” of the Department, seeking to represent all individuals committed to the custody of the Department and placed at the Vacca campus from February 12, 2000, to the present. E.L. is seeking compensatory and punitive damages, attorney fees, and costs. E.L. contends that Wood is personally responsible for providing and implementing appropriate educational opportunities required by State law for those individuals committed to the custody of the Department. E.L. argues that Wood acted in bad faith by willfully denying E.L. and his class members “equitable and adequate” educational programs.
Initially, Wood objected to E.L.’s efforts to certify this case as a class action. Wood failed to respond to the request for production that E.L. filed along with his initial complaint. Instead, Wood sought to stay discovery in the trial court, or, alternatively, to limit discovery to those issues relating to his immunity from liability and/or class-action certification. E.L. filed a response along with a motion to compel production. The trial court did not rule on the discovery motions, but directed Wood to first file a motion to dismiss based upon immunity before it ruled on the discovery motions.
Instead, Wood filed a motion for a summary judgment; the motion was supported by his own affidavit. In its entirety, Wood’s affidavit states:
“My name is J. Walter Wood, Jr., and I am the Executive Director of the Alabama Department of Youth Services. I was appointed to that position by the Alabama Youth Services Board on July 19, 1999. I have worked in juvenile justice and juvenile corrections for over 28 years.
*708“As Executive Director, I carry out the policy and procedure established by the Alabama Youth Services Board for the operation of the Department within the budget limitations established by the Legislature in the allocation of funds for the Department'. I have reviewed the amended complaint filed by the Plaintiff in the case pending in the Montgomery County Circuit Court, styled E.L. v. Walter Wood, [C]ase No. 02-461-PR. All of my responsibilities in connection with the issues identified in the complaint require the exercise of judgment and discretion in carrying out state policy. The issues involve only the following: administration of the Department, allocation of resources, hiring, firing, transferring, assigning, or supervising personnel, or otherwise exercising judgment in the discharge of my duties imposed by statute, rule[,] or regulation in counseling or releasing persons of unsound mind or educating students.”
In his summary-judgment motion, Wood argued that he was entitled to State or State-agent immunity. The trial court denied Wood’s motion for a summary judgment and questioned how it could consider the motion based on the information before it without allowing further discovery. Wood then filed his mandamus petition.
A writ of mandamus is a
“drastic and extraordinary writ that will be issued only when there is: 1) a clear legal right in the petitioner 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) properly invoked jurisdiction of the court.”
Ex parte United Serv. Stations, Inc., 628 So.2d 501, 503 (Ala.1993); Ex parte Am-South Bank, N.A., 589 So.2d 715, 717 (Ala.1991); Ex parte Day, 584 So.2d 493, 494 (Ala.1991). While the general rule is that denial of a summary-judgment motion is not immediately reviewable by an appellate court, the exception to the general rule is that a denial of a motion for a summary judgment grounded on a claim of immunity is immediately reviewable by a petition for a writ of mandamus, Ex parte Purvis, 689 So.2d 794 (Ala.1996), or by a permissive appeal pursuant to Rule 5, Ala. R.App. P., Ex parte Franklin County Department of Human Resources, 674 So.2d 1277 (Ala.1996).
However, whether review of the denial of a summary-judgment motion is by a petition for a writ of mandamus or by permissive appeal, the appellate court’s standard of review remains the same. If there is a genuine issue as to any material fact on the question whether the movant is entitled to immunity, then the moving party is not entitled to a summary judgment. Rule 56, Ala. R. Civ. P. In determining whether there is a material fact on the question whether the movant is entitled to immunity, courts, both trial and appellate, must view the record in the light most favorable to the nonmoving party, accord the nonmoving party all reasonable favorable inferences from the evidence, and resolve all reasonable doubts against the moving party, considering only the evidence before the trial court at the time it denied the motion for a summary judgment. Ex parte Rizk, 791 So.2d 911, 912 (Ala.2000). After reviewing the record before the trial court at the time it denied Wood’s motion for a summary judgment, we conclude that Wood failed to meet his burden.
Wood argues in his petition that E.L.’s claims against him in his individual capacity are barred by the doctrine of State-agent immunity and that E.L. should have asserted his claims against the State, not against Wood individually. Wood fur*709ther argues that he cannot be held personally hable under the theory of respondeat superior when the Department is immune from liability, absent proof that he acted willfully, maliciously, or in bad faith.
E.L. argues that a writ of mandamus is inappropriate in this case because, he says, Wood failed to present evidence demonstrating that the claims asserted against him arise from his performance of discretionary acts. “ ‘Discretionary acts’ are defined as ‘those acts as to which there is no hard and fast rule as to the course of conduct that one must or must not take and those acts requiring exercise in judgment and choice and involving what is just and proper under the circumstances.’ ” Ex parte Davis, 721 So.2d 685, 688-89 (Ala.1998) (quoting Wright v. Wynn, 682 So.2d 1, 2 (Ala.1996)). This Court restated the standard applicable in cases involving State-agent immunity in Ex parte Cranman, 792 So.2d 392 (Ala.2000).3 E.L. agrees that certain aspects of providing education to children in the custody of the Department require the exercise of discretion and judgment; however, E.L. argues that compliance with the minimum number of hours of required curriculum per school day as established by State law involves no exercise of judgment on behalf of Wood.
This Court has established a “burden-shifting” process when a trial court is presented with the defense of State-agent immunity:
“ ‘[A] State officer or employee is not protected by discretionary immunity if in performing his discretionary functions he willfully, maliciously, fraudulently, or in bad faith injures someone. [Nonetheless,] [o]nce a defendant demonstrates that a plaintiffs claims arise from the defendant’s performance of a discretionary function [i.e., a function now entitling the defendant to State-agent immunity], the burden then shifts to the plaintiff to establish that the defendant acted in bad faith or with malice or willfulness, in order to deny the defendant discretionary immunity from suit....’
“Ex parte Davis, 721 So.2d 685, 689 (Ala.1998) (citations omitted [in Ryan]).
“ ‘In order to claim the benefits of [State] immunity, a State officer or employee bears the burden of showing that the plaintiffs claims arise from the officer or employee’s performance of a discretionary duty on behalf of the State. Upon such a showing, the burden shifts to the plaintiff, who must show that the officer or employee acted fraudulently, willfully, maliciously, or in bad faith.’
“Ex parte Alabama Dep’t of Transp., 764 So.2d 1263, 1268-69 (Ala.2000) (citation omitted [in Ryan]).”
Ryan v. Hayes, 831 So.2d 21, 28 (Ala.2002). Therefore, to meet his burden, Wood must demonstrate that E.L.’s claims arise from Wood’s performance of a function that would entitle him to immunity. Ryan, 831 So.2d at 28. If Wood meets that burden, the burden then shifts to E.L. to establish that Wood acted with bad faith or malice or willfully, in order to deny Wood’s immunity from suit. Id.
In his petition to this Court, Wood argues that he satisfied his burden of proof and demonstrated that E.L.’s claims against him were based upon his performance of discretionary acts entitling him to immunity under the restatement of the *710discretionary-function doctrine that underlies State-agent immunity as set forth in Cranman, supra. In his affidavit submitted to the trial court with his summary-judgment motion, Wood makes the broad assertion that the claims identified in E.L.’s complaint require him to exercise his judgment and discretion in carrying out State policy. Wood further states that the issues involved in E.L.’s action include “administration of the Department, allocation of resources, hiring, firing, transferring, assigning, or supervising personnel, or otherwise exercising judgment in the discharge of my duties imposed by statute, rule[,] or regulation in counseling or releasing persons of unsound mind or educating students.”
Wood’s affidavit simply recites the rule of State-agent immunity restated in Cranman. In Cranman, we stated:
“A State agent shall be immune from civil Lability 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
“(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 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 Wood’s affidavit states the issues in terms that would lead to the conclusion that he falls under the immunity from liability set forth in Cranman, Wood fails to provide any significant facts relating to his personal involvement in the actions giving rise to the claims asserted against him.
In Ex parte Blankenship, 806 So.2d 1186 (Ala.2000), a high-school band director and a high-school principal petitioned this Court seeking the protection of discretionary immunity for their actions in supervising a 13-year-old junior-high-school student who was a member of the high-school band. 806 So.2d at 1186-87. The parents of the student sought damages on the theory that the band director and principal should have prevented their daughter from leaving the high-school campus with her boyfriend, who subsequently engaged in sexual intercourse with her. 806 So.2d at 1186. Her boyfriend was also a member of the marching band *711at the high school; however, he had dropped out of school and was not attending the high school as a student. 806 So.2d at 1187. The band director stated that he allowed the boyfriend to participate in the band because he thought the boyfriend was attending a private school that did not offer band activities. Id. Based upon the standards set forth in Cranman, we granted immunity for both the band director and the principal because the decision to allow the boyfriend to participate in the band activities was within their discretion in discharging their duty of educating students. 806 So.2d at 1189-90; see also Ex parte Spivey, 846 So.2d 322 (Ala.2002) (immunity granted to teacher and director of vocational center upon evidence that the teacher and the director were exercising judgment in educating high-school students).
Unlike the materials concerning the actions of the State employees in Blankenship and Spivey that were before us when those cases were decided, Wood has not presented to the trial court, and therefore has not presented to this Court, evidence dealing specifically with the activities at the Vacca campus that are made the basis of this action.
Wood asserts that a service plan providing for E.L.’s education was created because E.L. was at the Vacca campus for more than 21 days.4 However, neither we nor the trial court know whether Wood was aware that E.L. and his class members were allegedly watching movies during class time. If Wood was unaware of that activity, we do not know the basis upon which he, in the exercise of his judgment in discharging his responsibilities, should reasonably be unaware of such activity. If Wood was aware of that activity, we do not know whether he deemed the movies educational or even that he was or should be aware of what specific movies were being shown as part of E.L.’s service plan. In sum, Wood has failed to present facts sufficient for either the trial court or this Court to determine whether his conduct entitles him to the defense of State-agent immunity.
The evidence Wood presented in support of his motion for a summary judgment is analogous to that presented in Dunnam v. Ovbiagele, 814 So.2d 232 (Ala.2001). In Dunnam, the trial court entered a summary judgment in favor of doctors employed by a State agency based upon State-agent immunity under Cranman, supra. 814 So.2d at 235. In support of their motions for a summary judgment, the doctors submitted their own affidavits, which “stated only that their actions regarding the care and treatment of [the deceased] involved discretionary health-care determinations that required the exercise of professional judgment and discretion.” 814 So.2d at 237. We concluded that the trial court erred in entering the summary judgment on the basis of State-agent immunity because the doctors failed to provide a rule or regulation that governed the exercise of their duties. 814 So.2d at 237; see also Ex parte Butts, 775 So.2d 173 (Ala.2000) (holding that further discovery was needed before the plaintiffs’ wrongful-death action could be dismissed based upon the defendants’ claim of State-agent immunity).
Like the affidavits in Dunnam, Wood’s affidavit states in conclusory terms that his duties required him to exercise his judgment and discretion. He listed his duties, yet failed to state his involvement, or his adherence to a rule or regulation governing the exercise of his duties, in the *712actions underlying the claims asserted against him. Based on the materials before us, we hold that the evidence was insufficient to support a conclusion that Wood was entitled to State-agent immunity. In so holding, we do not conclude that an affidavit can never constitute adequate evidentiary support for a summary-judgment motion based on the defense of State-agent • immunity. A factually de-tañed affidavit could provide the evidence needed for a court to determine whether a defendant is entitled to State or State-agent immunity. The affidavit submitted in this case, however, does not include those necessary factual detaüs. Whfle State and State-agent immunity are necessary to preserve the constitutional protection afforded the exercise of judgment in discharge of governmental functions as set forth in Cranman, we cannot simply grant such immunity without sufficient facts to define Wood’s role in the curriculum decisions made in the present case. See McDuffie v. Roscoe, 679 So.2d 641, 643 (Ala.1996).
Based upon the inadequacy of the materials before us, we find no abuse of discretion in the trial court’s deferral of resolution of the issue of State or State-agent immunity until E.L. has completed further discovery limited to the issue of immunity. Of course, this holding is purely procedural. We should not be understood as indicating, one way or another, the proper course of action in disposing of Wood’s assertion of the defense of immunity. Such a determination must await development of the facts concerning Wood’s involvement in the educational instruction of E.L. and his class members.
We are well aware that the availability of the defenses of State and State-agent immunity should be determined as a threshold issue in order to avoid the costs and expenses of trial where the defense is dispositive, Mitchell v. Forsyth, 472 U.S. 511, 512, 105 S.Ct. 2806, 86 L.Ed.2d 411 (1985); however, we cannot conclude, with such limited facts before us at this point, that Wood is immune from suit based upon State or State-agent immunity. We deny the petition. The trial court should allow further discovery on the issues necessary to determine whether Wood is entitled to immunity.
PETITION DENIED.
MOORE, C.J., and HOUSTON, SEE, BROWN, JOHNSTONE, HARWOOD, WOODALL, and STUART, JJ., concur.