Adding my own php program to feedback module

Adding my own php program to feedback module

by Mike Young -
Number of replies: 2

I add a feedback modlue and got the responses from Learners. But like quizes at the end of the feedback module of each learner, I want to get that data from md_feedback_value table and need to give my own calculation responses. I was able to developed this in eclipse and php code.

eg:

<?php
$con=mysqli_connect("localhost:3306","root","","test");
// Check connection
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}

$result = mysqli_query($con,"SELECT * FROM mdl_feedback_value WHERE mdl_feedback_value.item=2 and mdl_feedback_value.completed=28 ");


while($row= mysqli_fetch_array($result))

echo $row['value'];

.........

mysqli_close($con);

?>

I don't know how to add this functionality to moodle

I and not sure how I can edit feedback module. I try to add this as a new module by reading "http://docs.moodle.org/dev/NEWMODULE_Documentation"

Please give me a link to study step by step simple leaning mateials to changing feedback module or newmodule or please tell me a good way to add this php codes. Because I am new to customizing modules on moodle. 

Thank you

Mike

Average of ratings: -
In reply to Mike Young

Re: Adding my own php program to feedback module

by Andreas Grabs -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Translators

Hi Mike,

here you can find some good additional information as starting point for you:

http://docs.moodle.org/dev/Data_manipulation_API
http://docs.moodle.org/dev/Activity_modules
http://docs.moodle.org/dev/Blocks

Best regards
Andreas

Average of ratings: Useful (1)
In reply to Andreas Grabs

Re: Adding my own php program to feedback module

by Mike Young -

Thank you very much Andreas smile

Best Regards

Mike