No one could have done the duty. (No one was able to do the duty for some reason not specified here.)
or
No one has done the duty. (No one did the duty, even though they might have been able to do it.)
He could have done his duty if he had gone there. (His duty is in the past and implies he didn’t or the person speaking doesn’t know whether he did or not.)
or
He could do his duty if he went there. (It is in the present, and it is still possible that he could do his duty.)