Teaching programming to elementary and high school students is important for developing problem-solving and logical reasoning skills. Block-based programming frameworks, such as Scratch and Kodular, have gained popularity for introducing programming concepts in an engaging and more didactic manner. However, these frameworks lack structured tools for analysing student learning processes, which makes it difficult to track progress, identify challenges, and understand student behaviour during application development. This manuscript presents EduPROV, a provenance-based approach that extracts, structures, and analyses student actions from log files generated by block-based programming frameworks. By storing this data in a queryable format, EduPROV supports the identification of learning bottlenecks, tracking programming trajectories, and can help refine teaching strategies. EduPROV was evaluated in a study with elementary and high school students from three schools in southern Brazil, using Kodular as the block-based programming framework. The results show that provenance analysis helps reveal student behaviour, contributing to more informed and effective programming education.