Last week, a theater teacher in Texas had the Internet grooving with an infectious, viral dance video he made with his students. Of course he's hardly the first teacher to discover the power of social media when it comes to reaching teenagers. Here's a look at what he did and how other creative teachers have taken over the Internet with their messages.

Scot Pankey, the theater teacher at A. Maceo Smith New Tech High School in Dallas, led his students in an epic routine throughout the school to the sounds of "Uptown Funk" by Mark Ronson and Bruno Mars. “I heard the song before Christmas and fell in love with it,” he told the Dallas Morning News. “We are a project-based school … and that means you give the students a project, put them in teams, and they have to come up with solutions. They had three weeks to work on it, then present as a group what they learned.”

He offered to do the choreographed dance with his six theater classes. “I told them, ‘I am not a dancer, but I’d love to do this and go on this journey with you, and we can all learn from it and have a good time,’” he says. “And they were all on board.”

He certainly looks like a good dancer, and the kids look like they had a blast. The video was done in one take and shot by two students (who were agile enough to navigate staircases and hallways while sometimes running backwards) Count Bruno Mars as one of the video's nearly 8 million viewers. Mars said on Facebook: “I cried at the end. I'm still a thug though. Thank you to everyone involved in making this video.”

Back-to-school motivation

Getting psyched to go back to school is never easy. Two teachers in Wisconsin tried to make the pain a little less intense by conjuring up their best Kevin Bacon.

Union Grove High School physical education teacher Jordan Hein and science teacher Mitchell Brachmann danced and sang their way through "Our School," their own version of "Footloose." It's the third back-to-school video for the creative teachers and this one earned them a trip to "Good Morning America" where they made their national dancing debut.

“We want to show kids we can have fun and also create an amazing and unique learning environment at the same time," Hein said on the morning show. "Learning and fun should go hand and hand.”

Mean tweets

Inspired by late-night host Jimmy Kimmel who talks celebrities into reading mean tweets about themselves, students at Los Alamitos High School in California did the same with teachers. The tweets weren't actually real, but were inspired by the teachers' real quirks and reputations. The exercise was kind of a public service announcement about social media.

“It was a very positive way to get across not posting your business on the Internet, because you never know who it might get in front of,” Anthony Cobbs, the school's video production instructor, told ABC News. “It ended up being really funny and relatable.” And the teachers, reportedly, were good sports about it.

Singing about school closings

Matt Glendinning, the head of school at Moses Brown School in Providence, Rhode Island, got a lot of attention recently for his epic school cancelation announcement — a parody of the over-popular "Let It Go." The entertaining video is amazing for its incredible production value including set changes and fancy camera work. It was obvious there were some administrators itching for a snow day.

"Sunday morning we saw the weather report," Adam Olenn, the school's director of communications, told Boston's WBUR radio, "and we said, 'Oh, we've got to get this done.'" Olenn admitted the shoot was planned in advance and the vocals are supplied by the school's choir director, Justin Peters. "I’ve seen a couple of funny principal snow day closings, and I thought we could really crush that," said Olenn.

Last year, administrators at Durham Academy in North Carolina may have been the first to go viral with their school closing announcement via a clever "Ice, Ice, Baby." Head of School Michael Ulku-Steiner and Assistant Head of School Lee Hark were deadpan amazing and did much with the use of simple props — a U.S. Olympics sweater and ski goggles. The video has more than 5 million views.

A lyrical sample:

All right stop, collaborate and listen.

Ice is back and the roads will glisten.

Polar vortex has a hold of us tightly,

Wind like a harpoon daily and nightly.

OK. One more. Educators at Stephens Elementary School in Burlington, Kentucky, put a lot of feeling into their rocking school-closing announcement, sung to the tune of "Bohemian Rhapsody." Principal James Detwiler and drama teacher Chad Caddell said they thought parents needed a little entertainment with all the foul weather. Hence the lyrics, "So everyone grab a Snuggie and watch TV!"

Videobombing students

Who says teachers don't have a sense of humor? Who knows where this idea originated, but several schools (and Ellen DeGeneres) ran with it. While students were interviewed for one fake reason or another, teachers secretly danced behind them. They did it at Ossun Elementary in Lafayette, Louisiana (above) and at Bristol Eastern High School in Connecticut (below).

Teacher pranks

Joe Slifka, a teacher at LaBrae High School in Leavittsburg, Ohio, got tired of a student who always fell asleep in his class. One Friday after a test, he convinced the rest of the class to join him in a prank when the teen went to sleep. The result was played on "America's Funniest Videos."

Promotional image: YouTube

Mary Jo DiLonardo covers a wide range of topics focused on nature, health, science and anything that helps make the world a better place.

How do teachers reach students? Try a little funk
These inventive educators use the power of social media to keep students amused and engaged.