Where do I file the bug?

Where do I file the bug?

by piersante sestini -
Number of replies: 4
I am having a problem in the questionnaire module.
My server runs on port 8000
When a user tries to submit the results of the questionnaire, gets a "file not found" error, and results aren't stored sad

It turns out that the form action linked to the "Submit Questionnaire" button is a URL where the port information is stripped off (that is, http://www.mydomain.etc/moddle/etc instead of http://www.mydomain.etc:8000/moodle/etc

That action is defined in questionnaire/phpesp/public/handler.php as the content of the global variable $FULLME
...

$FULLME is defined in moodle/lib/setup.php as:
$FULLME = qualified_me();
...
qualified_me() is defined in moodle/lib/weblib.php as $url['host']
where $url is an array obtained by: $url = parse_url($CFG->wwwroot);
....
parse_url() is a PHP function that divides a URL in an array, where
array['host'] contains the host.
array['port'] contains the port etc

So it is here that the port information gets lost!

Now, I still don't know where the bug is:
1) Is questionnaire that wasn't supposed to call $FULLME to get the address?
2) Is setup.php that wasn't supposed to call qualified_me() to form $FULLME?
3) Is qualified_me() that should include the port information?

My guess would be that qualified_me() should be fixed by adding the content of ['port'] if nonempty, but I don't know it this could have side effects.

In wich "component" should a file it in the bugtracker? Questionnaire? Installation? Other?

Once this is known the bug should be easily fixed!

cheers,
Piersante
Average of ratings: -
In reply to piersante sestini

Re: Where do I file the bug?

by N Hansen -
Since the questionnaire module is not part of the standard Moodle release yet, your best place to post this would be in the questionnaire module forum. Mike Churchward is responsible for this module and he tends to follow-up pretty quickly on things posted there.
In reply to N Hansen

Re: Where do I file the bug?

by piersante sestini -
I am not sure that the problem is in Questionnaire. The point is that $FULLME is defined outside Questionnaire, in \moodle\lib\setup.php and it already contains a clearly wrong url...

I did change the definition of function qualified_me() in weblib.php (still, not a Questionnaire script) by adding

if (!empty($url['port'])) {
$hostname = $url['host'].":".$url['port'];
}
and so far it fixed the problem for me.

But I don't know the aim of that function, so cannot be sure that that is the right solution.

cheers,
Piersante