Some moodle activities, like a quiz or assignment, will automatically create grade items in the grade book. If you manually add a grade item, I don't think it can be connected to any resource. It has to be manually graded.
Even if you could connect it to a "resource-file," what would you want to happen?