MantisBT

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0005761AContentImport/Exportpublic2017-02-23 19:012017-02-24 18:42
Reportergreg 
Assigned Togreg 
PrioritynormalSeveritymajorReproducibilityalways
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Version1.4 
Target Version1.4Fixed in Version1.4 
Summary0005761: Export from ATutor fails
DescriptionWhen in ATutor, and attempting to export to AContent, import fails on file_get_content(), returning a file not found error (below).

https://github.com/atutor/AContent/blob/master/home/ims/ims_import.php#L808 [^]

However, manually copying the output from $_REQUEST['url'], being passed to file_get_content() in this case, and pasting it into a browser, downloads the properly zipped common cartirdge.
Steps To ReproduceRequires an integrated ATutor with AContent Setup

Login to an ATutor course as its instructor.
Open a simple content page.
Turn on the Manage tools (slider button).
Click on Export Content in the Manage tabs.
In the Export Content area choose "Common Cartidge" and check Export content to the AContent repository, and press the Export button.
After being forwarded to AContent, enter your AContent author credentials and press Login.

You are then redirected back to ATutor where the error message appears.

AContent lesson import failed at:
No response from AContent. It might because the course is too big to be auto-imported into AContent, or unknown problems occurred. Please download the ATutor package and manually import into AContent. (AT_ERROR_TILE_IMPORT_FAIL)
 
Additional Information PHP Warning: file_get_contents(http://localhost/atutorgit/mods/_core/imscc/ims_export.php?cid=0&c=26&m=e1c4bd99ea3c662148b95df045ca447d [^]): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
 in /Applications/MAMP/htdocs/acontentgit/home/ims/ims_import.php on line 808
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0007539)
cindy (administrator)
2017-02-24 17:11

Hi Greg, I reproduce the same issue with local ATutor and AContent. The problem is as you said with using file_get_contents() to fetch contents from localhost.

I found this stackover thread helps a lot: http://stackoverflow.com/questions/9574130/file-get-contents-failed-to-open-stream-http-request-failed-http-1-1-404-not [^]

Once I replaced the usage of "localhost" on both ATutor and AChecker to "127.0.0.1", the import works. Better also test this with ATutor and AChecker demo sites that have proper domains to make sure the issue doesn't happen there.

Another PHP setting "allow_url_fopen" must be set to on to allow file_get_contents() to fetch from a url.
(0007540)
greg (administrator)
2017-02-24 18:42

Adjust sql for OAuth handling, there for years but stopped working.

- Issue History
Date Modified Username Field Change
2017-02-23 19:01 greg New Issue
2017-02-23 19:13 greg Steps to Reproduce Updated View Revisions
2017-02-23 19:13 greg Additional Information Updated View Revisions
2017-02-23 19:14 greg Description Updated View Revisions
2017-02-24 17:11 cindy Note Added: 0007539
2017-02-24 18:42 greg Note Added: 0007540
2017-02-24 18:42 greg Status new => resolved
2017-02-24 18:42 greg Fixed in Version => 1.4
2017-02-24 18:42 greg Resolution open => fixed
2017-02-24 18:42 greg Assigned To => greg


Copyright © 2000 - 2017 MantisBT Team
Powered by Mantis Bugtracker