Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

  • Loading branch information...
commit 3399a22c9fbfea8723d2f97bbac11dbac95d5374 1 parent 4dd0497
paca70 authored
Showing with 8 additions and 4 deletions.
  1. +4 −2 admin/index.php
  2. +4 −2 course/lib.php
View
6 admin/index.php
@@ -339,8 +339,10 @@
"<P><A HREF=\"../course/teacher.php\">".get_string("assignteachers")."</A></P>".
"<P><A HREF=\"../course/delete.php\">".get_string("deletecourse")."</A></P>".
"<P><A HREF=\"../course/categories.php\">".get_string("categories")."</A></P>";
- $table->data[0][2] = "<P><A HREF=\"user.php?newuser=true\">".get_string("addnewuser")."</A></P>".
- "<P><A HREF=\"user.php\">".get_string("edituser")."</A></P>".
+ if($CFG->auth == "email" || $CFG->auth == "none" || $CFG->auth == "manual"){
+ $table->data[0][2] = "<P><A HREF=\"user.php?newuser=true\">".get_string("addnewuser")."</A></P>";
+ }
+ $table->data[0][2] .= "<P><A HREF=\"user.php\">".get_string("edituser")."</A></P>".
"<P><A HREF=\"admin.php\">".get_string("assignadmins")."</A></P>".
"<P><A HREF=\"creators.php\">".get_string("assigncreators")."</A></P>".
"<P><A HREF=\"auth.php\">".get_string("authentication")."</A></P>";
View
6 course/lib.php
@@ -669,8 +669,10 @@ function print_admin_links ($siteid, $width=180) {
$modicon[]=$icon;
$moddata[]="<HR>";
$modicon[]="";
- $moddata[]="<A HREF=\"$CFG->wwwroot/$CFG->admin/user.php?newuser=true\">".get_string("addnewuser")."</A>";
- $modicon[]=$icon;
+ if($CFG->auth == "email" || $CFG->auth == "none" || $CFG->auth == "manual"){
+ $moddata[]="<A HREF=\"$CFG->wwwroot/$CFG->admin/user.php?newuser=true\">".get_string("addnewuser")."</A>";
+ $modicon[]=$icon;
+ }
$moddata[]="<A HREF=\"$CFG->wwwroot/$CFG->admin/user.php\">".get_string("edituser")."</A>";
$modicon[]=$icon;
$moddata[]="<A HREF=\"$CFG->wwwroot/$CFG->admin/admin.php\">".get_string("assignadmins")."</A>";

0 comments on commit 3399a22

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