View Directory Resource

View Directory Resource

by Greg Milsted -
Number of replies: 9

Hi people,

In editing mode if I click on add a resource, then choose add a directory, when the page loads I can't seem to choose a directory as I have before.

No selection box?

The drop down box doesn't appear thats meant to show the directories I can choose? - no errors in my httpd error log, no javascript errors, it just doesn't feature in the page?

If I click update, then the resource that's created (it does create fine!) only shows me the view of the whole directory as default?

http://moodle-greg.lboro.ac.uk/course/view.php?id=3

Click on the 'When Created the View Directory shows all files' to see the only view possible to me due to the lack of drop down box!

Average of ratings: -
In reply to Greg Milsted

Re: View Directory Resource

by Mauno Korpelainen -

Hi Greg,

I am 99% sure that you have an empty row at the end of your config.php after last signs ?>

In reply to Mauno Korpelainen

Re: View Directory Resource

by Greg Milsted -

I've checked the config.php file and there isn't an empty line unfortunately, I was hoping that would be the case.

The version I'm using is the latest version 1.8+, the 'Display a Directory' drop down box has appeared before in version 1.6.

I'm not sure as to why the drop down box wouldn't be drawn when the page compiles?  I've seen other people with a bug in this feature (Display a Directory) but it refers to a requested directory not existing and not the fact the Display a Directory drop down box doesn't appear at all. (http://moodle.org/mod/forum/discuss.php?d=69932#313612)

I have recently moved file structures for the data from /raid/moodledata to /var/www/data/moodledata.  Could this be an issue?

I'm not sure actually because the site I've supplied in this example is a new install the problem I'm having is the same on a seperate site, same version, but upgraded from 1.6.

In reply to Greg Milsted

Re: View Directory Resource

by Greg Milsted -

I'm using the git repository from here:

cg-clone http://git.catalyst.net.nz/git/moodle-r2.git#MOODLE_18_STABLE

Noted in http://moodle.org/mod/forum/discuss.php?d=66412#298980

If anyone could offer any assistance that would be great, Iñaki or Martín can you help?

In reply to Greg Milsted

Re: View Directory Resource

by Iñaki Arenaza -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Ooops! This is really strange. I have a test site using that same git repository as the source and have the exact same issue (didn't know before you mentionned it).

And then I have a production site running the same 1.8+ version (or so version.php says) downloaded from moodle.org, which doesn't exhibit that problem thoughtful

I'll have a look at it tomorrow (it's 2 AM here, and it's been a loooong day wink

Edit: Houston, we have a problem!. The MOODLE_18_STABLE branch on the Catalyst git repo and the CVS branch on sf.net differ!! See here:

http://moodle.cvs.sourceforge.net/moodle/moodle/mod/resource/type/directory/resource.class.php?view=log&pathrev=MOODLE_18_STABLE

and here:

http://git.catalyst.net.nz/gitweb?p=moodle-r2.git;a=tree;h=ae21b7246894d08401adfe0d5dd7aa658704c01a;hb=MOODLE_18_STABLE;f=mod/resource/type/directory

Martin L., if you are lurking around, this a call for you!

Saludos. Iñaki.
In reply to Iñaki Arenaza

Re: View Directory Resource & git import

by Martín Langhoff -
Thanks for letting me know! I am writing a script to check for these problems. From what I see, git has failed to notice a few file deletions on the 18_STABLE branch. Ouch.

In reply to Martín Langhoff

Re: View Directory Resource & git import

by Greg Milsted -

Hi Martin,

Have you implemented the fix script?

I've updated from the git repository but the display directory drop down box is still missing?

Regards,

Greg

In reply to Martín Langhoff

Re: View Directory Resource & git import

by Martín Langhoff -
I fixed this a week ago -- just after I posted above. If you go to http://git.catalyst.net.nz/gitweb?p=moodle-r2.git;a=shortlog;h=MOODLE_18_STABLE
and follow the "tree" link down to the mod/resource/type/directory directory, you'll see only the resource.class file.