Any officer or person upon whom any duty is imposed by this chapter may be compelled to perform his or her duty by writ of mandamus. The circuit courts, or the judges thereof in vacation, shall have jurisdiction by writ and shall, upon affidavit filed showing a proper case, issue a writ to be returned, heard and determined within fifteen days from the commencement of the proceedings. If a circuit court, or a judge thereof in vacation, shall proceed against any board of canvassers by mandamus, or otherwise, to control, in any manner, the action of the board in the performance of its duties, under the provisions of this article, in any case concerning the election of a member of the House of Delegates, or a state senator, and shall fail to enter a final order in the proceedings, settling all questions presented therein within fifteen days from the commencement of the proceedings, unless delayed by proceedings in the Supreme Court of Appeals, or a judge thereof in vacation, the writ shall be dismissed. The board shall convene within not less than five days thereafter and proceed forthwith to the performance of its duties under the provisions of this article. A mandamus shall lie from the Supreme Court of Appeals, or any one of the judges thereof in vacation, returnable before court, to compel any officer herein to do and perform legally any duty required of him or her. In an election of a member of the House of Delegates and state senator, a writ of certiorari, mandamus or prohibition shall lie from the Supreme Court of Appeals, or a judge thereof in vacation, returnable before the court, to correct any error of law and review and correct the proceedings of any circuit court, or the judge thereof in vacation, or any board of canvassers. When any rule to show cause why a writ of mandamus, prohibition or certiorari is issued by the court, or a judge thereof in vacation, it shall be the duty of the court to convene in special session at the state capital, not later than ten days from the date of the writ, to hear and determine all matters arising upon the writ. The issues raised in the petition for a writ of mandamus, prohibition or certiorari shall have precedence over all other business pending before the court. The issues before the court shall be determined within five days from the assembling of the court and, in any case, in ample time for the case to be remanded and final action taken by the circuit court and the board of canvassers in order that the board may perform its duty and issue the certificate of election before the second Wednesday in January, then next following. Mandamus and prohibition proceedings under this section may be upon affidavit alone.