There are $2015$ chairs in the hall. Let the number of chairs be $x$. Then there are $\frac{7}{31}x$ chairs arranged in rows of $5$. Since this is a whole number of chairs, $x$ must be divisible by $31$. Also since $\frac{7}{31}x$ must be divisible by 5, $x$ has to be divisible by $5$ (because $7$ is not divisible by $5$). Similarly, we know that $\frac{11}{31}x$ chairs are arranged in rows of $13$. So $x$ has to be divisible by $13$, since $\frac{11}{31}x$ is divisible by $13$ and $11$ and $13$ do not share common factors.
We know $x$ is divisible by $31$, $5$ and $13$. So $x$ is divisible by the product $31 \cdot 5 \cdot 13 = 2015$. Since there are at most $4000$ chairs in the hall, any multiple of $2015$ would be too many chairs. So the solution is $x = 2015$.