|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.activemath.webapp.user.User
public class User
Represents an ActiveMath user. Facade to many user centric functions.
User is tied to the request scope and available as $user in the view.
| Variable | Description |
|---|---|
$user.Id | Unique user id |
$user.Name | Informal name of this user. |
$user.Group | Current group context of this user, see UserGroup). |
$user.isInGroup(groupId) | Say if this user is member of UserGroup groupId. |
$user.PotentialGroups | List of groups this user is allowed to join, see UserGroup). |
$user.PotentialGroupIds | List of group ids this user is allowed to join, see UserGroup). |
$user.Skin | Name of Skin to use for this user (may depend on group). Empty if no skin. |
| User Roles | |
$user.isAnon() | Say if this is an anonymous user (AnonUser). |
$user.isVisitor() | Say if this is user has UserRole visitor. |
$user.isLearner() | Say if this is user has UserRole learner (default role if logged in). |
$user.isAuthor() | Say if this is user has UserRole author . |
$user.isTutor() | Say if this is user has UserRole tutor . |
$user.isAdmin() | Say if this is user has UserRole admin . |
$user.Roles | Complete UserRoleSet of this user. |
| Access to data objects | |
$user.Books | List of personal books (UserBooks) attached to this user. |
$user.getBook(bookId | Returns a (possible personalized) instance of a book (UserBook or RecBook) for this user. Beware: this bypasses group config. |
$user.ExperimentalProgress | see ExperimentalProgress |
$user.LearnerModelName | Name of the current LearnerModelInterface. |
$user.PendingTests | List of compulsory tests this user has not completed yet (test ids). |
$user.hasPendingTests | True of there are pending tests. |
$user.UserData | Complete UserData. For direct access to properties, see below. |
| Access to user data | |
$user.CompetencyLevel | CompetencyLevel of this user. |
$user.Country | |
$user.Email | |
$user.Field | Field of this user. |
$user.FullName | Full name of this user. |
$user.Language | Language of this user. |
$user.LearningContext | LearningContext of this user. |
$user.MediaCompetency | |
$user.Name | Informal name of this user. |
$user.OutputFormat | Preferred output format ("html", "mathml"). See AppContext.getAvailableFormats(), Formatter. |
$user.ReadingSkill | |
$user.isFeedbackOn() | Say if content feedback is enable for this user. |
$user.isInputEditorOn() | Say if input editor is enable for this user. |
| Constructor Summary | |
|---|---|
User()
|
|
User(String id)
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public User()
public User(String id)
| Method Detail |
|---|
public String toString()
toString in class Objectpublic void setLearnerModel(String newLmName)
newLmName - -public LearnerModelInterface setLearnerModel(LearnerModelInterface newLm)
public LearnerModelInterface getLearnerModelInterface()
public boolean isInGroup()
public String getLearnerModel()
public String getLearnerModelName()
public String getId()
public String getOriginalId()
public String getName()
public void setName(String name)
public UserData getUserData()
public void setUserData2(UserData userData)
public ExperimentalProgress getExperimentalProgress()
public void resetExperimentalProgress()
public List<String> getPendingTests()
public boolean hasPendingTests()
public void resetBookStates()
public String getFullName()
public void setFullName(String fullName)
public String getEmail()
public void setEmail(String email)
public String getCountry()
public void setCountry(String country)
public String getGroupId()
public UserGroup getGroup()
public void setGroupId(String newGroupId)
public List<String> getTutorGroups()
public Set<UserGroup> getPotentialGroups()
public SortedSet<String> getPotentialGroupIds()
public boolean mayJoinGroup(String groupId)
groupId refers to the default group (UserGroupDefault), or
groupId is contained in potentialGroups, or
groupId 's parents is contained in potentialGroups
public void setPotentialGroups(List<String> groupIds)
public void setPotentialGroups(Set<String> groupIds)
UserGroupDefault will be
set as current group.
public void addPotentialGroup(String groupId)
public void addPotentialGroups(String[] groupIds)
public void removePotentialGroup(String groupId)
public void removePotentialGroups(String[] groupIds)
public UserRoleSet getRoles()
public void setRoles(UserRoleSet userRoles)
public String getStereotype()
public void setStereotype(String stereotype)
public Field getField()
public void setField(Field field)
public void setField(String name)
public String getEducationalLevel()
public void setEducationalLevel(String value)
public LearningContext getLearningContext()
public void setLearningContext(LearningContext learningContext)
public void setLearningContext(String name)
public String getMediaCompetency()
public void setMediaCompetency(String mediaCompetency)
public String getLanguage()
public void setLanguage(String value)
public String getSkin()
public void setSkin(String value)
public String getOutputFormat()
public void setOutputFormat(String value)
public Collection<String> getTargetCompetencies()
public List<Book> getBooks()
public Book getBook(String bookId)
public void removeBook(String bookId)
public void addBook(Book book)
public void addBookState(BookState state)
public BookState getBookState(String bookId)
null if bookId is null.public Map<String,BookState> getBookStates()
public void removeBookState(String bookStateId)
public BookStat calculateBookStat(String bookId)
bookId -
public void calculateBookStats()
public Map<String,BookStat> getBookStats()
public void removeBookStat(String id)
public void addBookStat(BookStat stat)
public BookStat getBookStat(String bookId)
null if bookId is null.
public CompetencyLevel getCompetencyLevel(String userId,
String contentId,
Competency competency)
public CompetencyLevel getCompetencyLevel(String userId,
String contentId)
public CompetencyLevel getCompetencyLevel(String contentId,
Competency competency)
public CompetencyLevel getCompetencyLevel(String contentId)
public int getMastery(String itemId)
public int[] getMasteries(List itemIds)
public List<Bookmark> getBookmarks()
public void attachObject(String key,
Object o)
key - object keyo - object to share (null to unshare object)public Object detachObject(String key)
key -
public void attachPersistentObject(String key,
String value)
UserData.
key - object keyo - object to share (null to unshare object)public void detachPersistentObject(String key)
public Object attachedObject(String key)
public boolean isFeedbackOn()
public void setFeedback(boolean b)
public void setSpeechOutput(boolean value)
public boolean isSpeechOutputOn()
public void setInputEditor(boolean value)
public boolean isInputEditorOn()
public String getReadingSkill()
public void setReadingSkill(String value)
public boolean isAnon()
public boolean isVisitor()
public boolean isLearner()
public boolean isAuthor()
public boolean isTutor()
public boolean isAdmin()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||