I really need some help with the function notice_yesno defined in weblib.php.
I am implementing a new activity-module. And when adding this module using the function mymodule_add_instance($mymodule, $showmessage=true) I need a message to be shown with a yes- and a no-option. When the users chosses the yes-option, I actually want the function to go on working.
But if I don't stop the script using exit, it would go on working not waiting for the users entry.
I added the following code into my add_instance function:
$yeslink = $CFG->wwwroot.'/mod/mymodule/lib.php';
$yesoptions = array('showmessage'=>'no', 'sesskey'=>sesskey(), 'mumiemodule'=>$mymodule);
$nolink = $CFG->wwwroot.'/course/modedit.php?add=mymodule&type=&course=8§ion=0&return=0';
notice_yesno(get_string('warning', 'mymodule'), $yeslink, $nolink, $yesoptions);
So as you can see I try to send the whole information to the same script again. But unfortunately it is not possible to send the mymodule-object back using a post-method.
It would be perfect, if i could add a function-call to my yes-option instead of a link. Is this possible???
Or do you have any other ideas how I could solve this problem?
I am really stuck! I thought this would no big problem. But I lost the whole last week working on this.
Please anybody help!
General developer forum
object gets missing
This discussion has been locked because a year has elapsed since the last post. Please start a new discussion topic.