Writing a letter of recommendation for a mediocre student
Before you write the letter, discuss this with the student, and be blunt about it. Most likely the student needs a letter for something and this is the best they've got. One thing is to turn this in to a teachable moment about the need for students to make connections with their instructors. Depending on what the student wants the letter for, this may be sufficient for their purposes. Some things requires letters but don't pay close attention to them. Did the student say what they wanted the letter for? That maybe should be impact what you say and whether you should write it.