The Lock-In was an event in Westmore Middle School where kids could spend the night and have fun. Its real purpose was to raise money for the school's music program.
In the book
Shown as a "fun" event, it was proven to be boring and risky for Greg Heffley and many other kids. There was an excessive amount of chaperones and a very small number of girls. (Greg claims that only about 10% of the kids were girls)
Most kids brought electronics to entertain themselves. Greg asked Mrs. Barnum what to do, and she showed him an area where kids could play and take "fun breaks". In Greg's opinion, the activities were for little kids. Party games took place, but many were boring to Greg and kids didn't pay attention until Mr. Tanner took away all the electronics and food the kids brought to feed themselves. Everybody eventually found out that Justin Spitzer was sniffing out the snacks, which is what he was being paid, after the chaperones confiscated them.
The first game was an ice-breaker suggested by Mrs. Carr called the "name game" where kids made a nickname for themselves. The point of the games was to get the kids to know each other better, but in Greg's opinion, the kids knew each other a little TOO well. Greg decided on "Great Greg" but George Fleer took "Great", so Mrs. Libby gave him the nickname "Jolly Greg", which he thought was terrible. The next game was "I never told you this before." which was said to help kids bond, but most kids told bad confessions about themselves. Greg knew that the purpose in THAT game was to let the chaperones know who the troublemakers were. His suspicions were confirmed when an adult trailed one of the kids who had put graffiti on the school.
There was a game of Guess-Who? which involved a camera, making the students excited to use an electronic again, despite the cameras being the old-film type. During a game of "Guess-Who?", in which the purpose is to take a close up picture of a body part of someone in their team and then the other teams have to guess who is in the picture, Greg's team took a picture of Tyson Sanders's bent arm. They had the best picture of the teams but they got into near trouble when a chaperone confuses it for someone's buttocks. When Greg's team members make a run for it, they are all eventually caught except for Christopher Brownfield. However they were able to get the teachers to believe it was a bent arm and were let off the hook.
During the night, the boys made fart noises and were still awake. Mr. Palmero turned off the heating to keep them in and told them to fart behind the curtains, which caused major disturbance. At around 3 AM, the parents knocked on the doors and were angry that their kids wouldn't answer the phones and took them all home, except Rowley and Greg, who were the only ones who didn't have cell-phones. Greg later thinks that the whole reason the Lock-In existed was to turn kids off from boy-girl parties. However this does not change his view, as he is seen excited over Jordan Jury hosting a boy-girl party.