zoukankan      html  css  js  c++  java
  • CRM开发学员课程系统——我的课程学习记录

    #student/urls.py
    #课程学习记录
     url(r'mycourse/(d+)$',views.mycourse,name='mycourse'),

    通过报名表的对象找到关联的学习记录表值

    #student/views.py
    def mycourse(request,enroll_id):
        """我的课程页面"""
        #找到报名表对象
        enroll_obj = models.Enrollment.objects.get(id=enroll_id)
        return render(request,"student/mycourse.html",{"enroll_obj":enroll_obj})
    #student/mycourse.py
    {% extends 'index.html'%}
    {% block page-content %}
    {% load stu_tags %}
    <div class="panel panel-default">
      <div class="panel-body">
        {{enroll_obj.enrolled_class.course}}
      </div>
      <div class="panel panel-default">
          <!-- Default panel contents -->
          <!-- Table -->
          <table class="table">
              <thead>
                <tr>
                    <th>课程节次</th>
                    <th>上课课程</th>
                    <th>是否有作业</th>
                    <th>作业标题</th>
                    <th>签到状态</th>
                    <th>成绩</th>
                    <th>作业详情</th>
                </tr>
              </thead>
              <tbody>
              {% for studyrecord in enroll_obj.studyrecord_set.all %}
                <tr>
                    <td>{{studyrecord.course_record.day_num}}</td>
                    <td>{{studyrecord.course_record.date}}</td>
                    <td>{{studyrecord.course_record.has_homework}}</td>
                    <td>{{studyrecord.course_record.homework_title}}</td>
                    <td>{{studyrecord.get_attendance_display}}</td>
                    <td>{{studyrecord.score}}</td>
                    <td><a href="{% url 'my_homework' studyrecord.id %}">作业详情</a></td>
                </tr>
              {% endfor %}
              </tbody>
          </table>
      </div>
    </div>
    {% endblock%}
  • 相关阅读:
    .NET LINQ 数据分区
    .NET LINQ 投影运算
    .NET LINQ 限定符操作
    .NET LINQ 筛选数据
    freeswitch媒体处理方式
    freeseitch设置通道增益
    鼎信设备设置通道增益,提高音量
    freeswitch 录音
    freeswitch录音设置(不设置缓存)
    freswitch 设置sip中的callid作为用到的uuid
  • 原文地址:https://www.cnblogs.com/venvive/p/11503945.html
Copyright © 2011-2022 走看看