]> git.mjollnir.org Git - moodle.git/commitdiff
Undoing the "login as student" link that chooses a student at random.
authormoodler <moodler>
Mon, 27 Dec 2004 02:29:46 +0000 (02:29 +0000)
committermoodler <moodler>
Mon, 27 Dec 2004 02:29:46 +0000 (02:29 +0000)
blocks/admin/block_admin.php

index 069e5d28d1f481a10569e3a723d6335d0c2adb1a..cb9747cde2cbd3443873d58d2ae113474f085efd 100644 (file)
@@ -90,16 +90,6 @@ class block_admin extends block_base {
                     $this->content->items[]='<a href="view.php?id='.$this->instance->pageid.'&amp;edit=on">'.get_string('turneditingon').'</a>';
                 }
                 
-                if (!$course->student) {
-                    $course->student = get_string('defaultcoursestudent');
-                }
-                
-                if (!isset($USER->realuser) and 
-                        $student = get_field_sql('SELECT userid FROM '.$CFG->prefix.'user_students WHERE course = '.$course->id.' LIMIT 1')) {
-                    $this->content->icons[]='<img src="'.$CFG->pixpath.'/i/user.gif" height="16" width="16" alt="" />';
-                    $this->content->items[]='<a href="loginas.php?id='.$course->id.'&amp;user='.$student.'">'.get_string('loginas').' '.$course->student.'</a>';
-                }
-                
                 $this->content->items[]='<a href="edit.php?id='.$this->instance->pageid.'">'.get_string('settings').'...</a>';
                 $this->content->icons[]='<img src="'.$CFG->pixpath.'/i/settings.gif" height="16" width="16" alt="" />';