Example #1
0
        /// <summary>
        /// Write TOC Html elements for the table of contents
        /// </summary>
        /// <returns></returns>
        public void TocElementsHtml(HttpRequest Request, string AssignmentGradingViewName)
        {
            // If there was an error on page load, do nothing here.
            if (m_session == null)
            {
                return;
            }

            TableOfContentsElement toc = m_session.GetTableOfContents(true);    // get toc without sequencing information

            using (HtmlStringWriter sw = new HtmlStringWriter(Response.Output))
            {
                sw.Indent = 2;  // start at table level 2, since that's where we are

                WriteTocEntry(sw, toc);

                string SLKView = Request.QueryString["SlkView"];

                // Write the TOC entry to submit the training, only in Execute view or RandomAccess (SLK only) views

                if ((m_session.View == SessionView.Execute) ||
                    ((m_session.View == SessionView.Review) && (SLKView.ToLower() == AssignmentGradingViewName.ToLower())))
                {
                    WriteSubmitPageEntry(sw);
                }
            }
        }