Exemplo n.º 1
0
 public static function editStudentProfile()
 {
     self::requireLogin();
     global $params;
     $studentId = $_SESSION['_id'];
     if (isset($params['profile'])) {
         // Save the profile.
         extract($params);
         StudentProfile::createOrUpdate($studentId, $profile);
         return;
     }
     $profile = toJSON(self::getStudentProfile($studentId));
     self::render('jobs/student/editprofile', ['profile' => $profile]);
 }