MILTON — No one was standing in front of an eighth-grade math class at St. Mary of the Hills School, but fractions were slowly appearing in colored chalk, as if written by the invisible hand of a ghost. The voice of an unseen narrator emanated from speakers on both sides of the smartboard, explaining the equation step by step.

While students sat quietly in their seats, listening to this virtual instructor solve the math problem, their real-life math teacher, Marianne Ruggiero, walked around the classroom with her arms folded, peering down at them as they scribbled notes with pencils into spiral-bound notebooks and tapped the keyboards of laptop computers.

Next, the students began working on problems themselves. With a few touches on her iPad screen, Ruggiero checked how students were doing on a particular problem and spotted who was struggling.

The math lesson that the students were watching on the smartboard was an online video that served as a virtual teaching assistant, allowing Ruggiero to monitor students’ classwork more closely, and provide one-on-one help if needed.

Scenes like this are becoming more common in classrooms across Massachusetts, as schools incorporate online learning into their curriculums. In 2010-2011, 48 percent of school districts reported having at least one student taking an online course, according to the Massachusetts Department of Elementary and Secondary Education.

The videos shown at St. Mary’s are produced by Khan Academy, a nonprofit organization based in Mountain View, Calif., that produces learning tools that are free for anyone to use. While it is unclear how many schools in Massachusetts are using these videos, Khan Academy estimates that its website received more than 280,000 visits from Massachusetts users from mid-September to mid-October.

Khan Academy lessons are “designed to allow the teachers to do more teaching,” said St. Mary’s advancement director, Brett Marcotte, who is overseeing implementation of the videos at her school and Quincy Catholic Academy. “They’re able to get a quicker assessment of where kids are. It also frees them up. Instead of standing at the front of the room lecturing, this way allows students and teachers to interact on a daily basis,” Marcotte said.

Online educational tools are not a silver-bullet solution and do not necessarily work well for every student, cautioned Anne Hird, a professor at Bridgewater State University, where she coordinates its instruction technology program, and the author of “Learning from Cyber-Savvy Students: How Internet-Age Kids Impact Classroom Teaching.”

Online learning resources such as Khan Academy “require a fair amount of discipline, self-motivation, and organization . . . if that is not there, the online learning is likely to fail,” she said.

“I think they offer a very good service. But the bottom line is . . . what matters the most is the instructor,” Hird said. “The individual teacher is absolutely key to how any of these resources are used and how effective they are for students.”

To bring the Khan videos into their classrooms, St. Mary’s and Quincy Catholic Academy were recently awarded a grant from the Lynch Foundation. The grant paid for principals and teachers from both schools to travel to California for training, and bought 175 Google Chromebook laptop computers for students to use in class.

Ruggiero now uses Khan Academy videos in her math classes about twice a week.

Each student gets an account on Khan’s website. After school, they can log in from anywhere that has Internet access, and watch math videos or do practice exercises.

Students earn “energy points” and “badges” by watching videos and spending time on exercises.

The more time and effort they put into the lessons, the more points they earn.

“It’s exciting for them,” Ruggiero said.

It’s exciting for the teachers, too.

Ruggiero can see exactly how much time her students spent on the math problems at home. The color-coded graphs and charts show her how many students grasped a certain skill, and how many got stuck. She can see how many videos they have watched in class and how many they have viewed at home. Their progress can be tracked over time.

Unlike the days of yore, students do not have to wait for days for their homework or test to be corrected by the teacher and handed back. They find out instantly how they did. And so does the teacher.

With a few taps on her iPad, Rug­giero said, “I can pull up any student I want and know exactly where they are.”

When it comes to accessing real-time statistics, she said, “I’m just giddy.”Continued...