Problem Description
I am writing a block where I am collecting the [metadata](https://moodle.org/mod/glossary/showentry.php?eid=184&displayformat=dictionary "Glossary of common terms: metadata") of a **videofile** and sending it to my block table but problem is 
I want to validate the data on [server](https://moodle.org/mod/glossary/showentry.php?eid=30&displayformat=dictionary "Glossary of common terms: server") side by checking the **metadata**. for e.g the video has a time duration = 300 seconds,
now I want to validate the **timeduration** variable value that it can't be more then 300 , so how can i get that file information retrieve on server side and validate with my variable.
if value is not exceeding the total timelimit so I can insert into [database](https://moodle.org/mod/glossary/showentry.php?eid=15&displayformat=dictionary "Glossary of common terms: database").
currently I am retrieving three values which i am able to validate ,
courseid,resrouce id and instance id
these three values are associated with the file information but I am unable to get the way how can i fetch the file metadata.
I tried various website and all details but unable to find any solution.
AI-Generated Solution
Powered by LMSouq AI · GPT-4.1-mini
Analyzing problem and generating solution…
Was this solution helpful?