Collaboration in group-based learning often suffers from inequitable effort distribution and role stereotyping. To address these challenges, we developed a structured role enforcement tool within PrairieLearn, an open-source learning platform. This tool allows instructors to assign roles with specific permissions, facilitating the equitable distribution and management of tasks. In its initial deployment, the tool was implemented in a computer science course with both in-person and online sections. Analysis of collaboration metrics -- such as role adherence, role rotation, and team consistency -- revealed positive outcomes across both formats. These findings demonstrate the tool’s potential to foster effective and equitable collaboration in diverse learning environments. Future work will examine its impact on students’ sense of belonging and collaborative learning outcomes.