Issue Details (XML | Word | Printable)

Key: MDL-10036
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Eloy Lafuente (stronk7)
Reporter: James Ballard
Votes: 1
Watchers: 2
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Moodle

Browse repository button doesn't appear on IMS resource

Created: 06/Jun/07 09:06 PM   Updated: 26/Jun/08 05:01 PM
Component/s: IMS resource type
Affects Version/s: 1.8, 1.8.1
Fix Version/s: 1.8.2, 1.9

Issue Links:
Relates
 

Participants: Eloy Lafuente (stronk7), Helen Foster, James Ballard and Sean Keogh
Security Level: None
QA Assignee: Helen Foster
Resolved date: 03/Jul/07
Affected Branches: MOODLE_18_STABLE
Fixed Branches: MOODLE_18_STABLE, MOODLE_19_STABLE


 Description  « Hide
Setting $CFG->repositoryactivate = true; in the repository_config.php file does not display a "Browse repository" button in the mod form.

(Other reports here: http://moodle.org/mod/forum/discuss.php?d=31011#p320859)

 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Sean Keogh added a comment - 27/Jun/07 10:33 PM - edited
I have this problem on two live sites. One is a new 1.8.1+ install on a Linux server, and the other an upgrade to 1.8.1+ from a 1.6.3+ windows-based site that was previously working OK with IMS Content Packages repository..

This is pretty important to my clients.

Sean K


James Ballard added a comment - 28/Jun/07 10:00 PM - edited
This seems to be caused by move to

$mform->

for creating menus in the resource.class.php

There is no rule for addding the repository button in the setup_elements function. The previous ims.html form is redundant - you can delete it with no impact on what you see.

I used the following to create the button in the setup_elements function:

if ($CFG->repositoryactivate == true) { $repositorybutton = $mform->addElement('button', 'repositorybutton', get_string('browserepository', 'resource').'...'); $buttonattributes = array('title'=>get_string('browserepository', 'resource'), 'onclick'=>"return window.open('".$CFG->wwwroot."/mod/resource/type/ims/finder.php?directory=', 'websearch', 'menubar=1,location=1,directories=1,toolbar=1,scrollbars,resizable,width=800,height=600');"); $repositorybutton->updateAttributes($buttonattributes); }

which seems to work, except hitting choose in the finder does not return any information to the form.


Eloy Lafuente (stronk7) added a comment - 03/Jul/07 01:07 AM
Now the "Browse Repository" is back (both under 18_STABLE, and HEAD).

Should be available in next nightly build (or by direct CVS access).

Ciao


Eloy Lafuente (stronk7) added a comment - 03/Jul/07 01:12 AM
P.S.: Also, the unused ims.html file has been removed from >= 18_STABLE. Thanks James!

Helen Foster added a comment - 03/Jul/07 03:36 PM
Thanks Eloy, going to test it...

James Ballard added a comment - 03/Jul/07 05:24 PM
Thanks,

Working fine on my local test version - will push to live server soon and feedback, but can't see any reason for further issues.

I did notice that the previous version used to automatically fill in the resource title (and summary?), but doesn't do this anymore. Not sure if this is a desired feature or not.


Eloy Lafuente (stronk7) added a comment - 03/Jul/07 11:01 PM
Uhm... not sure if that's a desired feature. Perhaps, title or summary are empty, yes, but if they contain any info I wouldn't replace it.

Are you sure it was present in old releases? I've take a quick look and haven't been able to locate such code when choosing ims packages (both from the course area and from the repository).

And finally, I guess it's really complex to do under new formslib. I'll imply to create one highly specialised form element (only used by ims cp) to provide such functionality...

So, after all, I would vote -1 for that.

Ciao


James Ballard added a comment - 03/Jul/07 11:23 PM
It used to work in 1.6 version, but is far from essential. If you get some spare time for a super button go for it , but I'm sure there are higher priority developments to get stuck into.

Thanks
James