how to make new widget for last units

hi Dear ,
How can i make a new widget to show last units made by instructors ?

not complete Description ,just a guid to make and query last units (in all courses ) and show the units metas

thanks a lot