Forum LAMS for Tech-Heads - General Forum: Re: Re: Re: LAMS 2.0 - Share Resources - Add Single File


 
Search: 

7: Re: Re: Re: LAMS 2.0 - Share Resources - Add Single File
In response to 5 02/01/07 05:36 PM
[ Reply | Forward ]
Which client do I use? Well, I use a number of clients, but that particular bit of code was written in DBManager (http://www.dbtools.com.br/).

Sorry about the problem with the aliases. Our scripts get run in the mysql command line client normally to make sure that they are okay with a client that everyone uses. But I just threw that code together last night and forgot to run it in mysql command line client.

Fiona

Posted by Fiona Malikoff

8: Re: Re: Re: Re: LAMS 2.0 - Share Resources - Add Single File
In response to 7 02/02/07 04:29 AM
[ Reply | Forward ]
I've tracked down the problem and it is a bug.

The problem isn't related to the group - it is related to the privileges of the user. It will only show up for a user that has only the LEARNER privilege in all groups - give the user a different role in another group and it won't happen.

I have raised the problem as https://bugs.lamsfoundation.org/browse/LDEV-1136, and it will be fixed in the LAMS 2.0.1 release.

This is the fix, should you care to do it manually. You need to be familiar with the format of Java's .jar and .war files  to try this - if you get it wrong LAMS won't start.

* Shutdown LAMS / JBOSS.
* Go to the lams.ear directory in jboss.
* Copy the lams-tool-larsrc11.war to somewhere else as a backup, in case you don't make the change correctly and need to rollback the change.
* Unzip lams-tool-larsrc11.war to a temporary directory.
* Edit the file WEB-INF\web.xml.
* Find the entry for "Download Files" and change it to this:
    <security-constraint>
          <web-resource-collection>
            <web-resource-name>Download Files</web-resource-name>
            <url-pattern>/download/</url-pattern>
        </web-resource-collection>
        <auth-constraint>
            <role-name>LEARNER</role-name>
            <role-name>AUTHOR</role-name>
            <role-name>MONITOR</role-name>
            <role-name>TEACHER</role-name>
            <role-name>ADMIN</role-name>
            <role-name>SYSADMIN</role-name>
            <role-name>AUTHOR ADMIN</role-name>
        </auth-constraint>
    </security-constraint>

You will need to add the line <role-name>LEARNER</role-name>

* Rezip up the directory, calling it lams-tool-larsrc11.war. Make sure you don't accidently get an extra folder in the lams-tool-larsrc11.war file - that will cause an error when JBOSS starts up.
* Start JBOSS/LAMS. The problem should now be fixed.

Fiona

Posted by Fiona Malikoff

10: Re: Re: Re: Re: Re: LAMS 2.0 - Share Resources - Add Single File
In response to 8 02/02/07 08:05 AM
[ Reply | Forward ]
Hi Fiona,

Okay, I did this and it now works fine. Thanks very much for the help.

I did actually mess up a couple of times trying to work out how Windows actually zips things. This caused the Share Resources tool to not work at all obviously. I had to restart LAMS a couple of times or three...

(I foolishly couldn't zip a bunch of files without putting them in a containing folder, so in the end I reverted to my Mac safety harness...)

I should have my own separate forum. I don't really belong in Tech-heads. Haha.

Cheers,

Kris

Posted by Kristian Besley

Reply to first post on this page
Back to LAMS for Tech-Heads - General Forum