Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Show adduser only when adding new user from moodle is posible.

  • Loading branch information...
commit 3399a22c9fbfea8723d2f97bbac11dbac95d5374 1 parent 4dd0497
authored April 25, 2003
6  admin/index.php
@@ -339,8 +339,10 @@
339 339
                          "<P><A HREF=\"../course/teacher.php\">".get_string("assignteachers")."</A></P>".
340 340
                          "<P><A HREF=\"../course/delete.php\">".get_string("deletecourse")."</A></P>".
341 341
                          "<P><A HREF=\"../course/categories.php\">".get_string("categories")."</A></P>";
342  
-		$table->data[0][2] = "<P><A HREF=\"user.php?newuser=true\">".get_string("addnewuser")."</A></P>".
343  
-                         "<P><A HREF=\"user.php\">".get_string("edituser")."</A></P>".
  342
+        if($CFG->auth == "email" || $CFG->auth == "none" || $CFG->auth == "manual"){
  343
+		    $table->data[0][2] = "<P><A HREF=\"user.php?newuser=true\">".get_string("addnewuser")."</A></P>";
  344
+        }    
  345
+        $table->data[0][2] .=  "<P><A HREF=\"user.php\">".get_string("edituser")."</A></P>".
344 346
                          "<P><A HREF=\"admin.php\">".get_string("assignadmins")."</A></P>".
345 347
                          "<P><A HREF=\"creators.php\">".get_string("assigncreators")."</A></P>".
346 348
                          "<P><A HREF=\"auth.php\">".get_string("authentication")."</A></P>";
6  course/lib.php
@@ -669,8 +669,10 @@ function print_admin_links ($siteid, $width=180) {
669 669
 		$modicon[]=$icon;
670 670
 		$moddata[]="<HR>";
671 671
 		$modicon[]="";
672  
-		$moddata[]="<A HREF=\"$CFG->wwwroot/$CFG->admin/user.php?newuser=true\">".get_string("addnewuser")."</A>";
673  
-		$modicon[]=$icon;
  672
+        if($CFG->auth == "email" || $CFG->auth == "none" || $CFG->auth == "manual"){
  673
+		    $moddata[]="<A HREF=\"$CFG->wwwroot/$CFG->admin/user.php?newuser=true\">".get_string("addnewuser")."</A>";
  674
+		    $modicon[]=$icon;
  675
+        }
674 676
 		$moddata[]="<A HREF=\"$CFG->wwwroot/$CFG->admin/user.php\">".get_string("edituser")."</A>";
675 677
 		$modicon[]=$icon;
676 678
 		$moddata[]="<A HREF=\"$CFG->wwwroot/$CFG->admin/admin.php\">".get_string("assignadmins")."</A>";

0 notes on commit 3399a22

Please sign in to comment.
Something went wrong with that request. Please try again.