a270e263acfeee9c796ef5a5636e6c70d46ebd18,modules/templates/UCCE/controllers.py,dc_TargetReport,html,#Any#,1469

Before Change


                              _id="heatmap-%s" % question["id"],
                              )
                content.append(heatmap)
                scale = DIV(DIV(_class="scale wide",
                                ),
                            DIV(1,
                                _class="fleft",
                                ),
                            DIV(12,
                                _class="fright",
                                ),
                            _class="scale-container",
                            )
                content.append(scale)

            card = DIV(DIV(SPAN(question["name"],
                                _class="card-title",

After Change


                //content.append(scale)

                options = question["options"]
                values = []
                vappend = values.append
                for option in options:
                    total = 0
                    for answer in responses:
                        if option in answer.get("selectedRegions", []):
                            total += 1
                    // @ToDo: Get report.js to use these
                    //if len_responses:
                    //    percentage = total / len_responses
                    //else:
                    //    percentage = 0
                    vappend({"label": option,
                             "value": total,
                             //"p": percentage,
                             })

                data = [{"values": values,
                         }]
                hidden_input = INPUT(_type="hidden",
                                     _class="multichoice-graph",
                                     _value=json.dumps(data, separators=SEPARATORS),
                                     )
                graph = DIV(hidden_input,
                            _class="graph-container",
                            _id="heatmap-graph-%s" % question["id"],
                            )
                content.append(graph)

            card = DIV(DIV(SPAN(question["name"],
                                _class="card-title",
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: sahana/eden
Commit Name: a270e263acfeee9c796ef5a5636e6c70d46ebd18
Time: 2019-09-06
Author: fran@aidiq.com
File Name: modules/templates/UCCE/controllers.py
Class Name: dc_TargetReport
Method Name: html


Project Name: sahana/eden
Commit Name: e7932cde5cbec2e4fb32edaee24708342ee9094d
Time: 2019-08-29
Author: fran@aidiq.com
File Name: modules/templates/UCCE/controllers.py
Class Name:
Method Name: dc_target_list_layout


Project Name: sahana/eden
Commit Name: cf6f8b1dbbfd9491bcb63f178eaf780a41c59e29
Time: 2019-08-29
Author: fran@aidiq.com
File Name: modules/templates/UCCE/controllers.py
Class Name:
Method Name: doc_document_list_layout