In the p-adaptive version of the finite element method, elements are allowed to have shape functions with arbitrary different polynomial orders. Therefore regarding a 2D problem with quadrilateral hierarchic shape functions, the polynomial orders of four edge-modes of an element, $p_e^1,p_e^2,p_e^3,p_e^4$, and its internal-mode, $p_i$, might be in general not the same.
In such a case, what degree of Gauss-Legendre quadrature should be used to numerically integrate the area integrals on an element? My guess is that $\mathrm{max}(p_e^1,p_e^2,p_e^3,p_e^4,p_i)$ determines what accuracy order of quadrature to use.