- Posts: 48
[Solved] Broken picture URL
- Robert
- Topic Author
- Offline
- Senior Member
-
Less
More
13 years 10 months ago - 13 years 10 months ago #1
by Robert
[Solved] Broken picture URL was created by Robert
Joomdle 0.81, Joomla 2.5.4, Moodle 2.2.2, JomSocial 2.6.0
On the JomSocial recent activities wall I get a picture not found from a course, which has been uploaded in Moodle.
The broken URL looks like this on the wall ( iuphar.us/index.php/myiuphar ) :
iuphar.us/@@PLUGINFILE@@/StorkIsland.jpg
While it should be like that:
iuphar.us/moodle//auth/joomdle/pluginfil...mary/StorkIsland.jpg
Where does @@PLUGINFILE@@ come from, I wonder ?
Any ideas ?
On the JomSocial recent activities wall I get a picture not found from a course, which has been uploaded in Moodle.
The broken URL looks like this on the wall ( iuphar.us/index.php/myiuphar ) :
iuphar.us/@@PLUGINFILE@@/StorkIsland.jpg
While it should be like that:
iuphar.us/moodle//auth/joomdle/pluginfil...mary/StorkIsland.jpg
Where does @@PLUGINFILE@@ come from, I wonder ?
Any ideas ?
Last edit: 13 years 10 months ago by Chris.
Please Log in or Create an account to join the conversation.
- Antonio Durán
-
- Offline
- Moderator
-
Less
More
- Posts: 7902
13 years 10 months ago #2
by Antonio Durán
Replied by Antonio Durán on topic Re: Broken picture URL
Thanks for the bug report. I fixed it for next release.
In the meantime, if you want to fix it you only need to add this code:
to moodle/auth/joomdle/auth.php, function joomdle_course_created (), before the call to create the activity:
In the meantime, if you want to fix it you only need to add this code:
Code:
$context = get_context_instance(CONTEXT_COURSE, $course->id);
$course->summary = file_rewrite_pluginfile_urls ($course->summary, 'pluginfile.php', $context->id, 'course', 'summary', NULL);
$course->summary = str_replace ('pluginfile.php', '/auth/joomdle/pluginfile_joomdle.php', $course->summary);
to moodle/auth/joomdle/auth.php, function joomdle_course_created (), before the call to create the activity:
Code:
if ($activities)
auth_plugin_joomdle::call_method ('addActivityCourse', (int) $course->id, $course->fullname, $course->summary, (int) $course->category, $cat->name);
Please Log in or Create an account to join the conversation.
- Robert
- Topic Author
- Offline
- Senior Member
-
Less
More
- Posts: 48
13 years 10 months ago #3
by Robert
Replied by Robert on topic Re: Broken picture URL
Thanks a lot, works like a charm now!
Have a presentation to give this week-end and will be happy to donate again after all is up and running. Joomdle is awesome work!!
Have a presentation to give this week-end and will be happy to donate again after all is up and running. Joomdle is awesome work!!
Please Log in or Create an account to join the conversation.
- Antonio Durán
-
- Offline
- Moderator
-
Less
More
- Posts: 7902
13 years 10 months ago #4
by Antonio Durán
Replied by Antonio Durán on topic Re: Broken picture URL
Thanks for the feedback!
Please Log in or Create an account to join the conversation.
- Fadi
- Offline
- New Member
-
Less
More
- Posts: 3
13 years 4 months ago #5
by Fadi
Replied by Fadi on topic Re: Broken picture URL
Hello,
I am facing the same issue and the fix you describe already exists on my version of joomdle. please help me fix this
Joomla! 2.5.8
Moodle 2.3.2 (Build: 20120910)
Joomdle: 0.82
I am facing the same issue and the fix you describe already exists on my version of joomdle. please help me fix this
Joomla! 2.5.8
Moodle 2.3.2 (Build: 20120910)
Joomdle: 0.82
Please Log in or Create an account to join the conversation.
- Antonio Durán
-
- Offline
- Moderator
-
Less
More
- Posts: 7902
13 years 4 months ago #6
by Antonio Durán
Replied by Antonio Durán on topic Re: Broken picture URL
Strange, if the code is there it should work fine.
What is the url you get?
What is the url you get?
Please Log in or Create an account to join the conversation.
- Fadi
- Offline
- New Member
-
Less
More
- Posts: 3
13 years 4 months ago #7
by Fadi
Replied by Fadi on topic Re: Broken picture URL
it looks like this:
schoolonline.albonyan.com/website/@@PLUGINFILE@@/GST39757.jpg
schoolonline.albonyan.com/website/@@PLUGINFILE@@/67.jpg
please help me fix it
schoolonline.albonyan.com/website/@@PLUGINFILE@@/GST39757.jpg
schoolonline.albonyan.com/website/@@PLUGINFILE@@/67.jpg
please help me fix it
Please Log in or Create an account to join the conversation.
- Emiliano
- Offline
- New Member
-
Less
More
- Posts: 1
13 years 4 months ago #8
by Emiliano
Replied by Emiliano on topic Re: Broken picture URL
Hi all, I'm new into this forum, Antonio nice to meet you 
I've noticed that the broken urls problem is during moodle categories navigation too, this as appears to joomla frontend
I tried to link the page "Course Categories" (joomdle) into the joomla top menu, and same problem of broken url occours (image missing)
I tried to fixed it into auth.php script of the joomdle plugin into moodle .../moodle/auth/joomdle/auth.php, function get_course_categories
code added
after
as Antonio indicates in his previous posts
now, the cats navigation works fine for me
I've noticed that the broken urls problem is during moodle categories navigation too, this as appears to joomla frontend
I tried to link the page "Course Categories" (joomdle) into the joomla top menu, and same problem of broken url occours (image missing)
I tried to fixed it into auth.php script of the joomdle plugin into moodle .../moodle/auth/joomdle/auth.php, function get_course_categories
code added
Code:
$context = get_context_instance(CONTEXT_COURSECAT, $c['id']);
$c['description'] = file_rewrite_pluginfile_urls ($c['description'], 'pluginfile.php', $context->id, 'coursecat', 'description', NULL);
$c['description'] = str_replace ('pluginfile.php', '/auth/joomdle/pluginfile_joomdle.php', $c['description']);
after
Code:
foreach ($records as $cat)
{
$c = get_object_vars ($cat);
as Antonio indicates in his previous posts
now, the cats navigation works fine for me
Please Log in or Create an account to join the conversation.
- Fadi
- Offline
- New Member
-
Less
More
- Posts: 3
13 years 4 months ago #9
by Fadi
Replied by Fadi on topic Re: Broken picture URL
I am still having this issue, please help me fix it.
Please Log in or Create an account to join the conversation.
- Antonio Durán
-
- Offline
- Moderator
-
Less
More
- Posts: 7902
13 years 4 months ago #10
by Antonio Durán
Replied by Antonio Durán on topic Re: Broken picture URL
Hi Emiliano. Thanks for the bug report and the patch. I will include it for next release.
Fadi: I don't know why this won't work for you, as it is working fine for me and others.
When you create a new activity, you get the wrong link too? Or only with old ones?
Fadi: I don't know why this won't work for you, as it is working fine for me and others.
When you create a new activity, you get the wrong link too? Or only with old ones?
Please Log in or Create an account to join the conversation.