Diff for /loncom/interface/loncreateuser.pm between versions 1.104 and 1.107

version 1.104, 2005/06/17 21:04:40 version 1.107, 2005/06/23 21:59:13
Line 108  sub my_custom_roles { Line 108  sub my_custom_roles {
   
 sub authorpriv {  sub authorpriv {
     my ($auname,$audom)=@_;      my ($auname,$audom)=@_;
     unless (&Apache::lonnet::allowed('cca',$audom.'/'.$auname)) { return ''; }      unless ((&Apache::lonnet::allowed('cca',$audom.'/'.$auname))
            || (&Apache::lonnet::allowed('caa',$audom.'/'.$auname))) { return ''; }
     return 1;      return 1;
 }  }
   
Line 155  $lt{'dom'}:</td><td>$domform</td></tr> Line 156  $lt{'dom'}:</td><td>$domform</td></tr>
 </table>  </table>
 <input name="userrole" type="submit" value="$lt{usrr}" />  <input name="userrole" type="submit" value="$lt{usrr}" />
 </form>  </form>
   ENDDOCUMENT
      if (&Apache::lonnet::allowed('mcr','/')) {
          $r->print(<<ENDCUSTOM);
 <form action="/adm/createuser" method="post" name="docustom">  <form action="/adm/createuser" method="post" name="docustom">
 <input type="hidden" name="phase" value="selected_custom_edit">  <input type="hidden" name="phase" value="selected_custom_edit">
 <h2>$lt{'ecrp'}$helpecpr</h2>  <h2>$lt{'ecrp'}$helpecpr</h2>
 $lt{'nr'}: $choice <input type="text" size="15" name="newrolename" /><br />  $lt{'nr'}: $choice <input type="text" size="15" name="newrolename" /><br />
 <input name="customeditor" type="submit" value="$lt{'cre'}" />  <input name="customeditor" type="submit" value="$lt{'cre'}" />
 </body>  </form>
 </html>  ENDCUSTOM
 ENDDOCUMENT      }
       $r->print('</body></html>');
 }  }
   
 # =================================================================== Phase two  # =================================================================== Phase two
Line 571  END Line 576  END
        $class='Domain';         $class='Domain';
    }     }
                }                 }
                if ($role_code eq 'ca') {                 if (($role_code eq 'ca') || ($role_code eq 'aa')) {
                    $area=~/\/(\w+)\/(\w+)/;                     $area=~/\/(\w+)\/(\w+)/;
    if (&authorpriv($2,$1)) {     if (&authorpriv($2,$1)) {
        $allowed=1;         $allowed=1;
Line 775  ENDOTHERAUTHS Line 780  ENDOTHERAUTHS
                     'sta'  => "Start",                      'sta'  => "Start",
                     'end'  => "End",                      'end'  => "End",
                     'cau'  => "Co-Author",                      'cau'  => "Co-Author",
                       'caa'  => "Assistant Co-Author",
                     'ssd'  => "Set Start Date",                      'ssd'  => "Set Start Date",
                     'sed'  => "Set End Date"                      'sed'  => "Set End Date"
        );         );
Line 793  ENDOTHERAUTHS Line 799  ENDOTHERAUTHS
 <a href=  <a href=
 "javascript:pjump('date_end','End Date Co-Author',document.cu.end_$cudom\_$cuname\_ca.value,'end_$cudom\_$cuname\_ca','cu.pres','dateset')">$lt{'sed'}</a></td>  "javascript:pjump('date_end','End Date Co-Author',document.cu.end_$cudom\_$cuname\_ca.value,'end_$cudom\_$cuname\_ca','cu.pres','dateset')">$lt{'sed'}</a></td>
 </tr>  </tr>
   <tr>
   <td><input type=checkbox name="act_$cudom\_$cuname\_aa" /></td>
   <td>$lt{'caa'}</td>
   <td>$cudom\_$cuname</td>
   <td><input type=hidden name="start_$cudom\_$cuname\_aa" value='' />
   <a href=
   "javascript:pjump('date_start','Start Date Assistant Co-Author',document.cu.start_$cudom\_$cuname\_aa.value,'start_$cudom\_$cuname\_aa','cu.pres','dateset')">$lt{'ssd'}</a></td>
   <td><input type=hidden name="end_$cudom\_$cuname\_aa" value='' />
   <a href=
   "javascript:pjump('date_end','End Date Assistant Co-Author',document.cu.end_$cudom\_$cuname\_aa.value,'end_$cudom\_$cuname\_aa','cu.pres','dateset')">$lt{'sed'}</a></td>
   </tr>
 </table>  </table>
 ENDCOAUTH  ENDCOAUTH
     }      }

Removed from v.1.104  
changed lines
  Added in v.1.107


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>