kotkabeans
Class CourseInstance

java.lang.Object
  |
  +--kotkabeans.Course
        |
        +--kotkabeans.CourseInstance

public class CourseInstance
extends Course

implements EventGroup-object used manipulating courses eventgroups.


Field Summary
protected  double advancedPayment
           
protected  boolean attributesChanged
           
protected  boolean attributesSet
           
protected  java.lang.String calculatePointsID
           
protected  java.lang.String classTeachers
           
protected  double courseFee
           
protected  int courseInstanceID
           
protected  boolean courseInstanceIDChanged
           
protected  int courseInstanceSpecialStatusID
           
protected  boolean courseInstanceSpecialStatusIDChanged
           
protected  java.util.HashMap courseOption
           
static int CP_ID_ADMINISTRATOR
           
static int CP_ID_CANDIDATE
           
static int CP_ID_CLASS_TEACHER
           
static int CP_ID_EDITOR
           
static int CP_ID_EXAM_GRADER
           
static int CP_ID_EXAMINER
           
static int CP_ID_SECRETARY
           
static int CP_ID_STUDENT
           
static int CP_ID_TEACHER
           
static int CP_LEVEL_ADMINISTRATOR
           
static int CP_LEVEL_CANDIDATE
           
static int CP_LEVEL_CLASS_TEACHER
           
static int CP_LEVEL_EDITOR
           
static int CP_LEVEL_EXAM_GRADER
           
static int CP_LEVEL_EXAMINER
           
static int CP_LEVEL_SECRETARY
           
static int CP_LEVEL_STUDENT
           
static int CP_LEVEL_TEACHER
           
static int CP_STATUS_ACTIVE
           
static int CP_STATUS_FINISHED
           
static int CP_STATUS_OLD
           
static int CP_STATUS_REMOVED
           
protected  boolean deleted
           
protected  boolean deletedChanged
           
static int DESCRIPTION_MODE_FLOWED
           
static int DESCRIPTION_MODE_ROWS
           
static int DESCRIPTION_MODE_TABLE
           
static int DESCRIPTION_MODE_TABLE_ROWS
           
protected  java.util.ArrayList descriptions
           
protected  java.util.Calendar endDate
           
protected  boolean endDateChanged
           
protected  java.lang.String evaluationFunction
           
protected  java.util.Hashtable evaluationTable
           
protected  java.util.ArrayList eventGroups
           
protected  java.util.ArrayList fieldGroups
           
protected  java.util.ArrayList generalRaports
           
protected  java.util.ArrayList groupStatusList
           
protected  java.util.ArrayList groupTypeList
           
protected  int instalmentNum
           
protected  int languageID
           
protected  java.util.ArrayList lecturers
           
protected  boolean lecturersChanged
           
static int LEVEL_ALL
           
static int LEVEL_BASIC
           
static int LEVEL_COMPLEX
           
static int LEVEL_MEDIUM
           
static int LEVEL_NONE
           
static int LEVEL_SIMPLE
           
protected  int maxParticipants
           
protected  boolean maxParticipantsChanged
           
static int NO_RIGHTS
           
protected  boolean noRegisterUsingKorppi
           
protected  java.util.Hashtable organisationWeightsInQueuing
           
static int PARAM_TYPE_ADVANCE_PAYMENT
           
static int PARAM_TYPE_COURSE_FEE
           
static int PARAM_TYPE_INSTALMENT_NUM
           
static int PARAM_TYPE_MAX_PARTICIPANTS
           
static int PARAM_TYPE_NO_REG_USING_KORPPI
           
protected  java.util.ArrayList participants
           
static int QUEUING_METHOD_CREDITS
           
static int QUEUING_METHOD_FIRST_YEAR
           
static int QUEUING_METHOD_MAJOR_CREDITS
           
static int QUEUING_METHOD_ORGANISATION_PREFERENCE
           
static int QUEUING_METHOD_REG_TIME
           
protected  int queuingMethodID
           
protected  boolean queuingMethodIDChanged
           
protected  java.util.ArrayList raports
           
static int READ_RIGHT
           
static int READ_WRITE
           
protected  java.util.Calendar registrationBegin
           
protected  boolean registrationBeginChanged
           
protected  java.util.Calendar registrationDeadline
           
protected  boolean registrationDeadlineChanged
           
static int REGSTATUS_ACTIVE
           
static int REGSTATUS_CANNOT_REGISTER
           
static int REGSTATUS_FULL
           
static int REGSTATUS_NOT_ACTIVE
           
static int S_ACTIVE
           
static int S_ARCHIVED
           
static int S_NOT_READY
           
static int S_OLD
           
protected  java.util.ArrayList seasons
           
protected  java.lang.String shortDescription
           
protected  boolean shortDescriptionChanged
           
static int SS_EXAM
           
static int SS_NORMAL_COURSE
           
static int SS_ORG_EXAM
           
protected  java.util.Calendar startDate
           
protected  boolean startDateChanged
           
protected  int statusID
           
protected  boolean statusIDChanged
           
protected  java.lang.String teachers
           
protected  java.lang.String uri
           
protected  boolean uriChanged
           
static int WRITE_RIGHT
           
 
Fields inherited from class kotkabeans.Course
code, courseID, courseIDChanged, levelID, maxCredits, minCredits, name, organisationID
 
Constructor Summary
CourseInstance()
           
CourseInstance(int cid)
           
CourseInstance(int cid, int languageID)
           
CourseInstance(int cid, int languageID, int level)
           
 
Method Summary
static int addAllCourseParticipants(int cid, java.util.ArrayList parts, int userGroupID)
           
 int addCourseParticipant(int pid, int userGroupID)
           
static int addCourseParticipant(int courseID, int pid, int userGroupID)
           
static int addCourseParticipant(int courseID, int pid, int userGroupID, User user)
           
 void addEventGroup(EventGroup eg)
           
 void addFieldGroup(FieldGroup fg)
          Adds new FieldGroup to this CourseInstance object.
static int addGroupParticipant(int pid, int courseID, int groupID, int userGroupID, java.lang.String comment, boolean unregisterFromOthers)
           
 void addGroupStatus(EventGroupStatus egs)
           
 void addGroupType(GroupType gt)
          Methods for handling EventGroups
 void addLecturer(User u)
           
 void addSeason(int seasonID)
           
 void addSeason(java.lang.String seasonID)
           
static int changeParticipantStatus(int cid, int pid, int statusID, int userGroupID)
           
static int changeParticipantStatus(int cid, int pid, int statusID, int userGroupID, DB db)
           
 java.lang.String checkAttributesForErrors(User user)
           
 boolean containsGroupStatus(int status)
           
 java.lang.String courseToHTML(User u)
          Returns course's info in HTML format
 java.lang.String courseToHTML(User u, boolean wholeTable)
           
 FieldGroup createFieldGroup(java.lang.String fgName, int teacherAccessRight, int studentAccessRight)
          Creates new FieldGroup to this CourseInstance object.
protected  int doSave(java.lang.String set)
           
protected  int doSave(java.lang.String set, DB db)
          Deprecated.  
 boolean equals(java.lang.Object o)
           
 java.lang.String evaluateRanks(User user)
           
 double getAdvancedPayment()
           
 int getAllEventGroupCount()
           
 java.util.Calendar getBeginDate()
           
 java.lang.String getBeginDateOut()
           
 java.lang.String getCalculatePointsID()
           
 java.lang.String getClassTeachers()
           
 java.lang.String getCodeNameUri()
          Methods for receiving information
 java.lang.String getCodeNameUri(User user)
           
 int getCountOfBetterRanks(long compareRank)
           
 int getCountOfBetterRanks(long compareRank, int personID)
           
 double getCourseFee()
           
 int getCourseInstanceID()
           
 int getCourseInstanceSpecialStatusID()
           
 int getCourseParticipantCount()
           
 int getCourseParticipantCount(int userGroup)
           
protected  int getCourseParticipants(int userGroup)
          methods for handling CourseParticipants
 java.lang.String getDescription(int typeID, int languageID)
           
 java.lang.String getDescription(int typeID, int languageID, boolean includeHeader)
           
 java.lang.String getDescription(int typeID, int languageID, int mode)
           
 java.lang.String getDescriptions(int typeID, int languageID)
           
 java.util.Calendar getEndDate()
           
 java.lang.String getEndDateOut()
           
 java.lang.String getEvaluationFunction()
           
 EventGroup getEventGroup(int i)
           
 EventGroup getEventGroupByID(int id)
           
 int getEventGroupCount()
           
protected  int getEventGroupCount(int type)
           
 int getEventGroupCountByType(int type)
           
 java.util.ArrayList getEventGroups()
           
 java.util.ArrayList getEventGroups(java.lang.String[] ids)
           
 java.util.ArrayList getEventGroupsByStatus(int status)
           
 java.util.ArrayList getEventGroupsByType(int type)
           
 java.util.ArrayList getEventGroupsByType(int type, int statusID)
           
 java.util.ArrayList getEventGroupTypes()
           
 FieldGroup getFieldGroup(int fgid)
           
 FieldGroup getFieldGroupByName(java.lang.String fgname)
          Finds fieldgroup by given name
 int getFieldGroupCount()
           
 java.util.ArrayList getFieldGroups()
           
static int getFieldIDByGenericName(DB db, java.lang.String gName, int cid)
           
static int getFieldIDByGenericName(java.lang.String gName, int cid)
           
 java.lang.String getGrade(double points)
          Returns from evaluationTable gradeID that corresponds points
 java.util.ArrayList getGroupStatusList()
           
 java.util.ArrayList getGroupTypeList()
           
 int getInstalmentNum()
           
 int getLanguageID()
           
 java.util.ArrayList getLecturers()
           
 int getMaxParticipants()
           
 boolean getNoRegisterUsingKorppi()
           
 java.lang.String getOption(java.lang.String optionname)
          Same kind of courseinstance option handling as exists in user.
 java.lang.String getOption(java.lang.String optionname, java.lang.String defaultValue)
           
 java.util.Hashtable getOrganisationWeights()
           
static java.util.ArrayList getParticipants(int cid, int userGroupID)
           
static java.util.ArrayList getParticipants(int cid, int userGroupID, DB db)
           
 java.lang.String getQueuingMethodDescription(User user)
           
static java.lang.String getQueuingMethodDescription(User user, int isCourseQueuing, int qMethodID, java.util.Hashtable organisationWeights)
           
 int getQueuingMethodID()
           
 Raport getRaport(int id)
           
 Raport getRaport(int id, int type)
           
 java.util.ArrayList getRaports()
           
 java.util.ArrayList getRaports(DB db)
           
 java.util.ArrayList getRaports(DB db, int type)
           
 java.util.ArrayList getRaports(int type)
          Methods for handling raports
 int getRaportsInSelect(javax.servlet.jsp.JspWriter out, int selectedRaportID)
           
 int getRaportsInSelect(javax.servlet.jsp.JspWriter out, int selectedRaportID, DB db)
           
 int getRaportsInSelect(javax.servlet.jsp.JspWriter out, int selectedRaportID, DB db, int type)
           
 int getRaportsInSelect(javax.servlet.jsp.JspWriter out, int selectedRaportID, DB db, int type, java.lang.String selectName)
           
 int getRaportsInSelect(javax.servlet.jsp.JspWriter out, int selectedRaportID, DB db, int type, java.lang.String selectName, User user)
           
 int getRaportsInSelect(javax.servlet.jsp.JspWriter out, int selectedRaportID, DB db, User user)
           
 int getRaportsInSelect(javax.servlet.jsp.JspWriter out, int selectedRaportID, int type)
           
 int getRaportsInSelect(javax.servlet.jsp.JspWriter out, int selectedRaportID, int type, java.lang.String selectName)
           
 int getRaportsInSelect(javax.servlet.jsp.JspWriter out, int selectedRaportID, int type, java.lang.String selectName, User user)
           
 int getRaportsInSelect(javax.servlet.jsp.JspWriter out, int selectedRaportID, User user)
           
 java.util.Calendar getRegistrationBegin()
           
 java.util.Calendar getRegistrationDeadline()
           
 java.util.ArrayList getSeasons()
          Returns seasons
 java.lang.String getShortDescription()
           
 java.util.Calendar getStartDate()
           
 java.lang.String getStartDateOut()
           
 int getStatusID()
           
static java.lang.String getStatusName(int statusID)
           
static java.lang.String getStatusName(int statusID, int languageID)
           
 java.lang.String getTeachers()
           
 java.lang.String getUri()
           
 boolean hasChangedFieldGroups()
          Returns whether or not this CourseInstance object has changed fieldgroups.
 boolean hasFieldGroup(int fgid)
          Returns whether or not this CourseInstance object has fieldgroup with id fgid.
 boolean hasFieldGroup(java.lang.String fgname)
          Returns whether or not this CourseInstance object has fieldgroup name fgname.
 void initCourseAttributes()
          Does pretty much the same that Course's setAttributes but uses courseID instead of courseInstanceID
 void initCourseInstance(int cid, int languageID, int level)
           
 void initDescriptions()
           
 void initEvaluationTable()
           
 int initOrganisationWeightsInQueuing()
           
 void initTeachers()
           
 void initTeachers(boolean href)
           
 void initTeachers(boolean href, User user)
           
 boolean isAttributesChanged()
           
 boolean isAttributesSet()
           
 boolean isBeginDateChanged()
           
 boolean isCourseInstanceSpecialStatusIDChanged()
           
 boolean isDeleted()
           
 boolean isDeletedChanged()
           
 boolean isEndDateChanged()
           
 boolean isLecturersChanged()
           
 boolean isMaxParticipantsChanged()
           
 boolean isQueuingMethodIDChanged()
           
 boolean isRegistered(User user)
           
 boolean isRegistered(User user, int userGroup)
           
 boolean isRegistered(User user, java.lang.String userGroups)
           
 boolean isRegistrationBeginChanged()
           
 boolean isRegistrationDeadlineChanged()
           
 boolean isRegistrationTimeActive()
           
 boolean isShortDescriptionChanged()
           
 boolean isStartDateChanged()
           
 boolean isStatusIDChanged()
           
 boolean isUriChanged()
           
protected  void makeOption(Raport raport, int selectedRaportID, javax.servlet.jsp.JspWriter out)
           
 java.util.HashMap registrationStatus(java.lang.String studentID)
          Returns a status flag if user would like to register for this course.
 java.util.HashMap registrationStatus(java.lang.String studentID, java.lang.String timeStamp)
           
 java.util.HashMap registrationStatus(java.lang.String studentID, java.lang.String timeStamp, boolean forceEvaluation)
           
 boolean removeFieldGroup(java.lang.String fgname)
          Removes fieldgroup from this courseinstance object only if fieldgroupid is 0 (means that fieldgroup is not saved to db yet)
 int removeGroupParticipant(int pid, int groupID)
           
 int removeParticipant(int pid, int userGroupID)
           
 void removeSeasons()
           
 int save()
           
 int save(DB db)
           
 void setAdvancedPayment(double pay)
           
 void setAttributes()
           
 void setAttributesChanged(boolean b)
           
 void setAttributesSet(boolean b)
           
 void setBeginDate(java.util.Calendar date)
           
 void setBeginDateChanged(boolean b)
           
 void setCalculatePointsID(java.lang.String id)
           
 void setClassTeachers(java.lang.String ct)
           
 void setCourse(int id)
           
 void setCourseFee(double fee)
           
 void setCourseInstanceID(int id)
           
 void setCourseInstanceIDChanged(boolean b)
           
 void setCourseInstanceSpecialStatusID(int id)
           
 void setCourseInstanceSpecialStatusIDChanged(boolean b)
           
 void setDeleted(boolean d)
           
 void setDeletedChanged(boolean b)
           
 void setDescription(int typeID, int languageID, java.lang.String typeName, java.lang.String d)
          Methods for handling descriptions
 void setEndDate(java.util.Calendar date)
           
 void setEndDateChanged(boolean b)
           
 void setEvaluationFunction(java.lang.String function)
           
 void setEventGroups()
           
 void setEventGroups(boolean setEvents)
           
 void setEventGroups(int type)
           
 void setEventGroups(int type, boolean setEvents)
           
 void setEventGroups(java.lang.String[] ids)
           
 void setEventGroupsByStatus(int statusID)
           
 void setEventGroupsByStatus(int statusID, int typeID)
           
 void setEventGroupsByStatus(int statusID, int typeID, boolean setEvents)
           
protected  void setEventGroupsByType(int type, boolean setEvents, java.lang.String[] ids, int statusid)
           
 void setFieldGroups()
           
 void setFieldGroups(boolean deleted)
           
protected  void setFieldGroups(boolean fields, boolean deleted)
          Methods for handling FieldGroups
 void setFieldGroupsAndFields()
           
 void setInstalmentNum(int i)
           
 void setLanguageID(int id)
           
 void setLecturers()
           
 void setLecturers(java.lang.String userGroups)
           
 void setLecturers(java.lang.String[] userGroups)
           
 void setLecturersChanged(boolean b)
           
 void setMaxParticipants(int max)
           
 void setMaxParticipantsChanged(boolean b)
           
 void setNoRegisterUsingKorppi(boolean b)
           
 void setOption(java.lang.String optionname, int value)
           
 void setOption(java.lang.String optionname, java.lang.String value)
           
 void setQueuingMethodID(int m)
           
 void setQueuingMethodIDChanged(boolean b)
           
 void setRegistrationBegin(java.util.Calendar date)
           
 void setRegistrationBeginChanged(boolean b)
           
 void setRegistrationDeadline(java.util.Calendar date)
           
 void setRegistrationDeadlineChanged(boolean b)
           
 void setSeason(java.lang.String seasonID)
          Adds season (belongsingroup=1) to this CourseInstance object.
 void setShortDescription(java.lang.String desc)
           
 void setShortDescriptionChanged(boolean b)
           
 void setStartDate(java.util.Calendar date)
           
 void setStartDateChanged(boolean b)
           
 void setStatusID(int id)
           
 void setStatusIDChanged(boolean b)
           
 void setTeachers(java.lang.String t)
           
 void setUri(java.lang.String uri)
           
 void setUriChanged(boolean b)
           
 RS2 studentFinished(int personID)
           
 java.lang.String toHTML(User u)
          Returns course instance's info in HTML format.
 java.lang.String toHTML(User u, boolean wholeTable)
           
protected  int updateMaxParticipants(int newValue)
           
protected  int updateMaxParticipants(java.lang.String newValue)
           
protected  int updateNoRegUsingKorppi(boolean newValue)
           
protected  int updateNoRegUsingKorppi(java.lang.String newValue)
           
protected  int updateParameterToDB(int courseInstParamTypeID, java.lang.String value)
          Copied from saveCourseInstance.jsp Saves courseinstanceparameter's value (updates old or inserts new) to db
protected  void updateSeasons()
          Updates selected and unselected seasons for this courseinstance object to db.
 
Methods inherited from class kotkabeans.Course
getCode, getCourseID, getCourseOptions, getCreditsRange, getCreditsRangeECTS, getLevelID, getMaxCredits, getMaxCreditsECTS, getMinCredits, getMinCreditsECTS, getName, getOrganisationID, printUserGroupSelectBox, printUserGroupSelectBox, printUserGroupSelectBox, setAttributes, setCode, setCourseID, setCourseIDChanged, setLevelID, setMaxCredits, setMinCredits, setName, setOrganisationID
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SS_NORMAL_COURSE

public static int SS_NORMAL_COURSE

SS_EXAM

public static int SS_EXAM

SS_ORG_EXAM

public static int SS_ORG_EXAM

S_NOT_READY

public static int S_NOT_READY

S_ACTIVE

public static int S_ACTIVE

S_OLD

public static int S_OLD

S_ARCHIVED

public static int S_ARCHIVED

CP_ID_STUDENT

public static final int CP_ID_STUDENT
See Also:
Constant Field Values

CP_ID_CLASS_TEACHER

public static final int CP_ID_CLASS_TEACHER
See Also:
Constant Field Values

CP_ID_TEACHER

public static final int CP_ID_TEACHER
See Also:
Constant Field Values

CP_ID_SECRETARY

public static final int CP_ID_SECRETARY
See Also:
Constant Field Values

CP_ID_ADMINISTRATOR

public static final int CP_ID_ADMINISTRATOR
See Also:
Constant Field Values

CP_ID_CANDIDATE

public static final int CP_ID_CANDIDATE
See Also:
Constant Field Values

CP_ID_EXAM_GRADER

public static final int CP_ID_EXAM_GRADER
See Also:
Constant Field Values

CP_ID_EXAMINER

public static final int CP_ID_EXAMINER
See Also:
Constant Field Values

CP_ID_EDITOR

public static final int CP_ID_EDITOR
See Also:
Constant Field Values

CP_LEVEL_STUDENT

public static int CP_LEVEL_STUDENT

CP_LEVEL_CLASS_TEACHER

public static int CP_LEVEL_CLASS_TEACHER

CP_LEVEL_TEACHER

public static int CP_LEVEL_TEACHER

CP_LEVEL_SECRETARY

public static int CP_LEVEL_SECRETARY

CP_LEVEL_ADMINISTRATOR

public static int CP_LEVEL_ADMINISTRATOR

CP_LEVEL_CANDIDATE

public static int CP_LEVEL_CANDIDATE

CP_LEVEL_EXAM_GRADER

public static int CP_LEVEL_EXAM_GRADER

CP_LEVEL_EXAMINER

public static int CP_LEVEL_EXAMINER

CP_LEVEL_EDITOR

public static int CP_LEVEL_EDITOR

CP_STATUS_ACTIVE

public static int CP_STATUS_ACTIVE

CP_STATUS_OLD

public static int CP_STATUS_OLD

CP_STATUS_REMOVED

public static int CP_STATUS_REMOVED

CP_STATUS_FINISHED

public static int CP_STATUS_FINISHED

REGSTATUS_CANNOT_REGISTER

public static final int REGSTATUS_CANNOT_REGISTER
See Also:
Constant Field Values

REGSTATUS_ACTIVE

public static final int REGSTATUS_ACTIVE
See Also:
Constant Field Values

REGSTATUS_NOT_ACTIVE

public static final int REGSTATUS_NOT_ACTIVE
See Also:
Constant Field Values

REGSTATUS_FULL

public static final int REGSTATUS_FULL
See Also:
Constant Field Values

QUEUING_METHOD_CREDITS

public static final int QUEUING_METHOD_CREDITS
See Also:
Constant Field Values

QUEUING_METHOD_FIRST_YEAR

public static final int QUEUING_METHOD_FIRST_YEAR
See Also:
Constant Field Values

QUEUING_METHOD_REG_TIME

public static final int QUEUING_METHOD_REG_TIME
See Also:
Constant Field Values

QUEUING_METHOD_ORGANISATION_PREFERENCE

public static final int QUEUING_METHOD_ORGANISATION_PREFERENCE
See Also:
Constant Field Values

QUEUING_METHOD_MAJOR_CREDITS

public static final int QUEUING_METHOD_MAJOR_CREDITS
See Also:
Constant Field Values

DESCRIPTION_MODE_FLOWED

public static final int DESCRIPTION_MODE_FLOWED
See Also:
Constant Field Values

DESCRIPTION_MODE_ROWS

public static final int DESCRIPTION_MODE_ROWS
See Also:
Constant Field Values

DESCRIPTION_MODE_TABLE_ROWS

public static final int DESCRIPTION_MODE_TABLE_ROWS
See Also:
Constant Field Values

DESCRIPTION_MODE_TABLE

public static final int DESCRIPTION_MODE_TABLE
See Also:
Constant Field Values

courseInstanceID

protected int courseInstanceID

deleted

protected boolean deleted

startDate

protected java.util.Calendar startDate

endDate

protected java.util.Calendar endDate

registrationDeadline

protected java.util.Calendar registrationDeadline

registrationBegin

protected java.util.Calendar registrationBegin

statusID

protected int statusID

maxParticipants

protected int maxParticipants

queuingMethodID

protected int queuingMethodID

noRegisterUsingKorppi

protected boolean noRegisterUsingKorppi

courseFee

protected double courseFee

instalmentNum

protected int instalmentNum

advancedPayment

protected double advancedPayment

courseInstanceSpecialStatusID

protected int courseInstanceSpecialStatusID

uri

protected java.lang.String uri

evaluationFunction

protected java.lang.String evaluationFunction

calculatePointsID

protected java.lang.String calculatePointsID

shortDescription

protected java.lang.String shortDescription

languageID

protected int languageID

attributesChanged

protected boolean attributesChanged

deletedChanged

protected boolean deletedChanged

startDateChanged

protected boolean startDateChanged

endDateChanged

protected boolean endDateChanged

registrationDeadlineChanged

protected boolean registrationDeadlineChanged

registrationBeginChanged

protected boolean registrationBeginChanged

statusIDChanged

protected boolean statusIDChanged

uriChanged

protected boolean uriChanged

queuingMethodIDChanged

protected boolean queuingMethodIDChanged

maxParticipantsChanged

protected boolean maxParticipantsChanged

courseInstanceSpecialStatusIDChanged

protected boolean courseInstanceSpecialStatusIDChanged

courseInstanceIDChanged

protected boolean courseInstanceIDChanged

lecturersChanged

protected boolean lecturersChanged

shortDescriptionChanged

protected boolean shortDescriptionChanged

eventGroups

protected java.util.ArrayList eventGroups

groupTypeList

protected java.util.ArrayList groupTypeList

groupStatusList

protected java.util.ArrayList groupStatusList

fieldGroups

protected java.util.ArrayList fieldGroups

evaluationTable

protected java.util.Hashtable evaluationTable

descriptions

protected java.util.ArrayList descriptions

teachers

protected java.lang.String teachers

classTeachers

protected java.lang.String classTeachers

attributesSet

protected boolean attributesSet

lecturers

protected java.util.ArrayList lecturers

participants

protected java.util.ArrayList participants

raports

protected java.util.ArrayList raports

generalRaports

protected java.util.ArrayList generalRaports

seasons

protected java.util.ArrayList seasons

organisationWeightsInQueuing

protected java.util.Hashtable organisationWeightsInQueuing

LEVEL_NONE

public static final int LEVEL_NONE
See Also:
Constant Field Values

LEVEL_BASIC

public static final int LEVEL_BASIC
See Also:
Constant Field Values

LEVEL_SIMPLE

public static final int LEVEL_SIMPLE
See Also:
Constant Field Values

LEVEL_MEDIUM

public static final int LEVEL_MEDIUM
See Also:
Constant Field Values

LEVEL_COMPLEX

public static final int LEVEL_COMPLEX
See Also:
Constant Field Values

LEVEL_ALL

public static final int LEVEL_ALL
See Also:
Constant Field Values

PARAM_TYPE_MAX_PARTICIPANTS

public static final int PARAM_TYPE_MAX_PARTICIPANTS
See Also:
Constant Field Values

PARAM_TYPE_NO_REG_USING_KORPPI

public static final int PARAM_TYPE_NO_REG_USING_KORPPI
See Also:
Constant Field Values

PARAM_TYPE_COURSE_FEE

public static final int PARAM_TYPE_COURSE_FEE
See Also:
Constant Field Values

PARAM_TYPE_INSTALMENT_NUM

public static final int PARAM_TYPE_INSTALMENT_NUM
See Also:
Constant Field Values

PARAM_TYPE_ADVANCE_PAYMENT

public static final int PARAM_TYPE_ADVANCE_PAYMENT
See Also:
Constant Field Values

courseOption

protected java.util.HashMap courseOption

NO_RIGHTS

public static final int NO_RIGHTS
See Also:
Constant Field Values

READ_RIGHT

public static final int READ_RIGHT
See Also:
Constant Field Values

WRITE_RIGHT

public static final int WRITE_RIGHT
See Also:
Constant Field Values

READ_WRITE

public static final int READ_WRITE
See Also:
Constant Field Values
Constructor Detail

CourseInstance

public CourseInstance()

CourseInstance

public CourseInstance(int cid)

CourseInstance

public CourseInstance(int cid,
                      int languageID)

CourseInstance

public CourseInstance(int cid,
                      int languageID,
                      int level)
Method Detail

initCourseInstance

public void initCourseInstance(int cid,
                               int languageID,
                               int level)

getLanguageID

public int getLanguageID()
Overrides:
getLanguageID in class Course

setLanguageID

public void setLanguageID(int id)
Overrides:
setLanguageID in class Course

getStatusName

public static java.lang.String getStatusName(int statusID)

getStatusName

public static java.lang.String getStatusName(int statusID,
                                             int languageID)

setCourseInstanceID

public void setCourseInstanceID(int id)

setCourse

public void setCourse(int id)

setStatusID

public void setStatusID(int id)

setMaxParticipants

public void setMaxParticipants(int max)

setCourseFee

public void setCourseFee(double fee)

setAdvancedPayment

public void setAdvancedPayment(double pay)

setInstalmentNum

public void setInstalmentNum(int i)

setQueuingMethodID

public void setQueuingMethodID(int m)

setNoRegisterUsingKorppi

public void setNoRegisterUsingKorppi(boolean b)

setCourseInstanceSpecialStatusID

public void setCourseInstanceSpecialStatusID(int id)

setUri

public void setUri(java.lang.String uri)

setTeachers

public void setTeachers(java.lang.String t)

setClassTeachers

public void setClassTeachers(java.lang.String ct)

setShortDescription

public void setShortDescription(java.lang.String desc)

setEvaluationFunction

public void setEvaluationFunction(java.lang.String function)

setCalculatePointsID

public void setCalculatePointsID(java.lang.String id)

setBeginDate

public void setBeginDate(java.util.Calendar date)

setStartDate

public void setStartDate(java.util.Calendar date)

setEndDate

public void setEndDate(java.util.Calendar date)

setRegistrationDeadline

public void setRegistrationDeadline(java.util.Calendar date)

setRegistrationBegin

public void setRegistrationBegin(java.util.Calendar date)

setDeleted

public void setDeleted(boolean d)

setAttributesSet

public void setAttributesSet(boolean b)

setDeletedChanged

public void setDeletedChanged(boolean b)

setStartDateChanged

public void setStartDateChanged(boolean b)

setBeginDateChanged

public void setBeginDateChanged(boolean b)

setEndDateChanged

public void setEndDateChanged(boolean b)

setRegistrationDeadlineChanged

public void setRegistrationDeadlineChanged(boolean b)

setRegistrationBeginChanged

public void setRegistrationBeginChanged(boolean b)

setStatusIDChanged

public void setStatusIDChanged(boolean b)

setUriChanged

public void setUriChanged(boolean b)

setShortDescriptionChanged

public void setShortDescriptionChanged(boolean b)

setQueuingMethodIDChanged

public void setQueuingMethodIDChanged(boolean b)

setCourseInstanceSpecialStatusIDChanged

public void setCourseInstanceSpecialStatusIDChanged(boolean b)

setCourseInstanceIDChanged

public void setCourseInstanceIDChanged(boolean b)

setMaxParticipantsChanged

public void setMaxParticipantsChanged(boolean b)

setAttributesChanged

public void setAttributesChanged(boolean b)

setLecturersChanged

public void setLecturersChanged(boolean b)

getCourseInstanceID

public int getCourseInstanceID()

getStatusID

public int getStatusID()

getMaxParticipants

public int getMaxParticipants()

getCourseFee

public double getCourseFee()

getInstalmentNum

public int getInstalmentNum()

getAdvancedPayment

public double getAdvancedPayment()

getQueuingMethodID

public int getQueuingMethodID()

getNoRegisterUsingKorppi

public boolean getNoRegisterUsingKorppi()

getCourseInstanceSpecialStatusID

public int getCourseInstanceSpecialStatusID()

getUri

public java.lang.String getUri()

getTeachers

public java.lang.String getTeachers()

getClassTeachers

public java.lang.String getClassTeachers()

getShortDescription

public java.lang.String getShortDescription()

getEvaluationFunction

public java.lang.String getEvaluationFunction()

getCalculatePointsID

public java.lang.String getCalculatePointsID()

getStartDate

public java.util.Calendar getStartDate()

getBeginDate

public java.util.Calendar getBeginDate()

getBeginDateOut

public java.lang.String getBeginDateOut()

getStartDateOut

public java.lang.String getStartDateOut()

getEndDate

public java.util.Calendar getEndDate()

getEndDateOut

public java.lang.String getEndDateOut()

getRegistrationDeadline

public java.util.Calendar getRegistrationDeadline()

getRegistrationBegin

public java.util.Calendar getRegistrationBegin()

isDeleted

public boolean isDeleted()

isAttributesSet

public boolean isAttributesSet()

isDeletedChanged

public boolean isDeletedChanged()

isBeginDateChanged

public boolean isBeginDateChanged()

isStartDateChanged

public boolean isStartDateChanged()

isEndDateChanged

public boolean isEndDateChanged()

isRegistrationDeadlineChanged

public boolean isRegistrationDeadlineChanged()

isRegistrationBeginChanged

public boolean isRegistrationBeginChanged()

isStatusIDChanged

public boolean isStatusIDChanged()

isUriChanged

public boolean isUriChanged()

isShortDescriptionChanged

public boolean isShortDescriptionChanged()

isMaxParticipantsChanged

public boolean isMaxParticipantsChanged()

isQueuingMethodIDChanged

public boolean isQueuingMethodIDChanged()

isCourseInstanceSpecialStatusIDChanged

public boolean isCourseInstanceSpecialStatusIDChanged()

isAttributesChanged

public boolean isAttributesChanged()

isLecturersChanged

public boolean isLecturersChanged()

initCourseAttributes

public void initCourseAttributes()
Does pretty much the same that Course's setAttributes but uses courseID instead of courseInstanceID


equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

setAttributes

public void setAttributes()
                   throws java.lang.Exception
java.lang.Exception

initEvaluationTable

public void initEvaluationTable()

initTeachers

public void initTeachers()
                  throws java.lang.Exception
java.lang.Exception

initTeachers

public void initTeachers(boolean href)
                  throws java.lang.Exception
java.lang.Exception

initTeachers

public void initTeachers(boolean href,
                         User user)
                  throws java.lang.Exception
java.lang.Exception

getGrade

public java.lang.String getGrade(double points)
Returns from evaluationTable gradeID that corresponds points


setDescription

public void setDescription(int typeID,
                           int languageID,
                           java.lang.String typeName,
                           java.lang.String d)
Methods for handling descriptions


initDescriptions

public void initDescriptions()
                      throws java.lang.Exception
java.lang.Exception

getDescription

public java.lang.String getDescription(int typeID,
                                       int languageID)
                                throws java.lang.Exception
java.lang.Exception

getDescription

public java.lang.String getDescription(int typeID,
                                       int languageID,
                                       boolean includeHeader)

getDescription

public java.lang.String getDescription(int typeID,
                                       int languageID,
                                       int mode)

getDescriptions

public java.lang.String getDescriptions(int typeID,
                                        int languageID)
                                 throws java.lang.Exception
java.lang.Exception

getCodeNameUri

public java.lang.String getCodeNameUri()
                                throws java.lang.Exception
Methods for receiving information

java.lang.Exception

getCodeNameUri

public java.lang.String getCodeNameUri(User user)
                                throws java.lang.Exception
java.lang.Exception

addGroupType

public void addGroupType(GroupType gt)
Methods for handling EventGroups


getGroupTypeList

public java.util.ArrayList getGroupTypeList()

addGroupStatus

public void addGroupStatus(EventGroupStatus egs)

getGroupStatusList

public java.util.ArrayList getGroupStatusList()

containsGroupStatus

public boolean containsGroupStatus(int status)

setEventGroupsByType

protected void setEventGroupsByType(int type,
                                    boolean setEvents,
                                    java.lang.String[] ids,
                                    int statusid)
                             throws java.lang.Exception
java.lang.Exception

setEventGroups

public void setEventGroups(boolean setEvents)
                    throws java.lang.Exception
java.lang.Exception

setEventGroups

public void setEventGroups(int type,
                           boolean setEvents)
                    throws java.lang.Exception
java.lang.Exception

setEventGroups

public void setEventGroups(int type)
                    throws java.lang.Exception
java.lang.Exception

setEventGroups

public void setEventGroups()
                    throws java.lang.Exception
java.lang.Exception

setEventGroups

public void setEventGroups(java.lang.String[] ids)
                    throws java.lang.Exception
java.lang.Exception

setEventGroupsByStatus

public void setEventGroupsByStatus(int statusID)
                            throws java.lang.Exception
java.lang.Exception

setEventGroupsByStatus

public void setEventGroupsByStatus(int statusID,
                                   int typeID)
                            throws java.lang.Exception
java.lang.Exception

setEventGroupsByStatus

public void setEventGroupsByStatus(int statusID,
                                   int typeID,
                                   boolean setEvents)
                            throws java.lang.Exception
java.lang.Exception

getEventGroupCount

public int getEventGroupCount()

addEventGroup

public void addEventGroup(EventGroup eg)

getEventGroupByID

public EventGroup getEventGroupByID(int id)

getEventGroup

public EventGroup getEventGroup(int i)

getEventGroups

public java.util.ArrayList getEventGroups(java.lang.String[] ids)

getEventGroups

public java.util.ArrayList getEventGroups()

getEventGroupsByType

public java.util.ArrayList getEventGroupsByType(int type)

getEventGroupsByType

public java.util.ArrayList getEventGroupsByType(int type,
                                                int statusID)

getEventGroupTypes

public java.util.ArrayList getEventGroupTypes()

getEventGroupsByStatus

public java.util.ArrayList getEventGroupsByStatus(int status)

getEventGroupCount

protected int getEventGroupCount(int type)

getEventGroupCountByType

public int getEventGroupCountByType(int type)

getAllEventGroupCount

public int getAllEventGroupCount()

getCourseParticipants

protected int getCourseParticipants(int userGroup)
                             throws java.lang.Exception
methods for handling CourseParticipants

java.lang.Exception

getCourseParticipantCount

public int getCourseParticipantCount(int userGroup)
                              throws java.lang.Exception
java.lang.Exception

getCourseParticipantCount

public int getCourseParticipantCount()
                              throws java.lang.Exception
java.lang.Exception

setLecturers

public void setLecturers(java.lang.String[] userGroups)
                  throws java.lang.Exception
java.lang.Exception

setLecturers

public void setLecturers()
                  throws java.lang.Exception
java.lang.Exception

setLecturers

public void setLecturers(java.lang.String userGroups)
                  throws java.lang.Exception
java.lang.Exception

getParticipants

public static java.util.ArrayList getParticipants(int cid,
                                                  int userGroupID,
                                                  DB db)
                                           throws java.lang.Exception
java.lang.Exception

getParticipants

public static java.util.ArrayList getParticipants(int cid,
                                                  int userGroupID)
                                           throws java.lang.Exception
java.lang.Exception

addLecturer

public void addLecturer(User u)

getLecturers

public java.util.ArrayList getLecturers()
                                 throws java.lang.Exception
java.lang.Exception

isRegistered

public boolean isRegistered(User user,
                            int userGroup)
                     throws java.lang.Exception
java.lang.Exception

isRegistered

public boolean isRegistered(User user,
                            java.lang.String userGroups)
                     throws java.lang.Exception
java.lang.Exception

isRegistered

public boolean isRegistered(User user)
                     throws java.lang.Exception
java.lang.Exception

addCourseParticipant

public static int addCourseParticipant(int courseID,
                                       int pid,
                                       int userGroupID)
                                throws java.lang.Exception
java.lang.Exception

addCourseParticipant

public static int addCourseParticipant(int courseID,
                                       int pid,
                                       int userGroupID,
                                       User user)
                                throws java.lang.Exception
java.lang.Exception

addCourseParticipant

public int addCourseParticipant(int pid,
                                int userGroupID)
                         throws java.lang.Exception
java.lang.Exception

addAllCourseParticipants

public static int addAllCourseParticipants(int cid,
                                           java.util.ArrayList parts,
                                           int userGroupID)
                                    throws java.lang.Exception
java.lang.Exception

removeParticipant

public int removeParticipant(int pid,
                             int userGroupID)
                      throws java.lang.Exception
java.lang.Exception

changeParticipantStatus

public static int changeParticipantStatus(int cid,
                                          int pid,
                                          int statusID,
                                          int userGroupID,
                                          DB db)
                                   throws java.lang.Exception
java.lang.Exception

changeParticipantStatus

public static int changeParticipantStatus(int cid,
                                          int pid,
                                          int statusID,
                                          int userGroupID)
                                   throws java.lang.Exception
java.lang.Exception

addGroupParticipant

public static int addGroupParticipant(int pid,
                                      int courseID,
                                      int groupID,
                                      int userGroupID,
                                      java.lang.String comment,
                                      boolean unregisterFromOthers)
                               throws java.lang.Exception
java.lang.Exception

removeGroupParticipant

public int removeGroupParticipant(int pid,
                                  int groupID)
                           throws java.lang.Exception
java.lang.Exception

setFieldGroups

protected void setFieldGroups(boolean fields,
                              boolean deleted)
                       throws java.lang.Exception
Methods for handling FieldGroups

java.lang.Exception

setFieldGroupsAndFields

public void setFieldGroupsAndFields()

setFieldGroups

public void setFieldGroups()

setFieldGroups

public void setFieldGroups(boolean deleted)

getFieldGroupCount

public int getFieldGroupCount()

getFieldGroups

public java.util.ArrayList getFieldGroups()

getFieldGroup

public FieldGroup getFieldGroup(int fgid)

getFieldGroupByName

public FieldGroup getFieldGroupByName(java.lang.String fgname)
Finds fieldgroup by given name

Parameters:
fgname - name of wanted fieldgroup
Returns:
fieldgroup by given name or null if fieldgroup is not found

hasFieldGroup

public boolean hasFieldGroup(java.lang.String fgname)
Returns whether or not this CourseInstance object has fieldgroup name fgname.

Parameters:
fgname - name of fieldgroup to check
Returns:
true if fieldgroup exists, false otherwise

hasFieldGroup

public boolean hasFieldGroup(int fgid)
Returns whether or not this CourseInstance object has fieldgroup with id fgid.

Parameters:
fgid - id of fieldgroup to check
Returns:
true if fieldgroup exists, false otherwise

hasChangedFieldGroups

public boolean hasChangedFieldGroups()
Returns whether or not this CourseInstance object has changed fieldgroups.

Returns:
true if atleast one fieldgroup has changed, false otherwise

removeFieldGroup

public boolean removeFieldGroup(java.lang.String fgname)
Removes fieldgroup from this courseinstance object only if fieldgroupid is 0 (means that fieldgroup is not saved to db yet)

Parameters:
fgname - Name of the fieldgroup to remove
Returns:
true if removing succeed, false otherwise

getFieldIDByGenericName

public static int getFieldIDByGenericName(DB db,
                                          java.lang.String gName,
                                          int cid)
                                   throws java.lang.Exception
java.lang.Exception

getFieldIDByGenericName

public static int getFieldIDByGenericName(java.lang.String gName,
                                          int cid)
                                   throws java.lang.Exception
java.lang.Exception

getRaports

public java.util.ArrayList getRaports(int type)
                               throws java.lang.Exception
Methods for handling raports

java.lang.Exception

getRaports

public java.util.ArrayList getRaports()
                               throws java.lang.Exception
java.lang.Exception

getRaports

public java.util.ArrayList getRaports(DB db,
                                      int type)
                               throws java.lang.Exception
java.lang.Exception

getRaports

public java.util.ArrayList getRaports(DB db)
                               throws java.lang.Exception
java.lang.Exception

getRaport

public Raport getRaport(int id,
                        int type)
                 throws java.lang.Exception
java.lang.Exception

getRaport

public Raport getRaport(int id)
                 throws java.lang.Exception
java.lang.Exception

makeOption

protected void makeOption(Raport raport,
                          int selectedRaportID,
                          javax.servlet.jsp.JspWriter out)
                   throws java.lang.Exception
java.lang.Exception

getRaportsInSelect

public int getRaportsInSelect(javax.servlet.jsp.JspWriter out,
                              int selectedRaportID,
                              int type,
                              java.lang.String selectName,
                              User user)
                       throws java.lang.Exception
java.lang.Exception

getRaportsInSelect

public int getRaportsInSelect(javax.servlet.jsp.JspWriter out,
                              int selectedRaportID,
                              DB db,
                              int type,
                              java.lang.String selectName,
                              User user)
                       throws java.lang.Exception
java.lang.Exception

getRaportsInSelect

public int getRaportsInSelect(javax.servlet.jsp.JspWriter out,
                              int selectedRaportID,
                              DB db,
                              int type,
                              java.lang.String selectName)
                       throws java.lang.Exception
java.lang.Exception

getRaportsInSelect

public int getRaportsInSelect(javax.servlet.jsp.JspWriter out,
                              int selectedRaportID,
                              DB db,
                              int type)
                       throws java.lang.Exception
java.lang.Exception

getRaportsInSelect

public int getRaportsInSelect(javax.servlet.jsp.JspWriter out,
                              int selectedRaportID,
                              DB db)
                       throws java.lang.Exception
java.lang.Exception

getRaportsInSelect

public int getRaportsInSelect(javax.servlet.jsp.JspWriter out,
                              int selectedRaportID,
                              DB db,
                              User user)
                       throws java.lang.Exception
java.lang.Exception

getRaportsInSelect

public int getRaportsInSelect(javax.servlet.jsp.JspWriter out,
                              int selectedRaportID,
                              int type,
                              java.lang.String selectName)
                       throws java.lang.Exception
java.lang.Exception

getRaportsInSelect

public int getRaportsInSelect(javax.servlet.jsp.JspWriter out,
                              int selectedRaportID,
                              int type)
                       throws java.lang.Exception
java.lang.Exception

getRaportsInSelect

public int getRaportsInSelect(javax.servlet.jsp.JspWriter out,
                              int selectedRaportID)
                       throws java.lang.Exception
java.lang.Exception

getRaportsInSelect

public int getRaportsInSelect(javax.servlet.jsp.JspWriter out,
                              int selectedRaportID,
                              User user)
                       throws java.lang.Exception
java.lang.Exception

registrationStatus

public java.util.HashMap registrationStatus(java.lang.String studentID)
                                     throws java.lang.Exception
Returns a status flag if user would like to register for this course. returns a status flag if user would like to register for this course. 0 = cannot register 1 = can register normally; if queuing method used, second returned value is the queuing rank in this case. 2 = reg time not active 3 = course is full; if queuing method used and it permits registration, then the second returned value is the queuing rank if user registers now.

java.lang.Exception

registrationStatus

public java.util.HashMap registrationStatus(java.lang.String studentID,
                                            java.lang.String timeStamp)
                                     throws java.lang.Exception
java.lang.Exception

registrationStatus

public java.util.HashMap registrationStatus(java.lang.String studentID,
                                            java.lang.String timeStamp,
                                            boolean forceEvaluation)
                                     throws java.lang.Exception
java.lang.Exception

getCountOfBetterRanks

public int getCountOfBetterRanks(long compareRank)
                          throws java.lang.Exception
java.lang.Exception

getCountOfBetterRanks

public int getCountOfBetterRanks(long compareRank,
                                 int personID)
                          throws java.lang.Exception
java.lang.Exception

isRegistrationTimeActive

public boolean isRegistrationTimeActive()

getQueuingMethodDescription

public java.lang.String getQueuingMethodDescription(User user)

getQueuingMethodDescription

public static java.lang.String getQueuingMethodDescription(User user,
                                                           int isCourseQueuing,
                                                           int qMethodID,
                                                           java.util.Hashtable organisationWeights)

doSave

protected int doSave(java.lang.String set,
                     DB db)
              throws java.lang.Exception
Deprecated.  

java.lang.Exception
See Also:
doSave(String)

doSave

protected int doSave(java.lang.String set)
              throws java.lang.Exception
java.lang.Exception

save

public int save(DB db)
         throws java.lang.Exception
java.lang.Exception

save

public int save()
         throws java.lang.Exception
java.lang.Exception

checkAttributesForErrors

public java.lang.String checkAttributesForErrors(User user)

updateParameterToDB

protected int updateParameterToDB(int courseInstParamTypeID,
                                  java.lang.String value)
Copied from saveCourseInstance.jsp Saves courseinstanceparameter's value (updates old or inserts new) to db

Parameters:
courseInstParamTypeID -
value - parameter's value to update
Returns:
amount of updated (or inserted) rows or <0 if fails
See Also:
final int PARAM_TYPE_MAX_PARTICIPANTS, final int PARAM_TYPE_NO_REG_USING_KORPPI

updateMaxParticipants

protected int updateMaxParticipants(int newValue)

updateMaxParticipants

protected int updateMaxParticipants(java.lang.String newValue)

updateNoRegUsingKorppi

protected int updateNoRegUsingKorppi(java.lang.String newValue)

updateNoRegUsingKorppi

protected int updateNoRegUsingKorppi(boolean newValue)

addSeason

public void addSeason(int seasonID)

addSeason

public void addSeason(java.lang.String seasonID)

setSeason

public void setSeason(java.lang.String seasonID)
Adds season (belongsingroup=1) to this CourseInstance object.

Parameters:
seasonID - season's objectgroupid

removeSeasons

public void removeSeasons()

getSeasons

public java.util.ArrayList getSeasons()
Returns seasons


updateSeasons

protected void updateSeasons()
Updates selected and unselected seasons for this courseinstance object to db.


courseToHTML

public java.lang.String courseToHTML(User u)
Returns course's info in HTML format

Parameters:
u - for translations

courseToHTML

public java.lang.String courseToHTML(User u,
                                     boolean wholeTable)

toHTML

public java.lang.String toHTML(User u)
Returns course instance's info in HTML format.

Parameters:
u - for translations

toHTML

public java.lang.String toHTML(User u,
                               boolean wholeTable)

addFieldGroup

public void addFieldGroup(FieldGroup fg)
Adds new FieldGroup to this CourseInstance object. Does not check if fieldGroup already exists.


createFieldGroup

public FieldGroup createFieldGroup(java.lang.String fgName,
                                   int teacherAccessRight,
                                   int studentAccessRight)
Creates new FieldGroup to this CourseInstance object.

Parameters:
fgName - name of FieldGroup
teacherAccessRight -
studentAccessRight -

evaluateRanks

public java.lang.String evaluateRanks(User user)
                               throws java.lang.Exception
java.lang.Exception

studentFinished

public RS2 studentFinished(int personID)
                    throws java.lang.Exception
java.lang.Exception

initOrganisationWeightsInQueuing

public int initOrganisationWeightsInQueuing()
                                     throws java.lang.Exception
java.lang.Exception

getOrganisationWeights

public java.util.Hashtable getOrganisationWeights()

getOption

public java.lang.String getOption(java.lang.String optionname)
Same kind of courseinstance option handling as exists in user.


getOption

public java.lang.String getOption(java.lang.String optionname,
                                  java.lang.String defaultValue)

setOption

public void setOption(java.lang.String optionname,
                      java.lang.String value)
               throws java.lang.Exception
java.lang.Exception

setOption

public void setOption(java.lang.String optionname,
                      int value)
               throws java.lang.Exception
java.lang.Exception