A.
Every person riding a bicycle upon a street shall be granted all of the rights and shall be subject to all of the duties applicable to the driver of a vehicle pursuant to the New York State Vehicle and Traffic Law, except those provisions, which by their nature, are not applicable. Every person riding a bicycle upon a sidewalk shall be granted all of the rights and shall be subject to all of the duties applicable to a pedestrian.
B.
A violation of any provision of this chapter by an operator of a bicycle shall be ticketed using the same procedure as is used for motor vehicle infractions, except that any violation committed while operating a bicycle shall not affect the status of the violator's motor vehicle operator's license. When a citation is issued to a bicycle operator, the fact that the violation involves a bicycle shall be clearly indicated on the citation.
C.
Whenever there is a violation of traffic law by a bicycle operator or a violation by a motorist that endangers a bicycle operator, the court may permit demonstration of successful completion of a court-approved cycling knowledge course or test in lieu of or in addition to a fine or other penalty.