Ejemplo n.º 1
0
        /// <summary>
        /// Update the annnouncement
        /// </summary>
        public bool Update(Announcement announce)
        {
            //Check permission
            Authorize(announce.CourseID, Permission.COURSE, "updateannou", announce.CourseID, null);

            announce.Description = HTMLWizard.LineBreakToBR(announce.Description);
            return m_dp.UpdateAnnouncement(announce);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Create a new announcement
        /// </summary>
        public bool Create(string poster, string title, string desc, int courseid)
        {
            //Check permission
            Authorize(courseid, Permission.COURSE, "createannou", courseid, null);

            Announcement annou = new Announcement();
            annou.Description = desc;
            annou.Poster = poster;
            annou.CourseID = courseid;
            annou.Title = title;

            //HTMLize the desc
            annou.Description = HTMLWizard.LineBreakToBR(annou.Description);

            return m_dp.CreateAnnouncement(annou);
        }
Ejemplo n.º 3
0
 private TreeNode AddAnnNode(TreeNodeCollection par, Announcement ann)
 {
     return AddNode(par, ann.Title, "attributes/ann.gif", "attributes/ann.gif",
         "Ann " + ann.ID, false);
 }