Acting in a District of Columbia school system case that dates back more than seven years, the Supreme Court blocked yesterday an effort to restrict distribution of congressional documents to Capitol Hill.

The justices let stand a ruling in which the U.S. Court of Appeals here refused to allow the Public Printer and the Superintendent of Public Documents to be personally liable for damages when they perform official acts in good faith.

The case began in December 1970 when the House District Committee, then headed by Rep. John L. McMillan (D-S.C.), published a report on problems in the city schools.

Of the 495 pages, 64 named students purportedly involved in disciplinary problems, absenteeism and unsatisfactory work on exams.

Using assumed names to protect their anonymity, some of the students and their parents filed a class action complaining that their privacy and other rights had been infringed in violation of the U.S. Consttution.

The defendants named in the suit included members of the House committee and its staff and the printer and the superintendent.

A federal judge dismissed them on the ground that they had absolute immunity under a provision in the COnstitution conferring absolute immunity on congressional speech and debate. The provision has been defined to include congressional hearings and reports.

The appellate court affirmed the decision, but the Supreme Court, while agreeing with the dismissal of the committee members and staff, sent the case back for a determination concerning the printer and the superintendent.

The justices' question was whether any part of the publication and distribution of the report "went beyond the limits of the speech and debate clause." That is, whether the officials had exceeded "the legislative needs of Congress, and hence the limits of immunity."

After an inquiry, a trial judge established that in addition to 2,557 copies of the report distributed on Capitol Hill and 796 to various federal agencies, 92 went to reporters and other members of the public who maintained standing orders for such documents. Another 80 went to foreign legations with similar standing orders.

This distribution was within a legitimate legislative need, the judge ruled. Agreeing, the appeals court held that the right to petition Congress "would be meaningless if proceedings in Congress were not publicly available.

"Restricting distribution of committee reports to members of Congress and the federal agencies would be unthinkable," the court said.

The printer and the superintendent have a qualified immunity from damage suits when they believe they act in good faith and legally, the court ruled, adding, "It would serve the interests of neither the Congress nor the public to require the printer and the superintendent, and indeed each of their employes, to impose prior censorship on all congressional documents on pain of personal liability . . ."