OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Serious Problem at "Enroll Users"

OJS development discussion, enhancement requests, third-party patches and plug-ins.

Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher

Forum rules
The Public Knowledge Project Support Forum is moving to http://forum.pkp.sfu.ca

This forum will be maintained permanently as an archived historical resource, but all new questions should be added to the new forum. Questions will no longer be monitored on this old forum after March 30, 2015.

Serious Problem at "Enroll Users"

Postby svillanueva » Tue Mar 25, 2008 5:05 am

Hello,

I've found out that when I login as a Journal Manager and I go to the Enroll Users list, I get the correct list. But when I click in any of the users, I go to the same user profile... Actually it happens always when I search any user, for instance, as a Editor when assigning a Section Editor, I get the list of SE's but when I click in any of them I go always to the same user profile ! Very strange...


Need help!

Thanks!!!

Sergi Villanueva.
svillanueva
 
Posts: 74
Joined: Fri Jan 18, 2008 4:20 am
Location: Barcelona

Re: Serious Problem at "Enroll Users"

Postby jmacgreg » Tue Mar 25, 2008 9:53 am

Hi Sergi,

I'm afraid I don't quite follow -- do you mean that, when you look at someone's profile from a non-Journal Manager role, you are always viewing the same profile, no matter what? Which profile are you viewing, and what are they enrolled as?

Thanks,
James
jmacgreg
 
Posts: 4191
Joined: Tue Feb 14, 2006 10:50 am

Re: Serious Problem at "Enroll Users"

Postby svillanueva » Wed Mar 26, 2008 5:11 am

Hi James,

Now I know where is the problem, I'll try to explain it better. Yesterday's post is not very clear, i'm sorry :oops:

In header.tpl I have written code that shows the masthead membership:

Code: Select all
{foreach from=$groups item=group}
   <b>{$group->getGroupTitle()}</b>
   {assign var=groupId value=$group->getGroupId()}
   {assign var=members value=$teamInfo[$groupId]}
   <br>
   {foreach from=$members item=member}
      {assign var=user value=$member->getUser()}
      <a href="javascript:openRTWindow('{url op="../about/editorialTeamBio" path=$user->getUserId()}')">
      {$user->getFullName()|escape}</a><br>
      {if $user->getAffiliation()}<i>&nbsp;&nbsp;{$user->getAffiliation()|escape}</i><br><br>{/if}
   {/foreach}
{/foreach}


To do that I've modified the classes/template/TemplateManager.inc.php and added the necessary variables in the constructor and the function editorialTeamBio($args).

Now, the problem I have is that in userProfile.tpl from templates/manager/people/ or templates/sectionEditor, I firstly include header.tpl and after this "calling" the variable $user is not the right one but it's always the same user, which is the last user that is found on the header-code foreach's.

I've fixed this adding the following code to the header.tpl:

Code: Select all
<!-- Save user -->
{if $user}
   {assign var="usuari" value=$user}   
{/if}

(...) -> foreach's code

<!--Retrieve user-->
{if $usuari}
   {assign var=user value=$usuari}
{/if}


But I guess this is not the best way. Is there a way to avoid this saving/retrieving user code, please??

Another problem I have found related to this, is that the header.tpl code for showing the masthead membership is always working except when in Mashtead section of the Management Pages. There, the page stalls on that header.tpl code, getting this error on the Apache's Log:

PHP Fatal error: Call to undefined method GroupDAO::getGroupTitle() in /var/www/htdocs/ojs-2.2/cache/t_compile/%%32^32D^32D13D85%%header.tpl.php on line 163, referer: http://...



Thanks again,

Sergi Villanueva.
svillanueva
 
Posts: 74
Joined: Fri Jan 18, 2008 4:20 am
Location: Barcelona

Re: Serious Problem at "Enroll Users"

Postby jmacgreg » Wed Mar 26, 2008 7:44 am

Hi Sergi,

I moved this discussion to the Development forum as I think it's more regarding modifications to the codebase than support for processes we've designed. Thanks for the explanation of what's going on; we'll take a look and get back to you with suggestions if we have any.

Cheers,
James
jmacgreg
 
Posts: 4191
Joined: Tue Feb 14, 2006 10:50 am

Re: Serious Problem at "Enroll Users"

Postby svillanueva » Thu Mar 27, 2008 1:57 am

Thanks James, I'd appreciate that!


Regards,

Sergi Villanueva.
svillanueva
 
Posts: 74
Joined: Fri Jan 18, 2008 4:20 am
Location: Barcelona


Return to OJS Development

Who is online

Users browsing this forum: No registered users and 1 guest

cron