you mean something more like:

                    error_msg = "Couldn't reset module state for {0}/{1}. ".format(
                        unique_student_identifier, problem_urlname
                    )
                    log.exception(error_msg)
                    msg += "<font color='red'>" + error_msg + "({0}) ".format(err) "</font>"