openacs-4/.../xowf/lib/inclass-exam.wf (+8 -0)
953 953     dict set manual_gradings $user_id $qn comment [dict get $formDict comment]
954 954     :AM set_exam_results -obj [self] manual_gradings $manual_gradings
955 955
956 956     #
957 957     # Recompute the achieved points percentage for the full exam
958 958     # submission of the student... based on the grading scheme and
959 959     # manual grading info.
960 960     #
961 961     set grading_scheme [dict get $formDict grading_scheme]
962 962     set achieved_points [dict get $formDict achieved_points]
963 963     set details [dict get $achieved_points details]
964 964     set newDetails {}
965 965     foreach detail $details {
966 966       if {[dict get $detail attributeName] eq $qn} {
967 967         dict set detail achieved [dict get $formDict achieved]
968 968       }
969 969       lappend newDetails $detail
970 970     }
971 971     dict set achieved_points details $newDetails
972 972     dict set achieved_points achievedPoints ""
  973
  974     #
  975     # Ensure grading scheme is loaded before used
  976     #
  977     ::xowf::test_item::grading::load_grading_schemes \
  978         -package_id [:package_id] \
  979         -parent_id [:parent_id]
  980
973 981     set gradingInfo [::xowf::test_item::grading::$grading_scheme print -achieved_points $achieved_points]
974 982
975 983     #
976 984     # Return the line for the panel as result of the AJAX call
977 985     #
978 986     ns_return 200 text/plain [dict get $gradingInfo panel]
979 987     ad_script_abort
980 988   }
981 989
982 990   ########################################################################
983 991   # AJAX call "update-config", acts as responder
984 992   #
985 993   :proc www-update-config {} {
986 994     #
987 995     # Received updates for form
988 996     #
989 997     set field_names [:QM exam_configuration_modifiable_field_names [self]]
990 998     set form_fields [:create_form_fields_from_names -lookup \
991 999                          -form_constraints [:get_fc_repository] \
992 1000                          $field_names]