コード例 #1
0
    def doRenderQuestionElement(self, element, preview=False):
        """
        Returns an XHTML string for viewing and previewing this question element
        depending on the value of 'preview' - similar to questionelement.py, but with teaxtarea 
        """
        log.debug("renderView called")

        if preview:
            html = element.question_question.renderPreview()
        else:
            html = element.question_question.renderView()

        html += '<div class="CaseStudy" id="Casestudy%s">' % (element.id)
        html += '<textarea id="CaseStudyText%s" class="CaseStudyText" name="CaseStudyText%s"' % (
            element.id, element.id)
        html += ' rows=5 style="width:99%"></textarea></div>'

        if element.question_feedback.field.content.strip() != "":
            if preview:
                feedback = element.question_feedback.renderPreview()
            else:
                feedback = element.question_feedback.renderView()
            html += common.feedbackBlock(element.id, feedback)

        return html
コード例 #2
0
ファイル: reflectionblock.py プロジェクト: RichDijk/eXe
    def renderViewContent(self):
        """
        Returns an XHTML string for this block
        """
        if self.previewing: 
            html = self.activityElement.renderPreview()
            feedback = self.answerElement.renderPreview()
        else:
            html = self.activityElement.renderView()
            feedback = self.answerElement.renderView()

        html += common.feedbackBlock(self.id,feedback)

        return html
コード例 #3
0
    def renderViewContent(self):
        """
        Returns an XHTML string for this block
        """

        if self.previewing:
            html = self.activityElement.renderPreview()
            feedback = self.answerElement.renderPreview()
        else:
            html = self.activityElement.renderView()
            feedback = self.answerElement.renderView()

        html += common.feedbackBlock(self.id, feedback)

        return html
コード例 #4
0
    def doRender(self, preview=False):
        """
        Returns an XHTML string for viewing and previewing this question element
        depending on the value of 'preview'.
        """
        if preview: 
            html  = self.question_question.renderPreview()
        else:
            html  = self.question_question.renderView()

        if  self.question_feedback.field.content.strip() != "" :
            if preview: 
                feedback = self.question_feedback.renderPreview() 
            else: 
                feedback = self.question_feedback.renderView()
            html += common.feedbackBlock(self.id,feedback)
        
        return html
コード例 #5
0
    def renderViewContent(self):
        """
        Returns an XHTML string for this block
        """
        if self.previewing: 
            html = self.activityElement.renderPreview()
            feedback = self.answerElement.renderPreview()
        else:
            html = self.activityElement.renderView()
            feedback = self.answerElement.renderView()
        #added lernmodule.net
        html += '<div class="Reflection" id="Reflection%s">' % (self.id)
        html += '<textarea id="ReflectionText%s" class="ReflectionText" name="ReflectionText%s"' % (self.id, self.id)
        html += ' rows=5 style="width:99%"></textarea></div>'

        html += common.feedbackBlock(self.id,feedback)

        return html
コード例 #6
0
    def renderViewContent(self):
        """
        Returns an XHTML string for this block
        """
        if self.previewing:
            html = self.activityElement.renderPreview()
            feedback = self.answerElement.renderPreview()
        else:
            html = self.activityElement.renderView()
            feedback = self.answerElement.renderView()
        #added lernmodule.net
        html += '<div class="Reflection" id="Reflection%s">' % (self.id)
        html += '<textarea id="ReflectionText%s" class="ReflectionText" name="ReflectionText%s"' % (
            self.id, self.id)
        html += ' rows=5 style="width:99%"></textarea></div>'

        html += common.feedbackBlock(self.id, feedback)

        return html
コード例 #7
0
    def doRenderQuestionElement(self, element, preview=False):
        """
        Returns an XHTML string for viewing and previewing this question element
        depending on the value of 'preview' - similar to questionelement.py, but with teaxtarea 
        """
        log.debug("renderView called")

        if preview:
            html = element.question_question.renderPreview()
        else:
            html = element.question_question.renderView()

        html += '<div class="CaseStudy" id="Casestudy%s">' % (element.id)
        html += '<textarea id="CaseStudyText%s" class="CaseStudyText" name="CaseStudyText%s"' % (element.id, element.id)
        html += ' rows=5 style="width:99%"></textarea></div>'

        if element.question_feedback.field.content.strip() != "":
            if preview:
                feedback = element.question_feedback.renderPreview()
            else:
                feedback = element.question_feedback.renderView()
            html += common.feedbackBlock(element.id, feedback)

        return html