The function call to Composite.Pages.GetPageId didn't yield any results, so I went back to the original function call and used:
<f:functionsxmlns:f="http://www.composite.net/ns/function/1.0"><f:functionname="Courses.AllSubjects"localname="AllSubjects"><f:paramname="URL"><f:functionname="Composite.Web.Server.ServerVariable"><f:paramname="VariableName"value="PATH_INFO"/></f:function></f:param></f:function></f:functions>
I'm not sure if this is the best way to do it, but it works.